Lines Matching defs: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
84 * Var_SetExpand Set the value of the variable, creating it if
90 * necessary. A space is placed between the old value and
97 * Var_Value Return the unexpanded value of a variable, or NULL if
149 * Variables are defined using one of the VAR=value assignments. Their
150 * value can be queried by expressions such as $V, ${VAR}, or with modifiers
176 /* The unexpanded value of the variable. */
191 * Appending to its value depends on the scope, see var-op-append.mk.
196 * The variable value cannot be changed anymore, and the variable
284 * Special return value for Var_Parse, indicating a parse error. It may be
291 * Special return value for Var_Parse, indicating an undefined variable in
401 VarNew(FStr name, const char *value,
404 size_t value_len = strlen(value);
408 Buf_AddBytes(&var->val, value, value_len);
520 /* If the variable is short-lived, free it, including its value. */
533 ValueDescription(const char *value)
535 if (value[0] == '\0')
537 if (ch_isspace(value[strlen(value) - 1]))
542 /* Add a new variable of the given name and value to the given scope. */
544 VarAdd(const char *name, const char *value, GNode *scope, VarSetFlags flags)
547 Var *v = VarNew(FStr_InitRefer(/* aliased to */ he->key), value,
551 scope->name, name, value, ValueDescription(value));
571 v = he->value;
767 * children see a correctly incremented value.
782 Var *var = hi.entry->value;
973 /* Set the variable to the value; the name is not expanded. */
1013 * wrong value.
1083 * replace its value.
1106 Global_Set(const char *name, const char *value)
1108 Var_Set(SCOPE_GLOBAL, name, value);
1118 Global_Set_ReadOnly(const char *name, const char *value)
1120 Var_SetWithFlags(SCOPE_GLOBAL, name, value, VAR_SET_READONLY);
1124 * Append the value to the named variable.
1127 * and the given value are appended.
1162 * scope, add a space and the value, otherwise set the variable to the value.
1188 Global_Append(const char *name, const char *value)
1190 Var_Append(SCOPE_GLOBAL, name, value);
1225 * Return the unexpanded value of the given variable in the given scope,
1233 * The value if the variable exists, NULL if it doesn't.
1234 * The value is valid until the next modification to any variable.
1240 char *value;
1248 value = v->val.data;
1252 return FStr_InitOwn(value);
1271 * Return the unexpanded variable value from this node, without trying to look
1892 * parsing the modifier, evaluating it and finally updating the value of the
1926 * only noticeable effect is that they update the value of the expression.
1929 * Evaluating the modifier usually takes the current value of the
1930 * expression from ch->expr->value, or the variable name from ch->var->name,
1931 * and stores the result back in ch->expr->value via Expr_SetValueOwn or
1972 FStr value;
2010 * Whether some modifiers that otherwise split the variable value
2011 * into words, like :S and :C, treat the variable value as a single
2027 return expr->value.str;
2037 Expr_SetValue(Expr *expr, FStr value)
2039 FStr_Done(&expr->value);
2040 expr->value = value;
2044 Expr_SetValueOwn(Expr *expr, char *value)
2046 Expr_SetValue(expr, FStr_InitOwn(value));
2050 Expr_SetValueRefer(Expr *expr, const char *value)
2052 Expr_SetValue(expr, FStr_InitRefer(value));
2412 /* XXX: Consider restoring the previous value instead of deleting. */
2546 "Invalid time value \"%s\"", arg.str);
3487 * The ::= modifiers are special in that they do not read the variable value
3501 * ::=<str> Assigns <str> as the new value of variable.
3502 * ::?=<str> Assigns <str> as value of variable if
3505 * ::!=<cmd> Assigns output of <cmd> as the new value of
3572 * remember current value
3606 * Apply the given function to each word of the variable value,
3782 "Evaluating modifier ${%s:%c%s} on value \"%s\"\n",
3789 "Evaluating modifier ${%s:%c%s} on value \"%s\" (%s, %s)\n",
3798 const char *value = Expr_Str(expr);
3799 const char *quot = value == var_Error ? "" : "\"";
3804 quot, value == var_Error ? "error" : value, quot);
3810 quot, value == var_Error ? "error" : value, quot,
3986 "modifier \"%.*s\" of variable \"%s\" with value \"%s\"",
4022 /* Apply any modifiers (such as :Mpattern or :@var@loop@ or :Q or ::=value). */
4399 * instead of the actually computed value.
4416 #define Expr_Init(name, value, emode, scope, defined) \
4417 (Expr) { name, value, emode, scope, defined }
4420 Expr_Init(const char *name, FStr value,
4426 expr.value = value;
4435 * Expressions of the form ${:U...} with a trivial value are often generated
4464 * the modifiers to the value of the expression.
4475 * TODO: After a parse error, the value of *pp is
4480 * return The value of the expression, never NULL.
4552 * FIXME: This assignment creates an alias to the current value of the
4553 * variable. This means that as long as the value of the expression
4554 * stays the same, the value of the variable must not change, and the
4557 * while its value is still being used:
4559 * VAR= value
4565 * At the bottom of this function, the resulting value is compared to
4566 * the then-current value of the variable. This might also invoke
4569 expr.value = FStr_InitRefer(v->val.data);
4578 * the variable value.
4614 * discard the actual value and return an error marker
4624 if (expr.value.str == v->val.data) {
4626 expr.value.freeIt = v->val.data;
4633 return expr.value;