Category : ansi-c

I write a command interpreter that parses a command and its arguments and I would like to find a way to pass them to various non-variadic functions like this: typedef boolean (*CommandExecuteCallback)(char* arg1, …); // n argument variadic function char command[CMD_WORD_MAXLEN+1]; // currently parsed command char args[CMD_MAX_ARGUMENTS][CMD_WORD_MAXLEN+1]; // currently parsed arguments const char *commands[CMD_MAX_COMMANDS]; // ..

Read more