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 {
|
2021-01-02 10:20:27 -05:00
|
|
|
char *name;
|
|
|
|
char *(*cmdline)(struct option *, char ***, int *);
|
|
|
|
char *(*read)(struct option *, char **, int *);
|
2019-04-21 06:27:40 -04:00
|
|
|
void (*write)(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 *);
|
|
|
|
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;
|
|
|
|
|
2021-01-02 10:20:27 -05:00
|
|
|
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
|