Commit Graph

7448 Commits

Author SHA1 Message Date
harti
47d7a7aa18 Fix the prototypes by addings some constness. This should have been
committed together with the commit to dir.c:1.48.
2005-02-22 08:17:05 +00:00
harti
e9cdad37dc Use the new LST_FOREACH macro throughout the file and replace calls to
Lst_ForEach and Lst_Find.
2005-02-22 08:00:06 +00:00
harti
efff8cf181 Invent the LST_FOREACH macro for looping through a list. In contrast
to the Lst_ForEach function this macro reduces the number of function
calls per invocation by N + 1 (where N is the number of list elements)
and increases code locality thereby increasing readability and
(maybe) performance.
2005-02-22 07:58:53 +00:00
ps
c9d616766c Fix an overflow when calculating the number of kilobytes from the
number of pages.

Obtained from:	Yahoo!
2005-02-21 14:35:00 +00:00
harti
d6b174f652 Style: fix indendation to be 8 and use tabulators. Fix lines longer than
80 characters and slightly reorder functions to get rid of static
prototypes.
2005-02-21 13:36:22 +00:00
harti
ba26f6388f Forgot to set *freePtr to FALSE in another place.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-21 08:10:21 +00:00
harti
dd84d5412c Fix a bug in handling archive members: when a member was not found
when looking into an already hashed archive, the code tried to use
the name shortened to the maximum length allowed for the archive.
Unfortunately it passed a buffer of junk to the hashing routine when
the name actually wasn't too long. Theoretically this could lead to
a false positive.
2005-02-21 08:06:34 +00:00
ru
5e18103b15 Fixate the hash bucket size to 4K. We were using the default,
which is stat.st_blksize (i.e., PAGE_SIZE).

This change causes the .db files that were cross-compiled on
another platform to be identical to the natively built ones.

