Home | History | Annotate | Download | only in tipc

Lines Matching full:cmdl

2  * cmdl.c	Framework for handling command line options.
18 #include "cmdl.h"
65 char *shift_cmdl(struct cmdl *cmdl)
69 if (cmdl->optind < cmdl->argc)
70 next = (cmdl->optind)++;
72 next = cmdl->argc;
74 return cmdl->argv[next];
78 int parse_opts(struct opt *opts, struct cmdl *cmdl)
83 for (i = cmdl->optind; i < cmdl->argc; i += 2) {
86 o = find_opt(opts, cmdl->argv[i]);
89 cmdl->argv[i]);
93 o->val = cmdl->argv[i + 1];
94 cmdl->optind += 2;
101 const struct cmd *cmds, struct cmdl *cmdl, void *data)
106 if ((cmdl->optind) >= cmdl->argc) {
108 (caller->help)(cmdl);
111 name = cmdl->argv[cmdl->optind];
112 (cmdl->optind)++;
118 (caller->help)(cmdl);
126 return (cmd->func)(nlh, cmd, cmdl, data);