Age | Commit message (Collapse) | Author |
|
They serve no purpose, except hiding potential bugs.
In particular, remove (ClientData) cast from macro, showing potentially
troublesome use of Hashes to store time_t.
|
|
Those casts are evil...
|
|
- suffixes can't be removed from suffList except when an explicit reset
is seen, e.g.,
.SUFFIXES:
This actually occurs seldom enough that the very small memory gain does
not justify the extra code and added complexity.
(Removing suffixes at other times, as the old code used to do, is a bug)
|
|
*If* refcounting is to be useful, the actual erasure of suffixes data
should occur when stuff is moved from the suffList to the cleanList, and
it's not at all clear whether all the extra baggage is actually any use.
How many suffixes are we talking about anyway ?
This lets gnupg build correctly without gnu-make.
|
|
|
|
|
|
- let *_MTime return booleans, as that's what they're used for, the time_t
is set as a side effect.
- use OUT_OF_DATE for a date starting point, set it at the origin of time.
|
|
|
|
|
|
avoid races.
Make use of basic Unix semantics, namely you can unlink a file while holding
open fd on the data. Avoid all the mess of having to track useless file names
around.
|
|
Silently ignoring all commands but the first set in a normal dependency
is a generic `feature' of make.
|
|
|
|
for reminding me.
|
|
make needs quite a lot more of cleaning up yet.
|
|
However, I found some more oddities while going through the scanner...
|
|
|
|
Lst_AtEnd, Lst_Concat, Lst_Remove, Lst_Replace.
Don't bother returning one.
|
|
|
|
Get rid of them.
Get rid of list.h, nothing uses it anyway.
|
|
|
|
Perform an explicit ENOENT check to keep the same error message
for known cases.
|
|
split the function specific to for.c out, and give them more sensible
arguments at the same time.
This makes .for loop handling more efficient, as we have some heuristic
to evaluate the size of the buffer needed...
|
|
|
|
- split For_Eval into For_Eval (first line of loop) / For_Accumulate
(remaining lines).
- encapsulate state into a For structure, instead of brain damaged static
variables that need copy.
Very minor performance hit, specifically, For structure is allocated with
malloc/free, instead of playing tricks with static/auto variables.
|
|
This cuts down quite a lot of malloc, since in actual use,
buffer usage is mostly static.
|
|
- CondGetArg needs to differentiate between empty strings and problems.
Returning problems as a separate boolean is cleaner anyway.
- Fix error in conditional parser which would overstep the ending 0, so
that a second zero would be needed.
|
|
Actually, one of these needs to be there, because of two bugs in cond.c
|
|
|
|
(idiotic to retrieve size every time when it's used half the time)
|
|
- Buf_Discard is only used to remove all the bytes in a buffer,
replace with Buf_Reset,
- buffer values are not read unless accessed first through Buf_GetAll,
no need to null-terminate it at every point.
- Buf_Expand need not check if the expansion is needed. That's Buf_AddChar
and Buf_AddChars responsability (otherwise, Buf_AddChar checks twice)
- Buf_Overflow only handles overflow. Adding the character is done in
every case anyway.
|
|
|
|
|
|
|
|
|
|
it is much better to keep them in the global context, marked read-only.
This also makes the next simplification possible, since var values need no
longer be free'd by client code.
(reviewed by ho@, like other patches)
|
|
- buf.c deals exclusively with chars. Be explicit about it, and remove
extraneous dumb casts to char (can hide real type errors).
- buffer sizes are size_t. Note that bp->left can never become NULL.
- Buf_GetAll is happy with a NULL pointer for the size, remove unneeded
extra pointers.
- Propagate size_t to all places where buffer functions are used.
|
|
VAR!=
specifically, properly distinguish between bad commands and empty results.
|
|
- use it to replace .for parsing with something approaching sanity.
(this removes one of the few most blatant misuses of Bufs in make.
More changes to come... patch reviewed by ho@
|
|
|
|
Problem reported by fgsch@.
|
|
(cvs file was copied from nonints.h to give a better sense of history).
|
|
|
|
Parse_String starts in the current line, but at a given line number.
.for loops yield correct line numbers, much easier to debug !
|
|
|
|
|
|
|
|
Move main prototype to main.c, as this is not used
from any other file.
Close open bug.
|
|
perform the exit tests before checking for EOF.
This makes behavior while scanning tests more regular.
e.g,
.if defined(UVM) && ${UVM} == "yes"
...
.endif
without a final newline at the endif should always work,
instead of being an error half the time...
|
|
Temporary solution, until Todd or somebody else *finally* starts reviewing
the first patches of the 20,000 lines diff I currently have...
|
|
check that v is PRECISELY A.
Other BSDs, take notice.
|