Lines Matching refs:command
116 static cmd_line_t command; variable
237 if (command.returns[0].return_index == -1)
243 vars[command.returns[0].return_index].name,
244 returns_enum_names[command.returns[1].return_type]);
247 if (((command.returns[1].return_type == ret_byte) &&
248 (vars[command.returns[0].return_index].type != ret_byte)) ||
249 vars[command.returns[0].return_index].type != ret_string)
252 vars[command.returns[0].return_index].type],
253 vars[command.returns[0].return_index].type,
254 returns_enum_names[command.returns[1].return_type],
255 command.returns[1].return_type);
257 switch (command.returns[1].return_type) {
260 command.returns[0].return_index, 0);
265 command.returns[0].return_index, 0);
270 command.returns[0].return_index, 0);
275 command.returns[0].return_index, 1);
282 (const char *)command.returns[1].return_value,
284 vars[command.returns[0].return_index].value);
287 command.returns[1].return_value,
288 command.returns[0].return_index, 0);
292 vptr = &vars[command.returns[0].return_index];
296 validate_byte(&retvar, &command.returns[1], 0);
403 if (command.function != NULL)
404 free(command.function);
406 command.function = malloc(strlen($1) + 1);
407 if (command.function == NULL)
409 strcpy(command.function, $1);
587 command.function, str, args_enum_names[arg_type]); in assign_arg()
622 temp = realloc(command.args, sizeof(*temp) * (command.nargs + 1)); in assign_arg()
625 command.args = temp; in assign_arg()
626 memcpy(&command.args[command.nargs], &cur, sizeof(args_t)); in assign_arg()
627 command.nargs++; in assign_arg()
669 temp = realloc(command.returns, sizeof(*temp) * (command.nrets + 1)); in assign_rets()
672 command.returns = temp; in assign_rets()
673 memcpy(&command.returns[command.nrets], &cur, sizeof(returns_t)); in assign_rets()
674 command.nrets++; in assign_rets()
870 do_input = check_function_table(command.function, input_functions, in do_function_call()
996 returns_enum_names[command.returns[i].return_type]); in do_function_call()
1001 if (command.returns[i].return_type != ret_var) { in do_function_call()
1004 vars[command.returns[i].return_index].len = in do_function_call()
1006 vars[command.returns[i].return_index].value = in do_function_call()
1008 vars[command.returns[i].return_index].type = in do_function_call()
1029 fprintf(stderr, "calling function >%s<\n", command.function); in write_func_and_args()
1032 write_cmd_pipe(command.function); in write_func_and_args()
1033 for (i = 0; i < command.nargs; i++) { in write_func_and_args()
1034 if (command.args[i].arg_type == arg_var) in write_func_and_args()
1035 write_cmd_pipe_args(command.args[i].arg_type, in write_func_and_args()
1036 &vars[command.args[i].var_index]); in write_func_and_args()
1038 write_cmd_pipe_args(command.args[i].arg_type, in write_func_and_args()
1039 &command.args[i]); in write_func_and_args()
1057 free(command.function); in init_parse_variables()
1058 for (i = 0; i < command.nrets; i++) { in init_parse_variables()
1059 if (command.returns[i].return_type == ret_number) in init_parse_variables()
1060 free(command.returns[i].return_value); in init_parse_variables()
1062 free(command.returns); in init_parse_variables()
1064 for (i = 0; i < command.nargs; i++) { in init_parse_variables()
1065 if (command.args[i].arg_type != arg_var) in init_parse_variables()
1066 free(command.args[i].arg_string); in init_parse_variables()
1068 free(command.args); in init_parse_variables()
1082 command.function = NULL; in init_parse_variables()
1083 command.nargs = 0; in init_parse_variables()
1084 command.args = NULL; in init_parse_variables()
1085 command.nrets = 0; in init_parse_variables()
1086 command.returns = NULL; in init_parse_variables()
1116 if ((command.returns[i].return_type != ret_byte) && in validate()
1117 (command.returns[i].return_type != ret_err) && in validate()
1118 (command.returns[i].return_type != ret_ok)) { in validate()
1124 returns_enum_names[command.returns[i].return_type], in validate()
1131 switch (command.returns[i].return_type) { in validate()
1150 validate_return(command.returns[i].return_value, in validate()
1159 validate_byte(&command.returns[i], byte_response, 0); in validate()
1179 varp = &vars[command.returns[i].return_index]; in validate_reference()
1182 if (command.returns[i].return_type != ret_byte) in validate_reference()
1319 retval = &command.returns[ret]; in validate_variable()
1320 varptr = &vars[command.returns[ret].return_index]; in validate_variable()