2005-09-15 09:58:31 -04:00
|
|
|
#ifndef EL__CONFIG_OPTTYPES_H
|
|
|
|
#define EL__CONFIG_OPTTYPES_H
|
|
|
|
|
|
|
|
#include "config/options.h"
|
|
|
|
#include "util/string.h"
|
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
struct option_type_info {
|
2022-02-21 12:13:26 -05:00
|
|
|
const char *name;
|
2022-02-18 08:42:25 -05:00
|
|
|
const char *(*cmdline)(struct option *, char ***, int *);
|
2022-05-09 12:53:36 -04:00
|
|
|
char *(*read2)(struct option *, char **, int *);
|
|
|
|
void (*write2)(struct option *, struct string *);
|
2007-08-28 13:11:52 -04:00
|
|
|
void (*dup)(struct option *, struct option *, int);
|
2021-01-02 10:20:27 -05:00
|
|
|
int (*set)(struct option *, char *);
|
|
|
|
int (*equals)(struct option *, const char *);
|
2022-02-10 13:48:46 -05:00
|
|
|
const char *help_str;
|
2005-09-15 09:58:31 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
/* enum option_type is index in this array */
|
|
|
|
extern const struct option_type_info option_types[];
|
|
|
|
|
|
|
|
extern int commandline;
|
|
|
|
|
2022-02-21 12:13:26 -05:00
|
|
|
const char *get_option_type_name(enum option_type type);
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
#endif
|