--- libaitio/inc/aitio.h 2010/04/05 08:51:34 1.3.2.4 +++ libaitio/inc/aitio.h 2010/04/06 14:26:55 1.3.2.6 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitio.h,v 1.3.2.4 2010/04/05 08:51:34 misho Exp $ +* $Id: aitio.h,v 1.3.2.6 2010/04/06 14:26:55 misho Exp $ * *************************************************************************/ #ifndef __AITIO_H @@ -257,6 +257,17 @@ int io_Cmd_Exit(void *cmds, FILE *out, char ** __restr !strncmp(CMDS[i].cmd_name, text, len)) \ return strdup(CMDS[i].cmd_name); \ } \ + return NULL; \ + } + +/* + * io_Make_Comp_Args - Declare helper function for Arguments completion +*/ +#define IO_MAKE_COMP_ARGS(FUNC, ARGS) \ + char *FUNC(const char *text __attribute__((unused)), int state) \ + { \ + while (ARGS[state]) \ + return strdup(ARGS[state]); \ return NULL; \ }