From aacc8cc6c9f48decef167358fca1f840e8304294 Mon Sep 17 00:00:00 2001 From: ewt Date: Sun, 27 Sep 1998 15:54:20 +0000 Subject: [PATCH] changed popt callbacks t get a pointer into the option table CVS patchset: 2360 CVS date: 1998/09/27 15:54:20 --- popt/popt.c | 2 +- popt/popt.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/popt/popt.c b/popt/popt.c index 96d605373..0df31796f 100644 --- a/popt/popt.c +++ b/popt/popt.c @@ -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; diff --git a/popt/popt.h b/popt/popt.h index 50580f7c3..bdedceae4 100644 --- a/popt/popt.h +++ b/popt/popt.h @@ -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);