ELinks 0.18.0
opttypes.c File Reference
#include <stdio.h>
#include <string.h>
#include "elinks.h"
#include "bfu/dialog.h"
#include "config/options.h"
#include "config/opttypes.h"
#include "intl/charsets.h"
#include "intl/libintl.h"
#include "util/color.h"
#include "util/conv.h"
#include "util/error.h"
#include "util/memory.h"
#include "util/string.h"
Include dependency graph for opttypes.c:

Functions

static const char * gen_cmd (struct option *o, char ***argv, int *argc)
static const char * bool_cmd (struct option *o, char ***argv, int *argc)
static const char * exec_cmd (struct option *o, char ***argv, int *argc)
static const char * redir_cmd (struct option *opt, char ***argv, int *argc)
static char * redir_rd (struct option *opt, char **file, int *line)
static void redir_wr (struct option *opt, struct string *string)
static int redir_set (struct option *opt, char *str)
static int redir_eq (struct option *opt, const char *str)
static void add_optstring_to_string (struct string *s, const char *q, int qlen)
static char * num_rd (struct option *opt, char **file, int *line)
static int num_set (struct option *opt, char *str)
static int num_eq (struct option *opt, const char *str)
static void num_wr (struct option *option, struct string *string)
static int long_set (struct option *opt, char *str)
static int long_eq (struct option *opt, const char *str)
static void long_wr (struct option *option, struct string *string)
static char * str_rd (struct option *opt, char **file, int *line)
static int str_set (struct option *opt, char *str)
static int str_eq (struct option *opt, const char *str)
static void str_wr (struct option *o, struct string *s)
static void str_dup (struct option *opt, struct option *template_, int flags)
static int cp_set (struct option *opt, char *str)
static int cp_eq (struct option *opt, const char *str)
static void cp_wr (struct option *o, struct string *s)
static int lang_set (struct option *opt, char *str)
static int lang_eq (struct option *opt, const char *str)
static void lang_wr (struct option *o, struct string *s)
static int color_set (struct option *opt, char *str)
static int color_eq (struct option *opt, const char *str)
static void color_wr (struct option *opt, struct string *str)
static void tree_dup (struct option *opt, struct option *template_, int flags)
const char * get_option_type_name (enum option_type type)

Variables

int commandline = 0
const struct option_type_info option_types []

Function Documentation

◆ add_optstring_to_string()

void add_optstring_to_string ( struct string * s,
const char * q,
int qlen )
static

◆ bool_cmd()

const char * bool_cmd ( struct option * o,
char *** argv,
int * argc )
static

◆ color_eq()

int color_eq ( struct option * opt,
const char * str )
static

◆ color_set()

int color_set ( struct option * opt,
char * str )
static

◆ color_wr()

void color_wr ( struct option * opt,
struct string * str )
static

◆ cp_eq()

int cp_eq ( struct option * opt,
const char * str )
static

◆ cp_set()

int cp_set ( struct option * opt,
char * str )
static

◆ cp_wr()

void cp_wr ( struct option * o,
struct string * s )
static

◆ exec_cmd()

const char * exec_cmd ( struct option * o,
char *** argv,
int * argc )
static

◆ gen_cmd()

const char * gen_cmd ( struct option * o,
char *** argv,
int * argc )
static

◆ get_option_type_name()

const char * get_option_type_name ( enum option_type type)

◆ lang_eq()

int lang_eq ( struct option * opt,
const char * str )
static

◆ lang_set()

int lang_set ( struct option * opt,
char * str )
static

◆ lang_wr()

void lang_wr ( struct option * o,
struct string * s )
static

◆ long_eq()

int long_eq ( struct option * opt,
const char * str )
static

◆ long_set()

int long_set ( struct option * opt,
char * str )
static

◆ long_wr()

void long_wr ( struct option * option,
struct string * string )
static

◆ num_eq()

int num_eq ( struct option * opt,
const char * str )
static

◆ num_rd()

char * num_rd ( struct option * opt,
char ** file,
int * line )
static

◆ num_set()

int num_set ( struct option * opt,
char * str )
static

◆ num_wr()

void num_wr ( struct option * option,
struct string * string )
static

◆ redir_cmd()

const char * redir_cmd ( struct option * opt,
char *** argv,
int * argc )
static

◆ redir_eq()

int redir_eq ( struct option * opt,
const char * str )
static

◆ redir_rd()

char * redir_rd ( struct option * opt,
char ** file,
int * line )
static

◆ redir_set()

int redir_set ( struct option * opt,
char * str )
static