Tested on:	alpha->amd64 build
2005-02-19 23:59:49 +00:00
ume
ead15b3b3f simply ignore unknown address family.
MFC after:	1 week
2005-02-19 16:54:26 +00:00
ume
ba650c0652 teach IPv6 to `systat -netstat'.
Tested by:	kuriyama
MFC after:	1 week
2005-02-19 15:10:19 +00:00
wollman
b7a765f1f7 Support correct programming environment name for amd64.
MFC after:	3 days
2005-02-18 21:53:05 +00:00
kientzle
34d9e63e65 Document the --null, --one-file-system, and -I options.
Clarify that -T can be used in 'x' mode as well as 'c' mode.
2005-02-18 19:19:45 +00:00
harti
16ce0eb32d Push the assignments of some variables down into the sub-blocks where
it is actually needed. This makes clear in which subblocks the variables
are not needed and which can easier be split out.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-18 15:32:06 +00:00
harti
1da3314647 Push down variables into local scope in Var_Parse to make their
liveness clear for splitting up this monster function.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-18 07:33:43 +00:00
hq
89684378a4 Add myself to the calendar 2005-02-17 16:38:56 +00:00
harti
cd4209c59e Whitespace cleanup: substitute mixed tabs and spaces by canonical
whitespace and line up some variable definitions.
2005-02-17 12:35:32 +00:00
harti
fd36b19bc9 Move error case to begin of if-else chain. Do not needless initialize
startc, but only at the place where the initialisation is needed. Remove
a needless else.

Submitted by:	Max Okumoto <okumoto@ucsd.edu> (partly)
2005-02-17 12:31:53 +00:00
harti
627a049bbf Fix two typos in comments.
Submitted by:	ru & Max Okumoto <okumoto@ucsd.edu>
2005-02-17 09:09:34 +00:00
harti
a83cbf6327 Sort out the error case that a single '$' was passed a little bit
earlier instead of mixing its handling with other cases.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-17 09:01:19 +00:00
harti
49f07e0b83 Mostly stylistic issues: move a variable into local scope, make
condition positive and fix long lines.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-16 17:20:09 +00:00
harti
dfb7ee3811 Better version of the patch in 1.117: bring a variable into local scope
to prepare for function splitting and slightly reorganise the code
in anticipation of Var_Subst returning a Buffer.

Submitted by:	Max Okumoto <okumoto@ucsd.edu> (with slight changes)
2005-02-16 12:39:32 +00:00
stefanf
03a2de3818 Fix most cases where the address of an int is passed to a function expecting a
socklen_t * argument.
2005-02-14 17:42:58 +00:00
ru
6b6b8c04f6 Expand contractions. 2005-02-13 23:45:54 +00:00
ru
1541af42f1 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
delphij
c640356af2 New order after _netcat has been changed to _nc: sort the list.
Submitted by:	ru
Pointy hat to:	me
2005-02-13 13:42:20 +00:00
harti
f744a83fcd Back out the previous commit. There is an obvious bug in it.
Pointy hat to:	harti
2005-02-13 13:33:56 +00:00
delphij
064b269fc4 Spell the variable as underscore plus their possible value, to follow
the style nearby.

Submitted by:	ru
2005-02-13 10:11:21 +00:00
delphij
8825ee8ffa Forgotten to commit this file during the last commit. Connect nc(1)
to build.
2005-02-13 07:12:23 +00:00
harti
878b2ba45f Stylistic fixes: push variable into a local context (this part is going
to be split out into a function soon). Also there is no need to write
back the colon that we have NUL-ed - the string is going to be freed
anyway.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-11 17:03:18 +00:00
harti
e6315e1667 Convert several instances of negative logic to positive logic.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-11 10:49:01 +00:00
harti
5ac91dfb2b Buffers are already NUL-terminated so there is no need to explicitely add
a NULL.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 17:01:46 +00:00
harti
be46f93f56 Mostly stylistic nits in preparation for splitting up Var_Parse:
use a more consistent style with regard to *str and str[0];
simplify code by introducing a temporary variable;
shift a break around and add braces where appropriate.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 17:00:16 +00:00
ru
42eef8eb6f Fixed usage(). 2005-02-10 16:07:23 +00:00
ru
4666872d3b Require at least one argument. 2005-02-10 16:04:22 +00:00
harti
d1c5c1813a Let the buffer just use the default size by specifying 0 as the size
instead of specifying the default size explicitely.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 14:53:29 +00:00
harti
f247b32ef0 Mark the modification of the input string (which should really be const)
with a comment.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 14:52:14 +00:00
harti
9c56ede2b6 Style nits:
Move some assignments nearer to where they actually used. Convert a loop
from a for() to a while() to make it clearer and add braces to the long
body of it. Split assignment from variable declaration.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 14:50:34 +00:00
harti
374fae4a38 Describe a pre-condition of Var_Parse().
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 14:43:22 +00:00
harti
41f26b3bb5 Remove a comment that's not actual anymore.
Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 14:41:22 +00:00
harti
1735ff6669 Fix spacing by converting mixes of space and tab to tab. Also add a number
of empty lines in appropriate places.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-10 14:39:05 +00:00
harti
7e0569095f Initialise the status variable. W_SETTERMSIG uses its value.
Submitted by:	stefanf
2005-02-10 14:32:14 +00:00
harti
ac0decfad8 Lst_Append returns void, so the other case of the ? statement
should also be void.

Submitted by:	stefanf
2005-02-10 14:25:12 +00:00
alfred
e6388323e9 back out 1.7 changes, unneeded and possibly wrong. 2005-02-10 10:44:29 +00:00
stefanf
7b37822a69 Turn K&R functions into prototypes. 2005-02-10 09:13:20 +00:00
stefanf
d65c308b85 Let the generated code include <string.h> instead of <memory.h>. 2005-02-10 08:12:38 +00:00
harti
c299702086 Use defines for character constants for open and closing braces and
parantheses. This helps editors to find its way through the horrible
mess of Var_Parse. Rewrite a for() loop into a while() to make it clearer.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-09 18:44:09 +00:00
ru
114ea39c76 Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
harti
9c4d6c6307 While working on constification temporarily disable -Werror. Things are too
twisted.
2005-02-09 13:22:02 +00:00
harti
bfa90db5b7 Untangle VarFind and, while rewriting most of the function, fix the
intendation. (A large part of the function was already at intendation 8).
2005-02-09 13:13:59 +00:00
harti
0fce40c381 Introduce VarCreate and VarDestroy functions and used them where
appropriate.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-09 09:53:28 +00:00