diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2022-06-08 13:54:49 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2022-06-08 13:54:49 +0300 |
commit | 9650bc35b4aa4ffc35cf99d0e1db64dda5d801c8 (patch) | |
tree | 1d3c373f141324141d2293dcff3c64a29c9d9de9 /src/foodopts.h | |
parent | f20c12dd9f920eee1f50f99c8a4c86730e40432c (diff) | |
download | foodtools-9650bc35b4aa4ffc35cf99d0e1db64dda5d801c8.tar.gz foodtools-9650bc35b4aa4ffc35cf99d0e1db64dda5d801c8.tar.bz2 foodtools-9650bc35b4aa4ffc35cf99d0e1db64dda5d801c8.zip |
Move from getopt to foodopts
Diffstat (limited to 'src/foodopts.h')
-rw-r--r-- | src/foodopts.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/foodopts.h b/src/foodopts.h index 544dd3f..c8b0686 100644 --- a/src/foodopts.h +++ b/src/foodopts.h @@ -11,6 +11,25 @@ * the parsing results. * */ +struct foodoption { + const char *name; + int has_arg; + int *flag; + int val; + /* Extra values */ + const char *help; + const char *arg; +}; + +int +get_foodopt(int argc, char *const argv[], + const char *optstring, + const struct foodoption *longopts, + int *longindex); + +void +foodopt_help(char * argv0, + const struct foodoption *longopts); #endif /* __FOODOPTS_H */ |