Commit Graph

7563 Commits

Author SHA1 Message Date
harti
821eec0009 Style: fix indentation and <space><tab>.
Patch:		7.124

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-18 15:44:23 +00:00
harti
efa8f52f88 Split out the 'S' modifier into its own function.
Patch:		7.122,7.123

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-18 15:37:31 +00:00
harti
f00fcf68ef Convert Var_Parse to a wrapper function.
Reduce the number of arguments passed between these functions by
creating a special-purpose struct.

Patch:		7.120,7.121

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-18 15:34:07 +00:00
harti
5b2a5b84de Replace Lst_Find calls with LST_FOREACH loops. This helps in
constification und simplifies the code because the one-liner
predicates can be inlined into the code.
2005-03-18 15:25:23 +00:00
harti
3cd2d2d0d5 Replace a bogus use of Lst_Find with explicite LST_FOREACH calls
and remove the unneeded second argument to ReadMakefile.
2005-03-18 15:23:49 +00:00
harti
3754e8fb58 Fix a bug in matching suffixes. Under certain circumstances the code
would access memory before the beginning of the string to match (the
suffix match starts at the end of both the string and the suffix and
proceedes to the begin until either the start of the suffix is hit
or the character does not match). This could lead to a memcpy copying
into random memory. Fix this by checking the length of the string to
match too and replacing the Lst_Find calls with LST_FOREACH loops
(last part by me).

Submitted by:	Matt Dillon <dillon@apollo.backplane.com> (in principle)
2005-03-18 15:16:09 +00:00
harti
3d5967d365 Now that there are no users of Lst_ForEach and Lst_ForEachFrom are left
delete these two macros and all the associated stuff.
2005-03-16 16:11:11 +00:00
harti
df4f9cb09a Replace Lst_ForEach by LST_FOREACH. 2005-03-16 16:02:09 +00:00
harti
cbbd172aea Replace another bunch of Lst_ForEachs by LST_FOREACHs and simplify code. 2005-03-16 12:22:15 +00:00
phk
3ff5706695 Dike out another kvm indiscretion. 2005-03-16 10:24:16 +00:00
harti
35b09a0244 Fix a comment. 2005-03-16 08:06:28 +00:00
harti
fe00d22104 Get rid of another bunch of Lst_ForEach in favour of LST_FOREACH and
simplify code accordingly.
2005-03-16 08:04:45 +00:00
harti
0ce269a189 Ups. Revert the last commits. These have been committed by accident. 2005-03-15 15:10:51 +00:00
harti
6fc3b6df1c modifier_M: instead of going through the string twice to compute the
size of the buffer we need, just allocate the possible maximum.

Patch:		7.117

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-15 15:05:14 +00:00
harti
7bd6f53de6 Style: Move a variable from a local scope up to the begin of the function.
Rename result variable so common code becomes more visible.
Rename freePtr to freeResult to make clear what pointer must be freed.

Patch:		7.116, 7.116a

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-15 14:52:10 +00:00
phk
2116975c84 Dike out unwarranted si_udev fondling. 2005-03-15 14:30:26 +00:00
harti
384241be9f Get rid of a number of Lst_ForEach calls in favour of LST_FOREACH
and simplify the printing functions.
2005-03-15 14:28:39 +00:00
harti
84812666f6 VarParseLong: move the detection of the modifier separator ':' into
the loop. Add a comment why the 'consumed' variable is updated.
Rename lengthPtr to consumed.

Patch:		7.115

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-15 14:27:29 +00:00
harti
db06c5de06 Yet another version of passing the last line to ParseFinishLine().
It turns out that some ports use the obscure feature of spreading
a dependency block across multiple include files. While this seems
bad style, allow it for now and call said function only at end of
all input to process the really last line of everything.
2005-03-15 14:25:24 +00:00
harti
6427cb7c26 Get rid of another Lst_ForEach in favour of LST_FOREACH. Get rid
of the now unused struct LstSrc and collapes two functions into one.
2005-03-14 17:04:58 +00:00
harti
e46b6260f7 ParseModifier(): rename rw_str to value and reindent cleanup section.
ParseRestModifier() and ParseRestEnd(): move advancement of ptr to remove
a confusing calculation.
VarParseLong(): cleanup calculation of consumed.

Patch:		7.114

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-14 17:03:34 +00:00
harti
6c1fea3e9f Move the creation of a Src structure into its own function. 2005-03-14 12:04:20 +00:00
harti
65a16da8cc Split off two function from VarParseLong to handle modifiers and the
actual variable lookup. Consistently rename lengthPtr to consumed.
Update a number of comments to match the code.

