argvs.h 601 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#ifndef __ARGVS__
#define __ARGVS__

/********/
#define UNUSED       __attribute__((__unused__))
#define COMMAND_ARGS int argc UNUSED, char **argv UNUSED, void *userdata
/*******/

void argvs_add   (int (*fun)(COMMAND_ARGS),
                  const char *name,
                  int         required_arguments,
                  const char *argument_help,
                  const char *help);
int argvs_eval   (const char *cmdline); /* this evals one command,
                                           no newlines or semicolons are taken into account. */
int argvs_source (const char *path);

#endif