History log of /openbsd/usr.bin/make/var.c (Results 26 – 50 of 106)
Revision Date Author Comments
# 76411979 03-Nov-2007 deraadt <deraadt@openbsd.org>

fix some lint FALLTHROUGH


# 47a64e1a 17-Sep-2007 espie <espie@openbsd.org>

more blank space removal


# da783623 17-Sep-2007 espie <espie@openbsd.org>

more zap spaces


# 2ef67a92 17-Sep-2007 espie <espie@openbsd.org>

zap more spaces at end of line


# cbd06537 17-Sep-2007 espie <espie@openbsd.org>

kill extra spaces at end of line


# e790ff59 16-Sep-2007 espie <espie@openbsd.org>

remove warnings


# 1ef8d392 16-Sep-2007 espie <espie@openbsd.org>

remove dead code: #define RECHECK is always on


# c51bd17e 30-Jul-2007 espie <espie@openbsd.org>

introduce a Var_Substi to substitute on intervals.
Since we don't really know how to change Var_Subst and dependent functions,
we cheat, and copy the string to a buffer instead.

Clean-up the parser

introduce a Var_Substi to substitute on intervals.
Since we don't really know how to change Var_Subst and dependent functions,
we cheat, and copy the string to a buffer instead.

Clean-up the parser a bit: reorganize the include files lookup function:
introduce a resolve_include_filename function that figures out the full name
of the file, introduce a handle_include_file that does all the include file
handling, and rename the functions into handle_xxx_include, so that we
can remove most comments.

Rename ParseIsCond into handle_bsd_command, cut most of its code into
constituent functions.

Semantic changes:
- follow the rules that, if an optional construct does not parse correctly,
then it's not a real extension, and give the normal parser a chance to figure
it out. If the syntax checks out, semantic errors ARE real errors.
- allow variables to not be defined in include file names, no reason not to.

okay miod@

show more ...


# 5a5ca93e 30-Jul-2007 espie <espie@openbsd.org>

everywhere except in Var_Parse, we always add/append variables to the
VAR_GLOBAL context, so make it the common case: rename the basic functions
to Var_Set_with_ctxt/Var_Append_with_ctxt, define Var_

everywhere except in Var_Parse, we always add/append variables to the
VAR_GLOBAL context, so make it the common case: rename the basic functions
to Var_Set_with_ctxt/Var_Append_with_ctxt, define Var_Set and Var_Append
as macros that specify VAR_GLOBAL, and use these.

okay miod@

show more ...


# 25733b1e 30-Jul-2007 espie <espie@openbsd.org>

now that it's clean enough, one can extract some common code from
Var_Parse and Var_ParseSkip (the code that figures out the variable name
up to eventual modifiers).

okay miod@


# c9944a33 24-Jul-2007 espie <espie@openbsd.org>

zap unused variable


# 0f4e4af8 24-Jul-2007 espie <espie@openbsd.org>

simplify computations in the var module: instead of advancing a char *
and keeping track of a length, we just advance the char *, and ditch
the length. We can still get the length at the end of the t

simplify computations in the var module: instead of advancing a char *
and keeping track of a length, we just advance the char *, and ditch
the length. We can still get the length at the end of the top-level
functions to satisfy existing interfaces.

Much simpler code, less error-prone.

Okay millert@

show more ...


# 25a3fea3 24-Jul-2007 espie <espie@openbsd.org>

move the code that grabs a value in Var_Parse in its own function,
get_expanded_value.

Extend the code a bit to be much more thorough in case of a recursive
expansion: shows exactly the cycle of var

move the code that grabs a value in Var_Parse in its own function,
get_expanded_value.

Extend the code a bit to be much more thorough in case of a recursive
expansion: shows exactly the cycle of variable names involved.

okay millert@

show more ...


# 34b15a7f 24-Jul-2007 espie <espie@openbsd.org>

change Var_ParseSkip API to increment the position instead of returning a
length, simplifies code.

(warns a bit, symptom of some further issues to fix).

okay millert@


# 09bb8d6b 22-Jul-2007 espie <espie@openbsd.org>

make sure loop variables use their own buffers.
(causes .for loops to give weird results very infrequently, memory handling
was slightly wrong, but not enough to break things thoroughly).
noticed by

make sure loop variables use their own buffers.
(causes .for loops to give weird results very infrequently, memory handling
was slightly wrong, but not enough to break things thoroughly).
noticed by naddy@

show more ...


# 68636f61 20-Jul-2007 espie <espie@openbsd.org>

big clean-up patch:
- rename a few functions in var.c to names that make more sense.
- introduce Var_Deletei because it makes more sense.
- rewrite .for loops to use a local LoopVar construct to avoi

big clean-up patch:
- rename a few functions in var.c to names that make more sense.
- introduce Var_Deletei because it makes more sense.
- rewrite .for loops to use a local LoopVar construct to avoid looking up more
stuff.
- reformat var.c to near K&R
- rewrite most comments in var.c

shown to a few people. millert@ gave me his okay since it passes through
ports correctly.

show more ...


# a5661848 20-Jul-2007 espie <espie@openbsd.org>

reorder stuff in var.c so that the next patch is more readable.


# 93a10c24 08-Jul-2007 espie <espie@openbsd.org>

rename variable to errorIsOkay. What does oldVars mean anyway ?


# 418c7092 08-Jul-2007 espie <espie@openbsd.org>

missed part: add check to avoid poison checking inexistent local vars,
and do for loops for real.


# d88ab755 08-Jul-2007 espie <espie@openbsd.org>

A set of big related changes. okay millert@, tested further by kettenis@
and matthieu@

This all revolves around putting ALL global variables into one single big
hash, and using flags. This removes s

A set of big related changes. okay millert@, tested further by kettenis@
and matthieu@

This all revolves around putting ALL global variables into one single big
hash, and using flags. This removes some impossible to understand stuff,
like old varfind, and allows for some nice stuff.
- each time we reference a global variable, we create it, possibly as a dummy
variable.
- each time we go to the environment, we remember it, thus we no longer go
back to it.

Lists of dependant changes:
- isolate changes to oldVars and checkEnvFirst.
- remove VAR_CMD and VAR_GLOBAL contexts. The only distinction is in parsevar.
Split Parse_DoVar into Parse_DoVar and Parse_CmdlineVar
- rework var modules around obtain_global_var, observe flags in various
functions like Var_Value and Var_Seti.
- Var_Seti/Var_Appendi are almost the same code, use that internally.
- add magic to handle the very special SHELL variable.
- introduce Var_Definedi for the cases where we don't want the actual
value, to simplify tests.
- add keyword .poison, parse it and set global flags accordingly.
- do poison_checks where needed.
- document poison.
- in for loops, set variable temporarily, so that Var_SubstVar will also
substitute it in varmodifiers expressions.

show more ...


# 60f57cb7 02-Jan-2007 espie <espie@openbsd.org>

VarDelete is no longer used by list functions, so let it do type-checking
correctly.


# 0b7a013e 20-Jan-2006 espie <espie@openbsd.org>

use stdint.h where appropriate. okay millert@


# ad2b054b 07-Apr-2004 espie <espie@openbsd.org>

ISO function declarations, trim a few comments, rename a few variables to
more explicit/more consistent names.

okay otto@


# 75a71628 07-Oct-2003 fgsch <fgsch@openbsd.org>

- check if result is valid before using it.
- correctly set *freePtr, not freePtr.
input and ok espie@.


# f75387cb 03-Jun-2003 millert <millert@openbsd.org>

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


12345