summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
Commit message (Collapse)AuthorAgeFilesLines
* Reverse a condition so that the else clause can be changedharti2005-03-011-39/+38
| | | | | | | | to a fallthrough. Patch: 7.82 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* VarParseLong: Move the initialisation of dynamic up which savesharti2005-02-281-3/+7
| | | | | | | | | an else clause. Move the assignment to the lengthPtr down to just before the return statements. Patch: 7.81 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Buf_GetAll wants a pointer as its second argument, not a boolean -harti2005-02-281-1/+1
| | | | | | replace FALSE by NULL. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Don't modify the input string in VarParseLong(). It is notharti2005-02-281-15/+6
| | | | | | | | | necessary to NUL-terminated it, because we know the lengths from the pointers. Patch: 7.80 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Major clean up and split the Var_Parse monster function into threeharti2005-02-261-676/+714
| | | | | | | | | functions: one for the single letter variables, one for the others and one that does the recursive expansion. Patches: 7.68-7.79 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Change the return value of Var_Subst to return a Buffer insteadharti2005-02-259-88/+182
| | | | | | | | of a char *. Patch: 7.49 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Var_Parse: Separate different error states by introducing an else blockharti2005-02-241-64/+54
| | | | | | | | | | | | after a return. Move assignments to {freePtr, dynamic, start} closer to the return statements to clarify which variables are actually used for communication between the losely coupled blocks of the code. Clear up an if-expression to make common structures of the conditions clearer. Use strchr instead of switch statements to check for a character beeing a member of a set. Patches: 7-62.2, 7-62.3, 7-64, 7-65.1, 7-65.2 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Push assignments to just before the returns from the function toharti2005-02-241-16/+18
| | | | | | | get it clearer what variables are actually needed. Patches: 7.62.2, 7.62.3 Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Fix wording of a comment.harti2005-02-241-1/+1
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Replace the calls to Lst_ForEach with the new LST_FOREACH macro andharti2005-02-242-9/+24
| | | | | fix the prototype for Compat_RunCommand to take the actual argument types instead of void *.
* Use the LST_FOREACH macro instead of the Lst_ForEach functionharti2005-02-231-40/+25
| | | | | and so get rid of the ForExec helper function by inlining it into For_Run.
* Style: fix indent, use tabs instead of space+tab for aligning things.harti2005-02-231-147/+159
| | | | Add a couple of comments.
* Fix the indendation of some multi-line comments.harti2005-02-231-22/+22
| | | | Noted by: Max Okumoto <okumoto@ucsd.edu>
* Fix the prototypes by addings some constness. This should have beenharti2005-02-221-2/+2
| | | | committed together with the commit to dir.c:1.48.
* Use the new LST_FOREACH macro throughout the file and replace calls toharti2005-02-221-70/+20
| | | | Lst_ForEach and Lst_Find.
* Invent the LST_FOREACH macro for looping through a list. In contrastharti2005-02-221-0/+4
| | | | | | | 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.
* Style: fix indendation to be 8 and use tabulators. Fix lines longer thanharti2005-02-211-693/+717
| | | | | 80 characters and slightly reorder functions to get rid of static prototypes.
* Forgot to set *freePtr to FALSE in another place.harti2005-02-211-0/+1
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Fix a bug in handling archive members: when a member was not foundharti2005-02-211-15/+11
| | | | | | | | 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.
* Push the assignments of some variables down into the sub-blocks whereharti2005-02-181-4/+16
| | | | | | | 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>
* Push down variables into local scope in Var_Parse to make theirharti2005-02-181-7/+6
| | | | | | liveness clear for splitting up this monster function. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Whitespace cleanup: substitute mixed tabs and spaces by canonicalharti2005-02-171-16/+17
| | | | whitespace and line up some variable definitions.
* Move error case to begin of if-else chain. Do not needless initializeharti2005-02-171-14/+19
| | | | | | | startc, but only at the place where the initialisation is needed. Remove a needless else. Submitted by: Max Okumoto <okumoto@ucsd.edu> (partly)
* Fix two typos in comments.harti2005-02-171-2/+2
| | | | Submitted by: ru & Max Okumoto <okumoto@ucsd.edu>
* Sort out the error case that a single '$' was passed a little bitharti2005-02-171-6/+11
| | | | | | earlier instead of mixing its handling with other cases. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Mostly stylistic issues: move a variable into local scope, makeharti2005-02-161-36/+48
| | | | | | condition positive and fix long lines. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Better version of the patch in 1.117: bring a variable into local scopeharti2005-02-161-10/+15
| | | | | | | 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)
* Expand *n't contractions.ru2005-02-131-5/+5
|
* Back out the previous commit. There is an obvious bug in it.harti2005-02-131-12/+10
| | | | Pointy hat to: harti
* Stylistic fixes: push variable into a local context (this part is goingharti2005-02-111-10/+12
| | | | | | | | 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>
* Convert several instances of negative logic to positive logic.harti2005-02-111-85/+84
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Buffers are already NUL-terminated so there is no need to explicitely addharti2005-02-101-1/+0
| | | | | | a NULL. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Mostly stylistic nits in preparation for splitting up Var_Parse:harti2005-02-101-15/+19
| | | | | | | | 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>
* Let the buffer just use the default size by specifying 0 as the sizeharti2005-02-101-1/+1
| | | | | | instead of specifying the default size explicitely. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Mark the modification of the input string (which should really be const)harti2005-02-101-1/+1
| | | | | | with a comment. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Style nits:harti2005-02-101-7/+13
| | | | | | | | 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>
* Describe a pre-condition of Var_Parse().harti2005-02-101-0/+3
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Remove a comment that's not actual anymore.harti2005-02-101-3/+0
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Fix spacing by converting mixes of space and tab to tab. Also add a numberharti2005-02-104-41/+46
| | | | | | of empty lines in appropriate places. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Initialise the status variable. W_SETTERMSIG uses its value.harti2005-02-101-0/+1
| | | | Submitted by: stefanf
* Lst_Append returns void, so the other case of the ? statementharti2005-02-101-1/+1
| | | | | | should also be void. Submitted by: stefanf
* Use defines for character constants for open and closing braces andharti2005-02-091-11/+22
| | | | | | | 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>
* While working on constification temporarily disable -Werror. Things are tooharti2005-02-091-0/+1
| | | | twisted.
* Untangle VarFind and, while rewriting most of the function, fix theharti2005-02-091-45/+51
| | | | intendation. (A large part of the function was already at intendation 8).
* Introduce VarCreate and VarDestroy functions and used them whereharti2005-02-091-58/+51
| | | | | | appropriate. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Remove an unneeded check.harti2005-02-071-1/+4
|
* Introduce a typedef for variable value modifation functions and use itharti2005-02-072-14/+12
| | | | | | where appropriate. Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Make the intention of a loop clearer.harti2005-02-071-4/+5
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Introduce Buf_StripNewLines() and use it where appropriate.harti2005-02-076-58/+70
| | | | Submitted by: Max Okumoto <okumoto@ucsd.edu>
* Invent a Buf_AppendRange function that appends a non-NUL-terminated stringharti2005-02-076-12/+22
| | | | | | | given by a pointer to the start of the string and a pointer one behind the end. Submitted by: Max Okumoto <okumoto@ucsd.edu>
OpenPOWER on IntegriCloud