[w3m-dev 02759] fold textarea

From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2001-12-27 17:37:49 +00:00
parent 4838675c23
commit 2e92ab8f6f
4 changed files with 22 additions and 7 deletions

View File

@@ -1,3 +1,11 @@
2001-12-28 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 02759] fold textarea
* fm.h (FoldTextarea): added
* form.c (formUpdateBuffer): check FoldTextarea
* rc.c (CMT_FOLD_TEXTAREA): added
* rc.c (params1): add "fold_textarea"
2001-12-28 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> 2001-12-28 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 02757] * [w3m-dev 02757]
@@ -1703,4 +1711,4 @@
* release-0-2-1 * release-0-2-1
* import w3m-0.2.1 * import w3m-0.2.1
$Id: ChangeLog,v 1.188 2001/12/27 17:23:06 ukai Exp $ $Id: ChangeLog,v 1.189 2001/12/27 17:37:49 ukai Exp $

3
fm.h
View File

@@ -1,4 +1,4 @@
/* $Id: fm.h,v 1.34 2001/12/26 18:17:57 ukai Exp $ */ /* $Id: fm.h,v 1.35 2001/12/27 17:37:49 ukai Exp $ */
/* /*
* w3m: WWW wo Miru utility * w3m: WWW wo Miru utility
* *
@@ -774,6 +774,7 @@ global Str proxy_auth_cookie init(NULL);
global int UseExternalDirBuffer init(TRUE); global int UseExternalDirBuffer init(TRUE);
global char *DirBufferCommand init("file:///$LIB/dirlist" CGI_EXTENSION); global char *DirBufferCommand init("file:///$LIB/dirlist" CGI_EXTENSION);
global int ignore_null_img_alt init(TRUE); global int ignore_null_img_alt init(TRUE);
global int FoldTextarea init(FALSE);
global struct auth_cookie *Auth_cookie init(NULL); global struct auth_cookie *Auth_cookie init(NULL);
global char *Local_cookie init(NULL); global char *Local_cookie init(NULL);

8
form.c
View File

@@ -1,4 +1,4 @@
/* $Id: form.c,v 1.8 2001/12/26 18:29:33 ukai Exp $ */ /* $Id: form.c,v 1.9 2001/12/27 17:37:49 ukai Exp $ */
/* /*
* HTML forms * HTML forms
*/ */
@@ -358,8 +358,10 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
} }
} }
if (rows > 1) { if (rows > 1) {
while (p[j] && p[j] != '\r' && p[j] != '\n') if (! FoldTextarea) {
j++; while (p[j] && p[j] != '\r' && p[j] != '\n')
j++;
}
if (p[j] == '\r') if (p[j] == '\r')
j++; j++;
if (p[j] == '\n') if (p[j] == '\n')

8
rc.c
View File

@@ -1,4 +1,4 @@
/* $Id: rc.c,v 1.23 2001/12/14 17:35:08 ukai Exp $ */ /* $Id: rc.c,v 1.24 2001/12/27 17:37:49 ukai Exp $ */
/* /*
* Initialization file etc. * Initialization file etc.
*/ */
@@ -67,6 +67,7 @@ static char *config_file = NULL;
#define CMT_DISPLINK "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>ưɽ<C6B0><C9BD>" #define CMT_DISPLINK "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>ưɽ<C6B0><C9BD>"
#define CMT_MULTICOL "<22>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD>̾<EFBFBD>Υޥ<CEA5><DEA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD><C9BD>" #define CMT_MULTICOL "<22>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD>̾<EFBFBD>Υޥ<CEA5><DEA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD><C9BD>"
#define CMT_ALT_ENTITY "<22><><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD><C6A5>ƥ<EFBFBD><C6A5><EFBFBD> ASCII <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD>ɽ<EFBFBD><C9BD>" #define CMT_ALT_ENTITY "<22><><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD><C6A5>ƥ<EFBFBD><C6A5><EFBFBD> ASCII <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD>ɽ<EFBFBD><C9BD>"
#define CMT_FOLD_TEXTAREA "TEXTAREA <20>ιԤ<CEB9><D4A4>ޤ<EFBFBD><DEA4>֤<EFBFBD><D6A4><EFBFBD>ɽ<EFBFBD><C9BD>"
#define CMT_COLOR "<22><><EFBFBD>顼ɽ<E9A1BC><C9BD>" #define CMT_COLOR "<22><><EFBFBD>顼ɽ<E9A1BC><C9BD>"
#define CMT_B_COLOR "ʸ<><CAB8><EFBFBD>ο<EFBFBD>" #define CMT_B_COLOR "ʸ<><CAB8><EFBFBD>ο<EFBFBD>"
#define CMT_A_COLOR "<22><><EFBFBD>󥫡<EFBFBD><F3A5ABA1>ο<EFBFBD>" #define CMT_A_COLOR "<22><><EFBFBD>󥫡<EFBFBD><F3A5ABA1>ο<EFBFBD>"
@@ -179,10 +180,11 @@ static char *config_file = NULL;
/* #define CMT_KANJICODE "Display Kanji Code" */ /* #define CMT_KANJICODE "Display Kanji Code" */
#define CMT_FRAME "Automatic rendering of frame" #define CMT_FRAME "Automatic rendering of frame"
#define CMT_ARGV_IS_URL "Force argument without scheme to URL" #define CMT_ARGV_IS_URL "Force argument without scheme to URL"
#define CMT_TSELF "use _self as default target" #define CMT_TSELF "Use _self as default target"
#define CMT_DISPLINK "Automatic display of link URL" #define CMT_DISPLINK "Automatic display of link URL"
#define CMT_MULTICOL "Multi-column output of file names" #define CMT_MULTICOL "Multi-column output of file names"
#define CMT_ALT_ENTITY "Use alternate expression with ASCII for entity" #define CMT_ALT_ENTITY "Use alternate expression with ASCII for entity"
#define CMT_FOLD_TEXTAREA "Fold lines of TEXTAREA"
#define CMT_COLOR "Display with color" #define CMT_COLOR "Display with color"
#define CMT_B_COLOR "Color of normal character" #define CMT_B_COLOR "Color of normal character"
#define CMT_A_COLOR "Color of anchor" #define CMT_A_COLOR "Color of anchor"
@@ -390,6 +392,8 @@ struct param_ptr params1[] = {
{"multicol", P_INT, PI_ONOFF, (void *)&multicolList, CMT_MULTICOL, NULL}, {"multicol", P_INT, PI_ONOFF, (void *)&multicolList, CMT_MULTICOL, NULL},
{"alt_entity", P_CHARINT, PI_ONOFF, (void *)&UseAltEntity, CMT_ALT_ENTITY, {"alt_entity", P_CHARINT, PI_ONOFF, (void *)&UseAltEntity, CMT_ALT_ENTITY,
NULL}, NULL},
{"fold_textarea", P_CHARINT, PI_ONOFF, (void *)&FoldTextarea,
CMT_FOLD_TEXTAREA, NULL},
{"ignore_null_img_alt", P_INT, PI_ONOFF, (void *)&ignore_null_img_alt, {"ignore_null_img_alt", P_INT, PI_ONOFF, (void *)&ignore_null_img_alt,
CMT_IGNORE_NULL_IMG_ALT, NULL}, CMT_IGNORE_NULL_IMG_ALT, NULL},
{"view_unseenobject", P_INT, PI_ONOFF, (void *)&view_unseenobject, {"view_unseenobject", P_INT, PI_ONOFF, (void *)&view_unseenobject,