ELinks 0.18.0
option_info Union Reference

Instructions for registering an option, and storage for the option itself. More...

#include <options.h>

Collaboration diagram for option_info:

Data Fields

struct option_init init
 How to initialize and register option.
struct option option
 register_options() constructs the option here, based on the instructions in init.

(Note that these are not member symbols.)

void register_options (union option_info info[], struct option *tree)
void unregister_options (union option_info info[], struct option *tree)
#define NULL_OPTION_INFO
#define INIT_OPT_BOOL(path, capt, name, flags, def, desc)
#define INIT_OPT_INT(path, capt, name, flags, min, max, def, desc)
#define INIT_OPT_LONG(path, capt, name, flags, min, max, def, desc)
#define INIT_OPT_STRING(path, capt, name, flags, def, desc)
#define INIT_OPT_CODEPAGE(path, capt, name, flags, def, desc)
#define INIT_OPT_COLOR(path, capt, name, flags, def, desc)
#define INIT_OPT_LANGUAGE(path, capt, name, flags, desc)
#define INIT_OPT_COMMAND(path, capt, name, flags, cmd, desc)
#define INIT_OPT_CMDALIAS(path, capt, name, flags, def, desc)
#define INIT_OPT_ALIAS(path, name, flags, def)
#define INIT_OPT_TREE(path, capt, name, flags, desc)

Detailed Description

Instructions for registering an option, and storage for the option itself.

◆ INIT_OPT_ALIAS

#define INIT_OPT_ALIAS ( path,
name,
flags,
def )
related
Value:
{{ path, name, NULL, NULL, flags, \
OPT_ALIAS, 0, sizeof(def) - 1, 0, def, NULL }}
@ OPT_ALIAS
Definition options.h:116
#define NULL
Definition explodename.c:35

◆ INIT_OPT_BOOL

#define INIT_OPT_BOOL ( path,
capt,
name,
flags,
def,
desc )
related
Value:
{{ path, name, capt, DESC(desc), flags, \
OPT_BOOL, 0, 1, def, NULL, NULL }}
@ OPT_BOOL
Definition options.h:105
#define DESC(x)
Definition options.h:358

◆ INIT_OPT_CMDALIAS

#define INIT_OPT_CMDALIAS ( path,
capt,
name,
flags,
def,
desc )
related
Value:
{{ path, name, capt, DESC(desc), flags, \
OPT_ALIAS, 0, sizeof(def) - 1, 0, def, NULL }}

◆ INIT_OPT_CODEPAGE

#define INIT_OPT_CODEPAGE ( path,
capt,
name,
flags,
def,
desc )
related
Value:
{{ path, name, capt, DESC(desc), flags, \
OPT_CODEPAGE, 0, 0, 0, def, NULL }}
@ OPT_CODEPAGE
Definition options.h:110

◆ INIT_OPT_COLOR

#define INIT_OPT_COLOR ( path,
capt,
name,
flags,
def,
desc )
related
Value:
{{ path, name, capt, DESC(desc), flags, \
OPT_COLOR, 0, 0, 0, def, NULL }}
@ OPT_COLOR
Definition options.h:112

◆ INIT_OPT_COMMAND

#define INIT_OPT_COMMAND ( path,
capt,
name,
flags,
cmd,
desc )
related
Value:
{{ path, name, capt, DESC(desc), flags, \
OPT_COMMAND, 0, 0, 0, NULL, cmd }}
@ OPT_COMMAND
Definition options.h:114

◆ INIT_OPT_INT

#define INIT_OPT_INT ( path,
capt,
name,
flags,
min,
max,
def,
desc )
related
Value:
{{ path, name, capt, DESC(desc), flags, \
OPT_INT, min, max, def, NULL, NULL }}
@ OPT_INT
Definition options.h:106

◆ INIT_OPT_LANGUAGE

#define INIT_OPT_LANGUAGE ( path,
capt,
name,
flags,
desc )
related
Value:
{{ path, name, capt, DESC(desc), flags, \
OPT_LANGUAGE, 0, 0, 0, NULL, NULL }}
@ OPT_LANGUAGE
Definition options.h:111

◆ INIT_OPT_LONG

#define INIT_OPT_LONG ( path,
capt,
name,
flags,
min,
max,
def,
desc )
related
Value:
{{ path, name, capt, DESC(desc), flags, \
OPT_LONG, min, max, def, NULL, NULL }}
@ OPT_LONG
Definition options.h:107

◆ INIT_OPT_STRING

#define INIT_OPT_STRING ( path,
capt,
name,
flags,
def,
desc )
related
Value:
{{ path, name, capt, DESC(desc), flags, \
OPT_STRING, 0, MAX_STR_LEN, 0, def, NULL }}
@ OPT_STRING
Definition options.h:108
#define MAX_STR_LEN
Definition setup.h:79

◆ INIT_OPT_TREE

#define INIT_OPT_TREE ( path,
capt,
name,
flags,
desc )
related
Value:
{{ path, name, capt, DESC(desc), flags, \
OPT_TREE, 0, 0, 0, NULL, NULL }}
@ OPT_TREE
Definition options.h:118

◆ NULL_OPTION_INFO

#define NULL_OPTION_INFO
related
Value:
OPT_BOOL, 0, 0, 0, NULL, NULL }}
@ OPT_ZERO
Definition options.h:23

◆ register_options()

void register_options ( union option_info info[],
struct option * tree )
related

◆ unregister_options()

void unregister_options ( union option_info info[],
struct option * tree )
related

Field Documentation

◆ init

struct option_init option_info::init

How to initialize and register option.

This must be the first member of the union, to let C89 compilers initialize it.

◆ option

struct option option_info::option

register_options() constructs the option here, based on the instructions in init.

By doing so, it of course overwrites init. Thus, only option can be used afterwards.


The documentation for this union was generated from the following files: