1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-13 05:43:37 -04:00
elinks/src/config/opttypes.h
Kalle Olavi Niemitalo 054852ae23 config: Fix the "include" command.
Previously, it only pretended to rewrite the configuration file, so it
set or cleared OPT_MUST_SAVE but never changed or output any options.
Now, it actually sets the options when ELinks is loading the
configuration file.  Also, when ELinks is rewriting the configuration
file, it now compares the values in the included file to the current
values of the options, and sets or clears OPT_MUST_SAVE accordingly.
2008-02-03 20:28:27 +02:00

26 lines
725 B
C

#ifndef EL__CONFIG_OPTTYPES_H
#define EL__CONFIG_OPTTYPES_H
#include "config/options.h"
#include "util/string.h"
struct option_type_info {
unsigned char *name;
unsigned char *(*cmdline)(struct option *, unsigned char ***, int *);
unsigned char *(*read)(struct option *, unsigned char **, int *);
void (*write)(struct option *, struct string *);
void (*dup)(struct option *, struct option *);
int (*set)(struct option *, unsigned char *);
int (*equals)(struct option *, const unsigned char *);
unsigned char *help_str;
};
/* enum option_type is index in this array */
extern const struct option_type_info option_types[];
extern int commandline;
unsigned char *get_option_type_name(enum option_type type);
#endif