Lines Matching refs:argv

36     Value* v = expr->fn(expr->name, state, expr->argc, expr->argv);  in Evaluate()
49 return expr->fn(expr->name, state, expr->argc, expr->argv); in EvaluateValue()
67 Value* ConcatFn(const char* name, State* state, int argc, Expr* argv[]) { in ConcatFn() argument
79 strings[i] = Evaluate(state, argv[i]); in ConcatFn()
102 Value* IfElseFn(const char* name, State* state, int argc, Expr* argv[]) { in IfElseFn() argument
108 char* cond = Evaluate(state, argv[0]); in IfElseFn()
115 return EvaluateValue(state, argv[1]); in IfElseFn()
119 return EvaluateValue(state, argv[2]); in IfElseFn()
126 Value* AbortFn(const char* name, State* state, int argc, Expr* argv[]) { in AbortFn() argument
129 msg = Evaluate(state, argv[0]); in AbortFn()
140 Value* AssertFn(const char* name, State* state, int argc, Expr* argv[]) { in AssertFn() argument
143 char* v = Evaluate(state, argv[i]); in AssertFn()
151 int len = argv[i]->end - argv[i]->start; in AssertFn()
155 memcpy(err_src + prefix_len, state->script + argv[i]->start, len); in AssertFn()
165 Value* SleepFn(const char* name, State* state, int argc, Expr* argv[]) { in SleepFn() argument
166 char* val = Evaluate(state, argv[0]); in SleepFn()
175 Value* StdoutFn(const char* name, State* state, int argc, Expr* argv[]) { in StdoutFn() argument
178 char* v = Evaluate(state, argv[i]); in StdoutFn()
189 int argc, Expr* argv[]) { in LogicalAndFn() argument
190 char* left = Evaluate(state, argv[0]); in LogicalAndFn()
194 return EvaluateValue(state, argv[1]); in LogicalAndFn()
201 int argc, Expr* argv[]) { in LogicalOrFn() argument
202 char* left = Evaluate(state, argv[0]); in LogicalOrFn()
206 return EvaluateValue(state, argv[1]); in LogicalOrFn()
213 int argc, Expr* argv[]) { in LogicalNotFn() argument
214 char* val = Evaluate(state, argv[0]); in LogicalNotFn()
222 int argc, Expr* argv[]) { in SubstringFn() argument
223 char* needle = Evaluate(state, argv[0]); in SubstringFn()
225 char* haystack = Evaluate(state, argv[1]); in SubstringFn()
237 Value* EqualityFn(const char* name, State* state, int argc, Expr* argv[]) { in EqualityFn() argument
238 char* left = Evaluate(state, argv[0]); in EqualityFn()
240 char* right = Evaluate(state, argv[1]); in EqualityFn()
252 Value* InequalityFn(const char* name, State* state, int argc, Expr* argv[]) { in InequalityFn() argument
253 char* left = Evaluate(state, argv[0]); in InequalityFn()
255 char* right = Evaluate(state, argv[1]); in InequalityFn()
267 Value* SequenceFn(const char* name, State* state, int argc, Expr* argv[]) { in SequenceFn() argument
268 Value* left = EvaluateValue(state, argv[0]); in SequenceFn()
271 return EvaluateValue(state, argv[1]); in SequenceFn()
274 Value* LessThanIntFn(const char* name, State* state, int argc, Expr* argv[]) { in LessThanIntFn() argument
283 if (ReadArgs(state, argv, 2, &left, &right) < 0) return NULL; in LessThanIntFn()
307 int argc, Expr* argv[]) { in GreaterThanIntFn() argument
315 temp[0] = argv[1]; in GreaterThanIntFn()
316 temp[1] = argv[0]; in GreaterThanIntFn()
321 Value* Literal(const char* name, State* state, int argc, Expr* argv[]) { in Literal() argument
332 e->argv = malloc(count * sizeof(Expr*)); in Build()
335 e->argv[i] = va_arg(v, Expr*); in Build()
403 int ReadArgs(State* state, Expr* argv[], int count, ...) { in ReadArgs() argument
409 args[i] = Evaluate(state, argv[i]); in ReadArgs()
429 int ReadValueArgs(State* state, Expr* argv[], int count, ...) { in ReadValueArgs() argument
435 args[i] = EvaluateValue(state, argv[i]); in ReadValueArgs()
456 char** ReadVarArgs(State* state, int argc, Expr* argv[]) { in ReadVarArgs() argument
460 args[i] = Evaluate(state, argv[i]); in ReadVarArgs()
477 Value** ReadValueVarArgs(State* state, int argc, Expr* argv[]) { in ReadValueVarArgs() argument
481 args[i] = EvaluateValue(state, argv[i]); in ReadValueVarArgs()