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>
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>
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>
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>
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>
that is now used for both the 'M'/'N' branch and the 'S' branch of
the switch statement into a common scope.
Patch: 7.102-105
Submitted by: Max Okumoto <okumoto@ucsd.edu>
paranthesis or brace) into the loop and don't leak the buffer in this
case. Remove the check for Var_Parse returning NULL - it can't.
Patch: 7.92
Submitted by: Max Okumoto <okumoto@ucsd.edu>
Return always malloc()-ed strings from VarParseShort() to get
rid of warnings when returning string constants from a non-const char *
function.
Patch: 7.90
Submitted by: Max Okumoto <okumoto@ucsd.edu>
to VarExpand down into the branches of the if as well as cleanup code.
Eliminate code that is now obviously dead.
Patch: 7.83
Submitted by: Max Okumoto <okumoto@ucsd.edu>
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>
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>
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>
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>
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>
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>
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>