[w3m-dev 04268] Re: road to 0.5.2

[email protected] Wed, 30 May 2007 17:36:49 +0900 (JST)
Newsgroups gmane.comp.web.w3m.devel
Message-ID <[email protected]>
From: Dai Sato <[email protected]>
Subject: [w3m-dev 04267] Re: road to 0.5.2
Date: Wed, 30 May 2007 14:04:03 +0900



> 5/31 21:00 
> 



[w3m-dev 03991] iframe patch

w3miframe



H1H6


cd /tmp/w3m-0.5.1/
diff -u /tmp/w3m-0.5.1/ /home/rubikitch/compile/w3m-0.5.1

diff -u /tmp/w3m-0.5.1/file.c /home/rubikitch/compile/w3m-0.5.1/file.c
--- /tmp/w3m-0.5.1/file.c	2004-04-17 03:47:19.000000000 +0900
+++ /home/rubikitch/compile/w3m-0.5.1/file.c	2004-08-27 19:00:27.000000000 +0900
@@ -4148,17 +4148,37 @@
 	flushline(h_env, obuf, envs[h_env->envc].indent, 1, h_env->limit);
 	h_env->blank_lines = 0;
 	return 1;
-    case HTML_H:
+    case HTML_H1:
+    case HTML_H2:
+    case HTML_H3:
+    case HTML_H4:
+    case HTML_H5:
+    case HTML_H6:
 	if (!(obuf->flag & (RB_PREMODE | RB_IGNORE_P))) {
 	    flushline(h_env, obuf, envs[h_env->envc].indent, 0, h_env->limit);
 	    do_blankline(h_env, obuf, envs[h_env->envc].indent, 0,
 			 h_env->limit);
 	}
+        if(cmd == HTML_H1)
+            HTMLlineproc1("<u>", h_env);
 	HTMLlineproc1("<b>", h_env);
+        {
+            int i;
+            for(i=0;i<=cmd-HTML_H1;i++)
+                HTMLlineproc1("=", h_env);
+            HTMLlineproc1(" ", h_env);
+        }
 	set_alignment(obuf, tag);
 	return 1;
-    case HTML_N_H:
+    case HTML_N_H1:
+    case HTML_N_H2:
+    case HTML_N_H3:
+    case HTML_N_H4:
+    case HTML_N_H5:
+    case HTML_N_H6:
 	HTMLlineproc1("</b>", h_env);
+        if(cmd == HTML_N_H1)
+            HTMLlineproc1("</u>", h_env);
 	if (!(obuf->flag & RB_PREMODE)) {
 	    flushline(h_env, obuf, envs[h_env->envc].indent, 0, h_env->limit);
 	}
diff -u /tmp/w3m-0.5.1/html.c /home/rubikitch/compile/w3m-0.5.1/html.c
--- /tmp/w3m-0.5.1/html.c	2003-09-27 05:48:21.000000000 +0900
+++ /home/rubikitch/compile/w3m-0.5.1/html.c	2004-08-27 19:00:58.000000000 +0900
@@ -124,8 +124,18 @@
     {NULL, NULL, 0, 0},		/*   0 HTML_UNKNOWN    */
     {"a", ALST_A, MAXA_A, 0},	/*   1 HTML_A          */
     {"/a", NULL, 0, TFLG_END},	/*   2 HTML_N_A        */
-    {"h", ALST_P, MAXA_P, 0},	/*   3 HTML_H          */
-    {"/h", NULL, 0, TFLG_END},	/*   4 HTML_N_H        */
+    {"h1", ALST_P, MAXA_P, 0},	/*   3 HTML_H          */
+    {"/h1", NULL, 0, TFLG_END},	/*   4 HTML_N_H        */
+    {"h2", ALST_P, MAXA_P, 0},	/*   3 HTML_H          */
+    {"/h2", NULL, 0, TFLG_END},	/*   4 HTML_N_H        */
+    {"h3", ALST_P, MAXA_P, 0},	/*   3 HTML_H          */
+    {"/h3", NULL, 0, TFLG_END},	/*   4 HTML_N_H        */
+    {"h4", ALST_P, MAXA_P, 0},	/*   3 HTML_H          */
+    {"/h4", NULL, 0, TFLG_END},	/*   4 HTML_N_H        */
+    {"h5", ALST_P, MAXA_P, 0},	/*   3 HTML_H          */
+    {"/h5", NULL, 0, TFLG_END},	/*   4 HTML_N_H        */
+    {"h6", ALST_P, MAXA_P, 0},	/*   3 HTML_H          */
+    {"/h6", NULL, 0, TFLG_END},	/*   4 HTML_N_H        */
     {"p", ALST_P, MAXA_P, 0},	/*   5 HTML_P          */
     {"br", NULL, 0, 0},		/*   6 HTML_BR         */
     {"b", NULL, 0, 0},		/*   7 HTML_B          */
diff -u /tmp/w3m-0.5.1/table.c /home/rubikitch/compile/w3m-0.5.1/table.c
--- /tmp/w3m-0.5.1/table.c	2004-01-10 00:46:49.000000000 +0900
+++ /home/rubikitch/compile/w3m-0.5.1/table.c	2004-08-27 19:03:17.000000000 +0900
@@ -2778,8 +2778,18 @@
 	    break;
     case HTML_DT:
     case HTML_DD:
-    case HTML_H:
-    case HTML_N_H:
+    case HTML_H1:
+    case HTML_H2:
+    case HTML_H3:
+    case HTML_H4:
+    case HTML_H5:
+    case HTML_H6:
+    case HTML_N_H1:
+    case HTML_N_H2:
+    case HTML_N_H3:
+    case HTML_N_H4:
+    case HTML_N_H5:
+    case HTML_N_H6:
     case HTML_LI:
     case HTML_PRE:
     case HTML_N_PRE:
