version 1.62, 2007/07/08 17:44:20 |
version 1.63, 2007/07/08 17:49:55 |
|
|
|
|
idx = quick_lookup(name.s, &name.e, &k); |
idx = quick_lookup(name.s, &name.e, &k); |
v = varfind(name.s, name.e, ctxt, idx, k); |
v = varfind(name.s, name.e, ctxt, idx, k); |
if (v->flags & POISONS) |
if (v != NULL && (v->flags & POISONS) != 0) |
poison_check(v); |
poison_check(v); |
if (v != NULL && (v->flags & VAR_DUMMY) == 0) { |
if (v != NULL && (v->flags & VAR_DUMMY) == 0) { |
if (v->flags & VAR_IN_USE) |
if (v->flags & VAR_IN_USE) |
|
|
const char *var, /* Named variable */ |
const char *var, /* Named variable */ |
const char *val) /* Its value */ |
const char *val) /* Its value */ |
{ |
{ |
|
/* we save the old value and affect the new value temporarily */ |
|
Var old; |
|
const char *ename = NULL; |
|
uint32_t k; |
|
Var *me; |
|
k = ohash_interval(var, &ename); |
|
me = obtain_global_var(var, ename, k); |
|
old = *me; |
|
var_init_string(me, val); |
|
me->flags = VAR_SEEN_ENV; |
|
|
assert(*var != '\0'); |
assert(*var != '\0'); |
|
|
|
|
} |
} |
Buf_AddString(buf, val); |
Buf_AddString(buf, val); |
} |
} |
|
*me = old; |
} |
} |
|
|
static void |
static void |