aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-04-06 16:27:53 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-04-06 16:27:53 +0000
commita603190b2e1702537f859a648eb5e2b6910ff2e4 (patch)
tree6ae3da1ae67bc54359266d1939ca98395e32ec54 /main.c
parent[w3m-dev 03838] W3M_LIBS splitted from LIBS (diff)
downloadw3m-a603190b2e1702537f859a648eb5e2b6910ff2e4.tar.gz
w3m-a603190b2e1702537f859a648eb5e2b6910ff2e4.zip
[w3m-dev 03843] cleanup macros
* config.h.dist config.h.in etc.c file.c fm.h ftp.c linein.c main.c rc.c: delete EMACS_LIKE_LINEEDIT, VI_PREC_NUM, LABEL_TOPLINE, NEXTPAGE_TOPLINE, FTPPASS_HOSTNAMEGEN use_mark default FALSE emacs_like_lineedit default FALSE vi_prec_num default FALSE add UseHistory, use_history * NEWS: rc: use_history From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat (limited to 'main.c')
-rw-r--r--main.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/main.c b/main.c
index 2967b20..df04964 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.219 2003/03/23 15:21:02 ukai Exp $ */
+/* $Id: main.c,v 1.220 2003/04/06 16:27:54 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -410,7 +410,8 @@ main(int argc, char **argv, char **envp)
TextHist = newHist();
URLHist = newHist();
#ifdef USE_HISTORY
- loadHistory(URLHist);
+ if (UseHistory)
+ loadHistory(URLHist);
#endif /* not USE_HISTORY */
if (!non_null(HTTP_proxy) &&
@@ -1420,11 +1421,9 @@ nscroll(int n, int mode)
else {
tlnum = buf->topLine->linenumber;
llnum = buf->topLine->linenumber + buf->LINES - 1;
-#ifdef NEXTPAGE_TOPLINE
if (nextpage_topline)
diff_n = 0;
else
-#endif
diff_n = n - (tlnum - top->linenumber);
if (lnum < tlnum)
lnum = tlnum + diff_n;
@@ -1462,11 +1461,9 @@ nscroll(int n, int mode)
void
pgFore(void)
{
-#ifdef VI_PREC_NUM
if (vi_prec_num)
nscroll(searchKeyNum() * (Currentbuf->LINES - 1), B_NORMAL);
else
-#endif
nscroll(prec_num ? searchKeyNum() : searchKeyNum()
* (Currentbuf->LINES - 1), prec_num ? B_SCROLL : B_NORMAL);
}
@@ -1475,11 +1472,9 @@ pgFore(void)
void
pgBack(void)
{
-#ifdef VI_PREC_NUM
if (vi_prec_num)
nscroll(-searchKeyNum() * (Currentbuf->LINES - 1), B_NORMAL);
else
-#endif
nscroll(-(prec_num ? searchKeyNum() : searchKeyNum()
* (Currentbuf->LINES - 1)), prec_num ? B_SCROLL : B_NORMAL);
}
@@ -2346,7 +2341,7 @@ _quitfm(int confirm)
save_cookies();
#endif /* USE_COOKIE */
#ifdef USE_HISTORY
- if (SaveURLHist)
+ if (UseHistory && SaveURLHist)
saveHistory(URLHist, URLHistSize);
#endif /* USE_HISTORY */
w3m_exit(0);
@@ -2795,14 +2790,12 @@ loadLink(char *url, char *target, char *referer, FormList *request)
}
if (al) {
gotoLine(Currentbuf, al->start.line);
-#ifdef LABEL_TOPLINE
if (label_topline)
Currentbuf->topLine = lineSkip(Currentbuf, Currentbuf->topLine,
Currentbuf->currentLine->
linenumber -
Currentbuf->topLine->linenumber,
FALSE);
-#endif
Currentbuf->pos = al->start.pos;
arrangeCursor(Currentbuf);
}
@@ -2832,13 +2825,11 @@ gotoLabel(char *label)
(*buf->clone)++;
pushBuffer(buf);
gotoLine(Currentbuf, al->start.line);
-#ifdef LABEL_TOPLINE
if (label_topline)
Currentbuf->topLine = lineSkip(Currentbuf, Currentbuf->topLine,
Currentbuf->currentLine->linenumber
- Currentbuf->topLine->linenumber,
FALSE);
-#endif
Currentbuf->pos = al->start.pos;
arrangeCursor(Currentbuf);
displayBuffer(Currentbuf, B_FORCE_REDRAW);