changed popt callbacks t get a pointer into the option table

CVS patchset: 2360
CVS date: 1998/09/27 15:54:20
This commit is contained in:
ewt 1998-09-27 15:54:20 +00:00
parent 88c518a2c8
commit aacc8cc6c9
2 changed files with 4 additions and 3 deletions

View File

@ -370,7 +370,7 @@ int poptGetNextOpt(poptContext con) {
}
if (cb)
cb(con, opt->val, con->os->nextArg, cbData);
cb(con, opt, con->os->nextArg, cbData);
else if (opt->val)
done = 1;

View File

@ -55,8 +55,9 @@ extern struct poptOption poptHelpOptions[];
typedef struct poptContext_s * poptContext;
typedef struct poptOption * poptOption;
typedef void (*poptCallbackType)(poptContext con, int key, const char * arg,
void * data);
typedef void (*poptCallbackType)(poptContext con,
const struct poptOption * opt,
const char * arg, void * data);
poptContext poptGetContext(char * name, int argc, char ** argv,
const struct poptOption * options, int flags);