diff -u /tmp/w3m-0.5.1/tagtable.tab /home/rubikitch/compile/w3m-0.5.1/tagtable.tab
--- /tmp/w3m-0.5.1/tagtable.tab	2003-09-23 06:02:22.000000000 +0900
+++ /home/rubikitch/compile/w3m-0.5.1/tagtable.tab	2004-08-27 19:02:05.000000000 +0900
@@ -5,18 +5,18 @@
 /a		HTML_N_A
 _id		HTML_NOP
 hr		HTML_HR
-h1		HTML_H
-h2		HTML_H
-h3		HTML_H
-h4		HTML_H
-h5		HTML_H
-h6		HTML_H
-/h1		HTML_N_H
-/h2		HTML_N_H
-/h3		HTML_N_H
-/h4		HTML_N_H
-/h5		HTML_N_H
-/h6		HTML_N_H
+h1		HTML_H1
+h2		HTML_H2
+h3		HTML_H3
+h4		HTML_H4
+h5		HTML_H5
+h6		HTML_H6
+/h1		HTML_N_H1
+/h2		HTML_N_H2
+/h3		HTML_N_H3
+/h4		HTML_N_H4
+/h5		HTML_N_H5
+/h6		HTML_N_H6
 p		HTML_P
 br		HTML_BR
 b		HTML_B



~/.w3m 
tmp_dir

Index: rc.c
===================================================================
RCS file: /home/cvs/w3m-0.5.1/rc.c,v
retrieving revision 1.2
diff -u -r1.2 rc.c
--- rc.c	5 Sep 2004 01:13:19 -0000	1.2
+++ rc.c	5 Sep 2004 06:59:39 -0000
@@ -121,6 +121,7 @@
 #define CMT_PDROOT      N_("Directory corresponding to /~user")
 #define CMT_CGIBIN      N_("Directory corresponding to /cgi-bin")
 #define CMT_DDIR        N_("Default download directory")
+#define CMT_TMPDIR      N_("Temporary directory")
 
 #define CMT_CONFIRM_QQ  N_("Confirm when quitting with q")
 #define CMT_CLOSE_TAB_BACK N_("Close tab if buffer is last when back")
@@ -507,6 +508,7 @@
     {"cgi_bin", P_STRING, PI_TEXT, (void *)&cgi_bin, CMT_CGIBIN, NULL},
     {"index_file", P_STRING, PI_TEXT, (void *)&index_file, CMT_IFILE, NULL},
     {"download_dir", P_STRING, PI_TEXT, (void *)&download_dir, CMT_DDIR, NULL},
+    {"tmp_dir", P_STRING, PI_TEXT, (void *)&tmp_dir, CMT_TMPDIR, NULL},
     {NULL, 0, 0, NULL, NULL, NULL},
 };
 
Index: po/ja.po
===================================================================
RCS file: /home/cvs/w3m-0.5.1/po/ja.po,v
retrieving revision 1.2
diff -u -r1.2 ja.po
--- po/ja.po	5 Sep 2004 01:13:35 -0000	1.2
+++ po/ja.po	5 Sep 2004 06:59:07 -0000
@@ -312,6 +312,9 @@
 msgid "Default download directory"
 msgstr ""
 
+msgid "Temporary directory"
+msgstr ""
+
 #: rc.c:123
 msgid "Confirm when quitting with q"
 msgstr "q "


[Hit any key]SHELLSHELL2

/m/home/rubikitch/src/w3m-0.5.1 $ diff -u main.c.org main.c; diff -u proto.h.org proto.h; diff -u funcname.tab.org funcname.tab
--- main.c.org	2004-08-27 20:36:00.000000000 +0900
+++ main.c	2004-08-27 20:42:11.000000000 +0900
@@ -2045,10 +2045,10 @@
 }
 
 /* Execute shell command */
-DEFUN(execsh, EXEC_SHELL SHELL, "Execute shell command")
+static void _execsh(int arg)
 {
     char *cmd;
-
+    
     CurrentKeyData = NULL;	/* not allowed in w3m-control: */
     cmd = searchKeyData();
     if (cmd == NULL || *cmd == '\0') {
@@ -2060,16 +2060,32 @@
 	fmTerm();
 	printf("\n");
 	system(cmd);
-	/* FIXME: gettextize? */
-	printf("\n[Hit any key]");
-	fflush(stdout);
-	fmInit();
-	getch();
+        if (arg) {
+          /* FIXME: gettextize? */
+          printf("\n[Hit any key]");
+          fflush(stdout);
+          fmInit();
+          getch();
+        } else {
+          fflush(stdout);
+          fmInit();
+        }
     }
     displayBuffer(Currentbuf, B_FORCE_REDRAW);
 }
 
+DEFUN(execsh, EXEC_SHELL SHELL, "Execute shell command")
+{
+  _execsh(TRUE);
+}
+
+DEFUN(execsh2, EXEC_SHELL2 SHELL2, "Execute shell command")
+{
+  _execsh(FALSE);
+}
+
+
 /* Load file */
 DEFUN(ldfile, LOAD, "Load local file")
 {
--- proto.h.org	2004-08-27 20:39:41.000000000 +0900
+++ proto.h	2004-08-27 20:40:05.000000000 +0900
@@ -33,7 +33,8 @@
 extern void pipesh(void);
 extern void readsh(void);
 extern void execsh(void);
+extern void execsh2(void);
 extern void ldfile(void);
 extern void ldhelp(void);
 extern void movL(void);

--
rubikitch
http://www.rubyist.net/~rubikitch/