16 static const char *
name = NULL;
18 static const char *
file = NULL;
21 { NULL,
'n', POPT_ARG_STRING, &
name,
'n', NULL, NULL},
22 { NULL,
'f', POPT_ARG_STRING, &
file,
'f', NULL, NULL},
23 { 0, 0, 0, 0, 0, NULL, NULL}
32 const char ** argv = NULL;
34 poptContext optCon = NULL;
41 if ((rc = poptParseArgvString(spec->
line, &argc, &argv))) {
43 spec->
lineNum, poptStrerror(rc));
48 optCon = poptGetContext(NULL, argc, argv,
optionsTable, 0);
49 while ((arg = poptGetNextOpt(optCon)) > 0) {
58 poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
64 if (poptPeekArg(optCon)) {
67 name = poptGetArg(optCon);
69 if (poptPeekArg(optCon)) {
118 optCon = poptFreeContext(optCon);