◆ redir_wr()

void redir_wr ( struct option * opt,
struct string * string )
static

◆ str_dup()

void str_dup ( struct option * opt,
struct option * template_,
int flags )
static

◆ str_eq()

int str_eq ( struct option * opt,
const char * str )
static

◆ str_rd()

char * str_rd ( struct option * opt,
char ** file,
int * line )
static

◆ str_set()

int str_set ( struct option * opt,
char * str )
static

◆ str_wr()

void str_wr ( struct option * o,
struct string * s )
static

◆ tree_dup()

void tree_dup ( struct option * opt,
struct option * template_,
int flags )
static

Variable Documentation

◆ commandline

int commandline = 0

◆ option_types

const struct option_type_info option_types[]
Initial value:
= {
{ N_("Boolean"), bool_cmd, num_rd, num_wr, NULL, num_set, num_eq, N_("[0|1]") },
{ N_("Integer"), gen_cmd, num_rd, num_wr, NULL, num_set, num_eq, N_("<num>") },
{ N_("Longint"), gen_cmd, num_rd, long_wr, NULL, long_set, long_eq, N_("<num>") },
{ N_("String"), gen_cmd, str_rd, str_wr, str_dup, str_set, str_eq, N_("<str>") },
{ N_("Codepage"), gen_cmd, str_rd, cp_wr, NULL, cp_set, cp_eq, N_("<codepage>") },
{ N_("Language"), gen_cmd, str_rd, lang_wr, NULL, lang_set, lang_eq, N_("<language>") },
{ N_("Color"), gen_cmd, str_rd, color_wr, NULL, color_set, color_eq, N_("<color|#rrggbb>") },
{ N_("Special"), exec_cmd, NULL, NULL, NULL, NULL, NULL, "" },
{ N_("Folder"), NULL, NULL, NULL, tree_dup, NULL, NULL, "" },
}
static const char * redir_cmd(struct option *option, char ***argv, int *argc)
Definition cmdline.c:746
#define NULL
Definition explodename.c:35
#define N_(msg)
Definition libintl.h:25
static int redir_set(struct option *opt, char *str)
Definition opttypes.c:144
static const char * exec_cmd(struct option *o, char ***argv, int *argc)
Definition opttypes.c:81
static int num_set(struct option *opt, char *str)
Definition opttypes.c:226
static int long_set(struct option *opt, char *str)
Definition opttypes.c:251
static int color_set(struct option *opt, char *str)
Definition opttypes.c:419
static int lang_set(struct option *opt, char *str)
Definition opttypes.c:384
static void cp_wr(struct option *o, struct string *s)
Definition opttypes.c:375
static char * num_rd(struct option *opt, char **file, int *line)
Definition opttypes.c:202
static int lang_eq(struct option *opt, const char *str)
Definition opttypes.c:394
static void long_wr(struct option *option, struct string *string)
Definition opttypes.c:264
static int redir_eq(struct option *opt, const char *str)
Definition opttypes.c:166
static int long_eq(struct option *opt, const char *str)
Definition opttypes.c:258
static char * redir_rd(struct option *opt, char **file, int *line)
Definition opttypes.c:113
static char * str_rd(struct option *opt, char **file, int *line)
Definition opttypes.c:270
static int str_eq(struct option *opt, const char *str)
Definition opttypes.c:333
static void str_dup(struct option *opt, struct option *template_, int flags)
Definition opttypes.c:348
static void num_wr(struct option *option, struct string *string)
Definition opttypes.c:244
static const char * bool_cmd(struct option *o, char ***argv, int *argc)
Definition opttypes.c:60
static void redir_wr(struct option *opt, struct string *string)
Definition opttypes.c:132
static const char * gen_cmd(struct option *o, char ***argv, int *argc)
Definition opttypes.c:33
static int num_eq(struct option *opt, const char *str)
Definition opttypes.c:238
static void tree_dup(struct option *opt, struct option *template_, int flags)
Definition opttypes.c:444
static void lang_wr(struct option *o, struct string *s)
Definition opttypes.c:404
static int color_eq(struct option *opt, const char *str)
Definition opttypes.c:425
static int str_set(struct option *opt, char *str)
Definition opttypes.c:324
static void str_wr(struct option *o, struct string *s)
Definition opttypes.c:339
static int cp_eq(struct option *opt, const char *str)
Definition opttypes.c:369
static int cp_set(struct option *opt, char *str)
Definition opttypes.c:358
static void color_wr(struct option *opt, struct string *str)
Definition opttypes.c:434