From 9cd19d885fb4f69db65af6cc7d7002b746897bd3 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Mon, 28 May 2007 12:41:54 +0200 Subject: [PATCH] Remove unused add handler in the option_type_info struct (cherry picked from commit 7fe7b42093e686caca0cf3f460013ab601b4477e) --- src/config/opttypes.c | 24 ++++++++++-------------- src/config/opttypes.h | 1 - 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/config/opttypes.c b/src/config/opttypes.c index 4a5653939..f159732c5 100644 --- a/src/config/opttypes.c +++ b/src/config/opttypes.c @@ -158,10 +158,6 @@ redir_set(struct option *opt, unsigned char *str) } -static int -redir_add(struct option *opt, unsigned char *str) - wrap_or_(add, add(real, str), 0); - /* Support functions for config file parsing. */ @@ -399,21 +395,21 @@ tree_dup(struct option *opt, struct option *template) } const struct option_type_info option_types[] = { - { N_("Boolean"), bool_cmd, num_rd, num_wr, NULL, num_set, NULL, N_("[0|1]") }, - { N_("Integer"), gen_cmd, num_rd, num_wr, NULL, num_set, NULL, N_("") }, - { N_("Longint"), gen_cmd, num_rd, long_wr, NULL, long_set, NULL, N_("") }, - { N_("String"), gen_cmd, str_rd, str_wr, str_dup, str_set, NULL, N_("") }, + { N_("Boolean"), bool_cmd, num_rd, num_wr, NULL, num_set, N_("[0|1]") }, + { N_("Integer"), gen_cmd, num_rd, num_wr, NULL, num_set, N_("") }, + { N_("Longint"), gen_cmd, num_rd, long_wr, NULL, long_set, N_("") }, + { N_("String"), gen_cmd, str_rd, str_wr, str_dup, str_set, N_("") }, - { N_("Codepage"), gen_cmd, str_rd, cp_wr, NULL, cp_set, NULL, N_("") }, - { N_("Language"), gen_cmd, str_rd, lang_wr, NULL, lang_set, NULL, N_("") }, - { N_("Color"), gen_cmd, str_rd, color_wr, NULL, color_set, NULL, N_("") }, + { N_("Codepage"), gen_cmd, str_rd, cp_wr, NULL, cp_set, N_("") }, + { N_("Language"), gen_cmd, str_rd, lang_wr, NULL, lang_set, N_("") }, + { N_("Color"), gen_cmd, str_rd, color_wr, NULL, color_set, N_("") }, - { N_("Special"), exec_cmd, NULL, NULL, NULL, NULL, NULL, "" }, + { N_("Special"), exec_cmd, NULL, NULL, NULL, NULL, "" }, - { N_("Alias"), redir_cmd, redir_rd, redir_wr, NULL, redir_set, redir_add, "" }, + { N_("Alias"), redir_cmd, redir_rd, redir_wr, NULL, redir_set, "" }, /* tree */ - { N_("Folder"), NULL, NULL, NULL, tree_dup, NULL, NULL, "" }, + { N_("Folder"), NULL, NULL, NULL, tree_dup, NULL, "" }, }; unsigned char * diff --git a/src/config/opttypes.h b/src/config/opttypes.h index 84b47d680..0bbbfdb09 100644 --- a/src/config/opttypes.h +++ b/src/config/opttypes.h @@ -11,7 +11,6 @@ struct option_type_info { void (*write)(struct option *, struct string *); void (*dup)(struct option *, struct option *); int (*set)(struct option *, unsigned char *); - int (*add)(struct option *, unsigned char *); unsigned char *help_str; };