Lines Matching refs:value

74  * Variables are set using lines of the form VAR=value.  Both the variable
75 * name and the value can contain references to other variables, by using
80 * Var_SetExpand Set the value of the variable, creating it if
86 * necessary. A space is placed between the old value and
93 * Var_Value Return the unexpanded value of a variable, or NULL if
136 * Variables are defined using one of the VAR=value assignments. Their
137 * value can be queried by expressions such as $V, ${VAR}, or with modifiers
163 /* The unexpanded value of the variable. */
178 * Appending to its value depends on the scope, see var-op-append.mk.
183 * The variable value cannot be changed anymore, and the variable
276 const FStr *value;
289 * Special return value for Var_Parse, indicating a parse error. It may be
296 * Special return value for Var_Parse, indicating an undefined variable in
352 EvalStack_Push(EvalStackElementKind kind, const char *str, const FStr *value)
361 evalStack.elems[evalStack.len].value = value;
398 const char* value = elem->value != NULL
400 ? elem->value->str : NULL;
406 if (value != NULL) {
407 Buf_AddStr(buf, "\" with value \"");
408 Buf_AddStr(buf, value);
416 VarNew(FStr name, const char *value,
419 size_t value_len = strlen(value);
423 Buf_AddBytes(&var->val, value, value_len);
536 /* If the variable is short-lived, free it, including its value. */
549 ValueDescription(const char *value)
551 if (value[0] == '\0')
553 if (ch_isspace(value[strlen(value) - 1]))
558 /* Add a new variable of the given name and value to the given scope. */
560 VarAdd(const char *name, const char *value, GNode *scope, VarSetFlags flags)
563 Var *v = VarNew(FStr_InitRefer(/* aliased to */ he->key), value,
567 scope->name, name, value, ValueDescription(value));
587 v = he->value;
625 Var *v = hi.entry->value;
803 * children see a correctly incremented value.
818 Var *var = hi.entry->value;
1012 /* Set the variable to the value; the name is not expanded. */
1052 * wrong value.
1061 "as the value wouldn't change\n",
1141 * replace its value.
1164 Global_Set(const char *name, const char *value)
1166 Var_Set(SCOPE_GLOBAL, name, value);
1176 Global_Set_ReadOnly(const char *name, const char *value)
1178 Var_SetWithFlags(SCOPE_GLOBAL, name, value, VAR_SET_NONE);
1183 * Append the value to the named variable.
1186 * and the given value are appended.
1225 * scope, add a space and the value, otherwise set the variable to the value.
1251 Global_Append(const char *name, const char *value)
1253 Var_Append(SCOPE_GLOBAL, name, value);
1284 * Return the unexpanded value of the given variable in the given scope,
1292 * The value if the variable exists, NULL if it doesn't.
1293 * The value is valid until the next modification to any variable.
1299 char *value;
1307 value = v->val.data;
1311 return FStr_InitOwn(value);
1330 * Return the unexpanded variable value from this node, without trying to look
1935 * parsing the modifier, evaluating it and finally updating the value of the
1969 * only noticeable effect is that they update the value of the expression.
1972 * Evaluating the modifier usually takes the current value of the
1973 * expression from ch->expr->value, or the variable name from ch->var->name,
1974 * and stores the result back in ch->expr->value via Expr_SetValueOwn or
2009 FStr value;
2047 * Whether some modifiers that otherwise split the variable value
2048 * into words, like :S and :C, treat the variable value as a single
2064 return expr->value.str;
2074 Expr_SetValue(Expr *expr, FStr value)
2076 FStr_Done(&expr->value);
2077 expr->value = value;
2081 Expr_SetValueOwn(Expr *expr, char *value)
2083 Expr_SetValue(expr, FStr_InitOwn(value));
2087 Expr_SetValueRefer(Expr *expr, const char *value)
2089 Expr_SetValue(expr, FStr_InitRefer(value));
2430 /* XXX: Consider restoring the previous value instead of deleting. */
2569 "Invalid time value \"%s\"", arg.str);
3529 * The ::= modifiers are special in that they do not read the variable value
3543 * ::=<str> Assigns <str> as the new value of variable.
3544 * ::?=<str> Assigns <str> as value of variable if
3547 * ::!=<cmd> Assigns output of <cmd> as the new value of
3569 const char *value = op[0] == '=' ? op + 1 : op + 2;
3575 (int)strcspn(value, ":)}"), value,
3576 (int)(value - mod), mod);
3622 * remember current value
3656 * Apply the given function to each word of the variable value,
3864 "Evaluating modifier ${%s:%c%s} on value \"%s\"\n",
3871 "Evaluating modifier ${%s:%c%s} on value \"%s\" (%s, %s)\n",
3880 const char *value = Expr_Str(expr);
3884 expr->name, (int)(p - mod), mod, value);
3889 expr->name, (int)(p - mod), mod, value,
4108 /* Apply any modifiers (such as :Mpattern or :@var@loop@ or :Q or ::=value). */
4503 * instead of the actually computed value.
4520 #define Expr_Init(name, value, emode, scope, defined) \
4521 (Expr) { name, value, emode, scope, defined }
4524 Expr_Init(const char *name, FStr value,
4530 expr.value = value;
4539 * Expressions of the form ${:U...} with a trivial value are often generated
4568 * the modifiers to the value of the expression.
4579 * TODO: After a parse error, the value of *pp is
4584 * return The value of the expression, never NULL.
4660 * FIXME: This assignment creates an alias to the current value of the
4661 * variable. This means that as long as the value of the expression
4662 * stays the same, the value of the variable must not change, and the
4665 * while its value is still being used:
4667 * VAR= value
4673 * At the bottom of this function, the resulting value is compared to
4674 * the then-current value of the variable. This might also invoke
4677 expr.value = FStr_InitRefer(v->val.data);
4682 EvalStack_Push(VSK_VARNAME, expr.name, &expr.value);
4684 EvalStack_Push(VSK_EXPR, start, &expr.value);
4688 * the variable value.
4717 FStr value = EvalUndefined(dynamic, start, p, varname, emode,
4719 Expr_SetValue(&expr, value);
4725 if (expr.value.str == v->val.data) {
4727 expr.value.freeIt = v->val.data;
4733 return expr.value;