2006-02-24 04:48:15 +00:00
|
|
|
/*
|
2006-05-25 04:32:20 +00:00
|
|
|
Author: Marcus Boerger <helly@users.sourceforge.net>
|
2006-02-24 04:48:15 +00:00
|
|
|
*/
|
|
|
|
|
2008-01-26 04:33:34 +00:00
|
|
|
/* $Id: mbo_getopt.h 539 2006-05-25 13:37:38Z helly $ */
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
/* Define structure for one recognized option (both single char and long name).
|
|
|
|
* If short_open is '-' this is the last option.
|
|
|
|
*/
|
2006-05-25 04:32:20 +00:00
|
|
|
|
|
|
|
#ifndef RE2C_MBO_GETOPT_H_INCLUDE_GUARD_
|
|
|
|
#define RE2C_MBO_GETOPT_H_INCLUDE_GUARD_
|
|
|
|
|
|
|
|
namespace re2c
|
|
|
|
{
|
|
|
|
|
|
|
|
struct mbo_opt_struct
|
|
|
|
{
|
|
|
|
mbo_opt_struct(char _opt_char, int _need_param, const char * _opt_name)
|
|
|
|
: opt_char(_opt_char), need_param(_need_param), opt_name(_opt_name)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
const char opt_char;
|
2006-05-25 04:32:20 +00:00
|
|
|
const int need_param;
|
2006-02-24 04:48:15 +00:00
|
|
|
const char * opt_name;
|
2006-05-25 04:32:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
int mbo_getopt(int argc, char* const *argv, const mbo_opt_struct *opts, char **optarg, int *optind, int show_err);
|
|
|
|
|
|
|
|
} // end namespace re2c
|
|
|
|
|
|
|
|
#endif
|
2006-02-24 04:48:15 +00:00
|
|
|
|