aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches/090_simple-preserve-space.patch
blob: d590c028625fccd8cb22dfdd93099c2d592730dd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Description: New option "simple_preserve_space"
Origin: http://www.sic.med.tohoku.ac.jp/~satodai/w3m-dev/200705.month/4238.html
Author: dai <d+w3m@vdr.jp>
Bug-Debian: http://bugs.debian.org/384982

diff -urNp w3m-0.5.1+cvs1.948/file.c w3m-preserve-space/file.c
--- w3m-0.5.1+cvs1.948/file.c	2006-02-14 16:33:23.000000000 +0900
+++ w3m-preserve-space/file.c	2006-07-29 22:28:47.000000000 +0900
@@ -6131,7 +6131,7 @@ HTMLlineproc0(char *line, struct html_fe
 			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 -urNp w3m-0.5.1+cvs1.948/fm.h w3m-preserve-space/fm.h
--- w3m-0.5.1+cvs1.948/fm.h	2006-02-14 16:34:24.000000000 +0900
+++ w3m-preserve-space/fm.h	2006-07-29 22:24:02.000000000 +0900
@@ -1015,6 +1015,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 -urNp w3m-0.5.1+cvs1.948/rc.c w3m-preserve-space/rc.c
--- w3m-0.5.1+cvs1.948/rc.c	2006-02-14 16:34:24.000000000 +0900
+++ w3m-preserve-space/rc.c	2006-07-29 22:27:50.000000000 +0900
@@ -228,6 +228,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")
@@ -662,6 +663,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