diff options
author | Michael Johnson <johnsonm@src.gnome.org> | 1998-11-19 20:56:19 +0000 |
---|---|---|
committer | Michael Johnson <johnsonm@src.gnome.org> | 1998-11-19 20:56:19 +0000 |
commit | d42980af516219af0bf42351f315dc534b804ff6 (patch) | |
tree | 9a359d081f109b3967332f448a0f86b0acf6246f /support/popt.c | |
parent | 139ed9c81a4fbcb8a45aa7ed248b9831a02209cf (diff) | |
download | shared-mime-info-d42980af516219af0bf42351f315dc534b804ff6.tar.gz |
Improved man page a bit, install by default.
Added POPT_ARG_VAL
svn path=/trunk/; revision=480
Diffstat (limited to 'support/popt.c')
-rw-r--r-- | support/popt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/support/popt.c b/support/popt.c index ca97e5de..f9e61538 100644 --- a/support/popt.c +++ b/support/popt.c @@ -392,6 +392,10 @@ int poptGetNextOpt(poptContext con) { *((char **) opt->arg) = con->os->nextArg; break; + case POPT_ARG_VAL: + *((int *) opt->arg) = opt->val; + break; + case POPT_ARG_INT: case POPT_ARG_LONG: aLong = strtol(con->os->nextArg, &end, 0); @@ -419,7 +423,7 @@ int poptGetNextOpt(poptContext con) { if (cb) cb(con, POPT_CALLBACK_REASON_OPTION, opt, con->os->nextArg, cbData); - else if (opt->val) + else if (opt->val && ((opt->argInfo & POPT_ARG_MASK) != POPT_ARG_VAL)) done = 1; if ((con->finalArgvCount + 2) >= (con->finalArgvAlloced)) { |