[w3m-dev 00721] configuration of CLEAR_BUF

From: Hironori Sakamoto (h-saka@lsi.nec.co.jp)
Date: Thu May 25 2000 - 22:46:08 CDT


$B:dK\$G$9!#(B
$B8E$$(B(?)$BOCBj$G$9$,!#(B

>> $B:dK\$G$9!#(B
>> >> $B$d$^$F(B@$B5YF|=P6P$G$9!#$3$NJ8>O$O!"%a!<%kFI$_FI$_%3!<%IFI$_FI$_%F%9%H(B
>> ($BN,(B)
>> >> > >> $B!&(Bdefine CLEAR_BUF $B$N>l9g$K(B HTML $B0J30$N(B local $B%U%!%$%k$,(Breload
>> >> $B$$$:$l$K$;$h!"<+J,$N4D6-$,CY$$(BCPU$B$KBg$-$a$N2>A[%a%b%j$J$N$G!";~4|$r(B
>> >> $B8+$F(Bundef CLEAR_BUF $B$KLa$=$&$+$H9M$($F$$$^$9!#;w$?$h$&$J(B ($B5l<0$N%^%7%s(B
>> >> $B$K%a%b%j$@$1Ej;q$7$F(BUNIX$B$G;H$C$F$$$k(B) $B?M$OB?$$$H;W$&$N$G!"$3$l$,(B
>> >> configurable$B$@$H$&$l$7$$$J$!!"$H$+!#(B
>> $B:r:#$N(B Linux/FreeBSD $B$G$N(B package ($B%P%$%J%j(B) $BG[I[$N>u67$r9M$($k$H!"(B
>> $BF0:n$KBg$-$/$+$+$o$k$b$N$O!"(B~/.w3m/config $B$G$NJQ99$K$9$Y$-$H;W$$$^$9!#(B

CLEAR_BUF $B$r(B ~/.w3m/config $B$GJQ99$G$-$kMM$K$7$F$_$^$7$?!#(B
$B!t(B $BF0:n%A%'%C%/;~$N(B re-make $B$,7y$K$J$C$?$N$G!#(B
-----------------------------------
$B:dK\(B $B9@B'(B <hsaka@mth.biglobe.ne.jp>
 http://www2u.biglobe.ne.jp/~hsaka/
$B#6!?#7$^$G$KDY$;$kCn$ODY$7$F$7$^$*$&!*(B

--- configure.orig Wed May 24 12:07:45 2000
+++ configure Fri May 26 12:13:24 2000
@@ -1401,11 +1401,6 @@
 #define ID_EXT
 
 /*
- * Free memory of the undisplayed buffers
- */
-#define CLEAR_BUF
-
-/*
  * Save Current-buffer Information
  */
 #define BUFINFO
--- config.h.orig Thu May 25 17:24:16 2000
+++ config.h Fri May 26 12:13:20 2000
@@ -62,11 +62,6 @@
 #define ID_EXT
 
 /*
- * Free memory of the undisplayed buffers
- */
-#define CLEAR_BUF
-
-/*
  * Save Current-buffer Information
  */
 #define BUFINFO
--- proto.h.orig Wed May 24 13:45:04 2000
+++ proto.h Fri May 26 12:14:18 2000
@@ -478,9 +478,7 @@
 #define dictwordat nulcmd
 #endif /* not DICT */
 
-#ifdef CLEAR_BUF
 extern void reloadBuffer(Buffer *buf);
-#endif /* CLEAR_BUF */
 
 extern char *guess_save_name(char *file);
 
--- fm.h.orig Thu May 25 17:14:49 2000
+++ fm.h Fri May 26 12:21:49 2000
@@ -276,9 +276,7 @@
     int allLine;
     short bufferprop;
     short currentColumn;
-#ifdef CLEAR_BUF
     short currentLineNum;
-#endif
     short cursorX;
     short cursorY;
     short pos;
@@ -666,9 +664,8 @@
 global int ssl_path_modified init(FALSE);
 #endif /* defined(USE_SSL) && defined(USE_SSL_VERIFY) */
 
-#ifdef CLEAR_BUF
 global int is_redisplay init(FALSE);
-#endif
+global int clear_buffer init(TRUE);
 
 /*
  * Externals
--- display.c.orig Fri May 26 11:10:16 2000
+++ display.c Fri May 26 12:22:20 2000
@@ -183,14 +183,11 @@
 {
     Str msg = Strnew();
     Anchor *aa;
-#ifdef CLEAR_BUF
     AnchorList *formitem;
-#endif
 
     if (in_check_url)
       return;
-#ifdef CLEAR_BUF
- if (buf->sourcefile != NULL && buf->topLine == NULL) {
+ if (buf->sourcefile != NULL && buf->topLine == NULL) { /* clear_buffer */
        formitem = buf->formitem;
         reloadBuffer(buf);
         in_check_url = TRUE;
@@ -206,7 +203,6 @@
        formResetBuffer(buf, formitem);
     mode = B_FORCE_REDRAW;
     }
-#endif
 
     if (buf->width == 0)
         buf->width = COLS;
--- file.c.orig Fri May 26 10:17:17 2000
+++ file.c Fri May 26 12:16:05 2000
@@ -3269,11 +3269,7 @@
                               refresh, cur_hseq++, q, q);
                 push_str(obuf, s_tmp->length, tmp, PC_ASCII);
                 flushline(h_env, obuf, envs[h_env->envc].indent, 0, h_env->limit);
- if (
-#ifdef CLEAR_BUF
- !is_redisplay &&
-#endif /* CLEAR_BUF */
- refresh == 0) {
+ if (!is_redisplay && refresh == 0) {
                     pushEvent(FUNCNAME_goURL, s_tmp->ptr);
                     /* pushEvent(deletePrevBuf,NULL); */
                 }
@@ -5677,7 +5673,6 @@
     return fp;
 }
 
-#ifdef CLEAR_BUF
 void
 reloadBuffer(Buffer *buf)
 {
@@ -5705,7 +5700,6 @@
         loadBuffer(&uf,buf);
     is_redisplay = FALSE;
 }
-#endif /* CLEAR_BUF */
 
 #ifdef JP_CHARSET
 static char
--- main.c.orig Fri May 26 11:55:40 2000
+++ main.c Fri May 26 12:22:13 2000
@@ -727,7 +727,6 @@
         w3mFuncList[(int) EscDKeymap[d]].func();
 }
 
-#ifdef CLEAR_BUF
 static void
 tmpClearBuffer(Buffer *buf)
 {
@@ -741,7 +740,6 @@
         buf->lastLine = NULL;
     }
 }
-#endif
 
 static char * currentURL(void);
 
@@ -762,9 +760,9 @@
 pushBuffer(Buffer * buf)
 {
     Buffer *b;
-#ifdef CLEAR_BUF
- tmpClearBuffer(Currentbuf);
-#endif
+
+ if (clear_buffer)
+ tmpClearBuffer(Currentbuf);
     if (Firstbuf == Currentbuf) {
         buf->nextBuffer = Firstbuf;
         Firstbuf = Currentbuf = buf;
@@ -1522,11 +1520,11 @@
             break;
         }
     } while (!ok);
-#ifdef CLEAR_BUF
- for (buf = Firstbuf; buf != NULL; buf = buf->nextBuffer) {
- tmpClearBuffer(buf);
+
+ if (clear_buffer) {
+ for (buf = Firstbuf; buf != NULL; buf = buf->nextBuffer)
+ tmpClearBuffer(buf);
     }
-#endif /* CLEAR_BUF */
     displayBuffer(Currentbuf, B_FORCE_REDRAW);
 }
 
--- rc.c.orig Wed May 24 10:48:19 2000
+++ rc.c Fri May 26 12:21:47 2000
@@ -108,6 +108,7 @@
 #define CMT_MOUSE "$B%^%&%9$r;H$&(B"
 #define CMT_REVERSE_MOUSE "$B%^%&%9$N%I%i%C%0F0:n$r5U$K$9$k(B"
 #endif /* MOUSE */
+#define CMT_CLEAR_BUF "$BI=<($5$l$F$$$J$$%P%C%U%!$N%a%b%j$r3+J|$9$k(B"
 #define CMT_NOSENDREFERER "Referer: $B$rAw$i$J$$$h$&$K$9$k(B"
 #if defined(USE_SSL) && defined(USE_SSL_VERIFY)
 #define CMT_SSL_VERIFY_SERVER "SSL$B$N%5!<%PG'>Z$r9T$&(B"
@@ -172,6 +173,7 @@
 #define CMT_MOUSE "Use mouse"
 #define CMT_REVERSE_MOUSE "Reverse mouse dragging action"
 #endif /* MOUSE */
+#define CMT_CLEAR_BUF "Free memory of the undisplayed buffers"
 #define CMT_NOSENDREFERER "Don't send header `Referer:'"
 #if defined(USE_SSL) && defined(USE_SSL_VERIFY)
 #define CMT_SSL_VERIFY_SERVER "Perform SSL server verification"
@@ -294,6 +296,7 @@
     {"reverse_mouse", P_INT, PI_ONOFF, (void *) &reverse_mouse, CMT_REVERSE_MOUSE, NULL},
 #endif /* MOUSE */
     {"retry_http", P_INT, PI_ONOFF, (void *) &retryAsHttp, CMT_RETRY_HTTP, NULL},
+ {"clear_buffer", P_INT, PI_ONOFF, (void *) &clear_buffer, CMT_CLEAR_BUF, NULL},
     {NULL, 0, 0, NULL, NULL, NULL},
 };
 



This archive was generated by hypermail 2b29 : Wed Jul 19 2000 - 10:30:56 CDT