talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 6dfe487100b64f7e5ece4c874d7e8c2b72369e4a
parent 0099b71dfcf0286082ab6f188da1dc201e14e4fa
Author: Ricardo Mones <ricardo@mones.org>
Date:   Sun, 14 May 2017 11:45:19 +0200

Remove one unused and one unnecessary macros

Diffstat:
Msrc/html.c | 25++++---------------------
1 file changed, 4 insertions(+), 21 deletions(-)

diff --git a/src/html.c b/src/html.c @@ -348,30 +348,13 @@ SC_HTMLParser *sc_html_parser_new(FILE *fp, CodeConverter *conv) parser->pre = FALSE; parser->indent = 0; -#define SYMBOL_TABLE_ADD(table, list) \ -{ \ - gint i; \ - \ - for (i = 0; i < sizeof(list) / sizeof(list[0]); i++) \ - g_hash_table_insert(table, list[i].key, list[i].val); \ -} -#define SYMBOL_TABLE_REF_ADD(table, list) \ -{ \ - gint i; \ - \ - for (i = 0; i < sizeof(list) / sizeof(list[0]); i++) \ - g_hash_table_insert(table, &list[i].key, list[i].val); \ -} - if (!default_symbol_table) { - default_symbol_table = - g_hash_table_new(g_str_hash, g_str_equal); - SYMBOL_TABLE_ADD(default_symbol_table, symbol_list); + gint i; + default_symbol_table = g_hash_table_new(g_str_hash, g_str_equal); + for (i = 0; i < sizeof(list) / sizeof(list[0]); i++) + g_hash_table_insert(table, list[i].key, list[i].val); } -#undef SYMBOL_TABLE_ADD -#undef SYMBOL_TABLE_REF_ADD - parser->symbol_table = default_symbol_table; return parser;