commit e00e030e951d967a44e1d6803bf035ced931f742
parent ecf1a6f65deed420565d84a7ed030de01589608d
Author: htrb <htrb>
Date: Mon, 19 Jul 2010 09:00:34 +0000
* [w3m-dev 04238] [patch] simple preserve space
* rc.c: Introduce option simple_preserve_space.
* fm.h: add global variable SimplePreserveSpace.
* file.c (HTMLlineproc0): check SimplePreserveSpace.
Diffstat:
4 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-19 d+w3m@vdr.jp
+
+ * [w3m-dev 04238] [patch] simple preserve space
+ * rc.c: Introduce option simple_preserve_space.
+ * fm.h: add global variable SimplePreserveSpace.
+ * file.c (HTMLlineproc0): check SimplePreserveSpace.
+
2010-07-18 d+w3m@vdr.jp
* [w3m-dev 04319] Re: w3m's bugs from bugs.debian.org
@@ -10,6 +17,9 @@
* display.c (displayBuffer): use is_html_type() instead of strcasecmp().
* buffer.c (reshapeBuffer): use is_html_type() instead of strcasecmp().
* backend.c (internal_get): use is_html_type() instead of strcasecmp().
+ * main.c (vwSrc, reload, dispI, stopI): use is_html_type() instead of strcasecmp().
+ * proto.h: add is_html_type()
+ * url.c: add "xhtml" to DefaultGuess.
2010-07-18 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
diff --git a/file.c b/file.c
@@ -6347,7 +6347,7 @@ HTMLlineproc0(char *line, struct html_feed_environ *h_env, int internal)
is_hangul = wtf_is_hangul((wc_uchar *) str);
else
is_hangul = 0;
- if (mode == PC_KANJI1 &&
+ if (!SimplePreserveSpace && mode == PC_KANJI1 &&
!is_hangul && !prev_is_hangul &&
obuf->pos > h_env->envs[h_env->envc].indent &&
Strlastchar(obuf->line) == ' ') {
diff --git a/fm.h b/fm.h
@@ -1038,6 +1038,7 @@ global char ExtHalfdump init(FALSE);
global char FollowLocale init(TRUE);
global char UseContentCharset init(TRUE);
global char SearchConv init(TRUE);
+global char SimplePreserveSpace init(FALSE);
#define Str_conv_from_system(x) wc_Str_conv((x), SystemCharset, InnerCharset)
#define Str_conv_to_system(x) wc_Str_conv_strict((x), InnerCharset, SystemCharset)
#define Str_conv_to_halfdump(x) (ExtHalfdump ? wc_Str_conv((x), InnerCharset, DisplayCharset) : (x))
diff --git a/rc.c b/rc.c
@@ -229,6 +229,7 @@ static int OptionEncode = FALSE;
#define CMT_USE_JISX0213 N_("Use JIS X 0213:2000 (2000JIS)")
#define CMT_STRICT_ISO2022 N_("Strict ISO-2022-JP/KR/CN")
#define CMT_GB18030_AS_UCS N_("Treat 4 bytes char. of GB18030 as Unicode")
+#define CMT_SIMPLE_PRESERVE_SPACE N_("Simple Preserve space")
#endif
#define CMT_KEYMAP_FILE N_("keymap file")
@@ -671,6 +672,8 @@ struct param_ptr params10[] = {
{"gb18030_as_ucs", P_CHARINT, PI_ONOFF, (void *)&WcOption.gb18030_as_ucs,
CMT_GB18030_AS_UCS, NULL},
#endif
+ {"simple_preserve_space", P_CHARINT, PI_ONOFF, (void *)&SimplePreserveSpace,
+ CMT_SIMPLE_PRESERVE_SPACE, NULL},
{NULL, 0, 0, NULL, NULL, NULL},
};
#endif