Patch:		7.111-113

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-03-14 12:03:30 +00:00
harti
dffc7fe63f Convert a couple of other uses of Lst_ForEach to LST_FOREACH and
simplify code.
2005-03-14 08:29:58 +00:00
kientzle
7f4dba0f0e A handful of minor portability and style improvements. 2005-03-14 00:30:35 +00:00
kientzle
c46a8c03ea Style correction: one tab after #define. 2005-03-14 00:29:05 +00:00
kientzle
b3cbed0960 Re-unbreak the distfile target.
Also, reduce the WARNS level to 5 since different build environments
end up using different Yacc skeletons.  The BSD one does not
predeclare yyparse, the FSF one does, so it's not really possible to
consistently enforce both -Wmissing-prototypes and -Wredundant-decls.
2005-03-13 23:49:53 +00:00
kientzle
2b38f44c2f Fix a compile warning, fix the build. 2005-03-13 21:36:15 +00:00
kientzle
4949e1d1ad "make depend" with .y files is trickier than it looks. <sigh> 2005-03-13 19:55:53 +00:00
kientzle
5d0c5f694a Brain-o. Missing quote. 2005-03-13 19:44:19 +00:00
kientzle
832a345376 Add --newer-ctime, --newer-mtime, --newer-ctime-than, and --newer-mtime-than
switches to support selecting files by time of modification.

Special thanks to: Steven M. Bellovin, Rich $alz, and Jim Berets,
	authors of the public-domain getdate.y date-parsing code.
2005-03-13 18:36:24 +00:00
ceri
14adec0b92 Remove an unused #define. md5's with and without this commit match.
Approved by:	murray (mentor)
2005-03-13 17:58:31 +00:00
kientzle
0eac7627b8 Add --strip-components option, per bin/77666.
Thanks to: Sangwoo Shim
2005-03-13 04:12:30 +00:00
stefanf
8655a91f58 Use socklen_t where appropriate. 2005-03-11 14:17:12 +00:00
harti
559d1826e4 Simplify the print routines by using LST_FOREACH instead of Lst_ForEach
and inlining the small printing utility functions.
Create a function that can be used to produce printable representations
of flag words.
2005-03-11 13:24:08 +00:00
harti
d72309cdad Remove leading underscores from the pathname defines. All identifiers
with leading underscore followed by an uppercase letter are in the
implementation namespace.
2005-03-11 13:02:38 +00:00
harti
dc263e28e9 Remove the leading underscore from structure tags. All identifiers
with a leading underscore are in the implementation namespace.
2005-03-11 12:57:25 +00:00
harti
503e7ada08 Style: Fix indentation. 2005-03-11 12:40:55 +00:00
harti
364f261bed Call ParseFinishLine() also for the last line in a file. This
patch differs from the previous one in that it calls the function
only when a real file hits EOF. The bodies of .for loops are also
handled as files, but for these we don't want to end a dependency block
on the 'EOF' as in:

foo:
	do-this
.for ...
	do-something
.endfor
	do-more
2005-03-11 11:29:39 +00:00
harti
6d878c5dc2 Back out the last commit. It turns out that this breaks more than
it fixes. This should fix the buildworld breakage.
2005-03-11 07:53:32 +00:00
harti
751b56b164 Constify Var_Dump and simplify it by inlining VarPrintVar. 2005-03-10 15:38:01 +00:00
harti
e98f139ac2 Call ParseFinishLine() for the last line of a file too. 2005-03-10 15:30:09 +00:00
harti
188f70d7e9 Reorganize Suff_EndTransform to be called only for nodes for
which it is needed (transforms).
2005-03-10 14:54:47 +00:00
harti
32e1481603 Style: fix function style before working on it (mainly intendation). 2005-03-10 10:16:03 +00:00
ps
f01ea9b626 Add limits on the number of elements in the sack scoreboard both
per-connection and globally. This eliminates potential DoS attacks
where SACK scoreboard elements tie up too much memory.

Submitted by:	Raja Mukerji (raja at moselle dot com).
Reviewed by:	Mohan Srinivasan (mohans at yahoo-inc dot com).
2005-03-09 23:14:10 +00:00
novel
eb6ca0c62a Add myself.
Approved by:	krion (mentor)
2005-03-09 17:41:42 +00:00
harti
ba42fcc409 Implement a new macro LST_NEXT which is like Lst_Succ but doesn't check
for its argument to be non-NULL.
2005-03-09 16:53:31 +00:00
harti
bb218a7c02 Split SuffExpandChildren into three functions: one that skips
variables and expands archive specifications, one that expands
wild cards and a driver that loops over the children list and
expands each child if necessary replacing it with it's expansions.
2005-03-09 16:51:43 +00:00
stefanf
b4856acd04 Fix dubious C code construct. 2005-03-09 11:57:32 +00:00
harti
633c8c538c Var_Subst() cannot return NULL so there is no reason to check
for it.
2005-03-09 07:53:03 +00:00