$B$k$S$-$A$G$9!#(B
$B$5$C$-=P$7$?%Q%C%A$O<h$j>C$7$F$/$@$5$$!#(B
displayBuffer$B$X$N=$@5$,ITB-$7$F$$$?$N$G!#(B
diff -u w3m-0.1.6/ w3m
diff -u w3m-0.1.6/config.h w3m/config.h
--- w3m-0.1.6/config.h Mon Apr 3 16:18:49 2000
+++ w3m/config.h Mon Apr 3 16:02:45 2000
@@ -13,6 +13,7 @@
*/
#undef DICT
+#define BUFINFO
/*
If you define USE_MARK, you can use set-mark (C-SPC),
goto-next-mark (ESC p), goto-next-mark (ESC n) and
diff -u w3m-0.1.6/display.c w3m/display.c
--- w3m-0.1.6/display.c Fri Jan 21 16:14:07 2000
+++ w3m/display.c Mon Apr 3 17:13:08 2000
@@ -251,6 +251,9 @@
message(msg->ptr, buf->cursorX, buf->cursorY);
standend();
refresh();
+#ifdef BUFINFO
+ saveBufferInfo();
+#endif
}
void
diff -u w3m-0.1.6/main.c w3m/main.c
--- w3m-0.1.6/main.c Fri Jan 21 16:18:58 2000
+++ w3m/main.c Mon Apr 3 17:08:50 2000
@@ -414,6 +414,9 @@
Currentbuf = newbuf;
}
}
+#ifdef BUFINFO
+ saveBufferInfo();
+#endif
}
else {
/* When no arguments other than options are given... */
@@ -614,6 +617,20 @@
if (c == '~')
EscDKeymap[d] ();
}
+static char * currentURL(void);
+
+void
+saveBufferInfo()
+{
+ FILE * fp;
+ if((fp = fopen(rcFile("bufinfo"),"w")) == NULL){
+ return;
+ } else {
+ fprintf(fp, "%s\n", currentURL());
+ fclose(fp);
+ }
+}
+
static void
pushBuffer(Buffer *buf)
@@ -628,8 +645,12 @@
buf->nextBuffer = Currentbuf;
Currentbuf = buf;
}
+#ifdef BUFINFO
+ saveBufferInfo();
+#endif
}
+
static void
delBuffer(Buffer *buf)
{
@@ -2650,15 +2671,21 @@
}
/* show current URL */
-void
-curURL(void)
+static char *
+currentURL(void)
{
Str s;
if (Currentbuf->bufferprop & BP_INTERNAL)
- return;
+ return "";
s = parsedURL2Str(&Currentbuf->currentURL);
- disp_message(s->ptr, T);
+ return s->ptr;
+}
+
+void
+curURL(void)
+{
+ disp_message(currentURL(), T);
}
diff -u w3m-0.1.6/proto.h w3m/proto.h
--- w3m-0.1.6/proto.h Fri Jan 21 16:18:58 2000
+++ w3m/proto.h Mon Apr 3 17:06:10 2000
@@ -453,5 +453,5 @@
#endif
extern void wrapToggle( void );
-
+extern void saveBufferInfo ( void );
#include "indep.h"
This archive was generated by hypermail 2b29 : Wed Jul 19 2000 - 10:30:55 CDT