diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-11-21 16:15:57 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-11-21 16:15:57 +0000 |
commit | 200a2e2cb0537118e34ce01be9502555f7e32475 (patch) | |
tree | f6208f088923ec7d8630c4aa1f458a9d10153f63 /main.c | |
parent | fix indent (diff) | |
download | w3m-200a2e2cb0537118e34ce01be9502555f7e32475.tar.gz w3m-200a2e2cb0537118e34ce01be9502555f7e32475.zip |
[w3m-dev 03454] next / previous buffer
* funcname.tab (NEXT): added
(PREV): added
* main.c (nextBf): added
(prevBf): added
* proto.h (nextBf): added
(prevBf): added
* doc/README.func (NEXT): added
(PREV): added
* doc-jp/README.func (NEXT): added
(PREV): added
* scripts/w3mhelp.cgi.in (Buffer operation): nextBf prevBf
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 40 |
1 files changed, 39 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.145 2002/11/19 17:47:59 ukai Exp $ */ +/* $Id: main.c,v 1.146 2002/11/21 16:15:58 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include <signal.h> @@ -3699,6 +3699,44 @@ nextU(void) nextY(-1); } +/* go to the next bufferr */ +void +nextBf(void) +{ + Buffer *buf; + int i; + + for (i = 0; i < PREC_NUM; i++) { + buf = prevBuffer(Firstbuf, Currentbuf); + if (!buf) { + if (i == 0) + return; + break; + } + Currentbuf = buf; + } + displayBuffer(Currentbuf, B_FORCE_REDRAW); +} + +/* go to the previous bufferr */ +void +prevBf(void) +{ + Buffer *buf; + int i; + + for (i = 0; i < PREC_NUM; i++) { + buf = Currentbuf->nextBuffer; + if (!buf) { + if (i == 0) + return; + break; + } + Currentbuf = buf; + } + displayBuffer(Currentbuf, B_FORCE_REDRAW); +} + static int checkBackBuffer(Buffer *buf) { |