From 0efbaf15c364a249feae778695b707edf1d9998c Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Mon, 2 Feb 2015 23:09:34 +0900 Subject: New option "display_borders" to display 0 pixel table borders. cf. http://d.hatena.ne.jp/rubikitch/20101120 --- file.c | 2 ++ fm.h | 1 + rc.c | 3 +++ 3 files changed, 6 insertions(+) diff --git a/file.c b/file.c index 709a0c1..605fc78 100644 --- a/file.c +++ b/file.c @@ -4982,6 +4982,8 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) else w = BORDER_THIN; } + if (DisplayBorders && w == BORDER_NONE) + w = BORDER_THIN; if (parsedtag_get_value(tag, ATTR_WIDTH, &i)) { if (obuf->table_level == 0) width = REAL_WIDTH(i, h_env->limit - envs[h_env->envc].indent); diff --git a/fm.h b/fm.h index 8f594dc..37098a0 100644 --- a/fm.h +++ b/fm.h @@ -1097,6 +1097,7 @@ global char UseAltEntity init(FALSE); #define GRAPHIC_CHAR_DEC 1 #define GRAPHIC_CHAR_CHARSET 0 global char UseGraphicChar init(GRAPHIC_CHAR_CHARSET); +global char DisplayBorders init(FALSE); extern char *graph_symbol[]; extern char *graph2_symbol[]; extern int symbol_width; diff --git a/rc.c b/rc.c index 3bf6cea..7b88368 100644 --- a/rc.c +++ b/rc.c @@ -90,6 +90,7 @@ static int OptionEncode = FALSE; #define CMT_MULTICOL N_("Display file names in multi-column format") #define CMT_ALT_ENTITY N_("Use ASCII equivalents to display entities") #define CMT_GRAPHIC_CHAR N_("Character type for border of table and menu") +#define CMT_DISP_BORDERS N_("Display 0 pixel table borders") #define CMT_FOLD_TEXTAREA N_("Fold lines in TEXTAREA") #define CMT_DISP_INS_DEL N_("Display INS, DEL, S and STRIKE element") #define CMT_COLOR N_("Display with color") @@ -393,6 +394,8 @@ struct param_ptr params1[] = { NULL}, {"graphic_char", P_CHARINT, PI_SEL_C, (void *)&UseGraphicChar, CMT_GRAPHIC_CHAR, (void *)graphic_char_str}, + {"display_borders", P_CHARINT, PI_ONOFF, (void *)&DisplayBorders, + CMT_DISP_BORDERS, NULL}, {"fold_textarea", P_CHARINT, PI_ONOFF, (void *)&FoldTextarea, CMT_FOLD_TEXTAREA, NULL}, {"display_ins_del", P_INT, PI_SEL_C, (void *)&displayInsDel, -- cgit v1.2.3