diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-23 22:07:45 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-23 22:07:45 +0000 |
commit | f9ec244bea3b07f84a6cd466d5133fa7c6bbffc0 (patch) | |
tree | feb24a104f3cc9f4c244b848a8dc7d702a15e357 | |
parent | add nextpage_topline (diff) | |
download | w3m-f9ec244bea3b07f84a6cd466d5133fa7c6bbffc0.tar.gz w3m-f9ec244bea3b07f84a6cd466d5133fa7c6bbffc0.zip |
add use_mark
Diffstat (limited to '')
-rw-r--r-- | fm.h | 5 | ||||
-rw-r--r-- | main.c | 12 | ||||
-rw-r--r-- | rc.c | 11 |
3 files changed, 25 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: fm.h,v 1.18 2001/11/23 21:40:19 ukai Exp $ */ +/* $Id: fm.h,v 1.19 2001/11/23 22:07:45 ukai Exp $ */ /* * w3m: WWW wo Miru utility * @@ -703,6 +703,9 @@ global int useVisitedColor init(FALSE); global int visited_color init(5); /* magenta */ #endif /* USE_COLOR */ global int confirm_on_quit init(TRUE); +#ifdef USE_MARK +global int use_mark init(TRUE); +#endif #ifdef EMACS_LIKE_LINEEDIT global int emacs_like_lineedit init(TRUE); #endif @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.21 2001/11/23 21:40:19 ukai Exp $ */ +/* $Id: main.c,v 1.22 2001/11/23 22:07:45 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include <signal.h> @@ -2142,6 +2142,8 @@ void _mark(void) { Line *l; + if (! use_mark) + return; if (Currentbuf->firstLine == NULL) return; l = Currentbuf->currentLine; @@ -2152,6 +2154,8 @@ _mark(void) static void cmd_mark(Lineprop * p) { + if (! use_mark) + return; if ((*p & PM_MARK) && (*p & PE_STAND)) *p &= ~PE_STAND; else if (!(*p & PM_MARK) && !(*p & PE_STAND)) @@ -2166,6 +2170,8 @@ nextMk(void) Line *l; int i; + if (! use_mark) + return; if (Currentbuf->firstLine == NULL) return; i = Currentbuf->pos + 1; @@ -2197,6 +2203,8 @@ prevMk(void) Line *l; int i; + if (! use_mark) + return; if (Currentbuf->firstLine == NULL) return; i = Currentbuf->pos - 1; @@ -2231,6 +2239,8 @@ reMark(void) char *str; char *p, *p1, *p2; + if (! use_mark) + return; str = inputStrHist("(Mark)Regexp: ", MarkString, TextHist); if (str == NULL || *str == '\0') { displayBuffer(Currentbuf, B_NORMAL); @@ -1,4 +1,4 @@ -/* $Id: rc.c,v 1.12 2001/11/23 21:40:19 ukai Exp $ */ +/* $Id: rc.c,v 1.13 2001/11/23 22:07:45 ukai Exp $ */ /* * Initialization file etc. */ @@ -89,6 +89,9 @@ static int rc_initialized = 0; #define CMT_PDROOT "/~user で表されるディレクトリ" #define CMT_CGIBIN "/cgi-bin で表されるディレクトリ" #define CMT_CONFIRM_QQ "q での終了時に確認する" +#ifdef USE_MARK +#define CMT_USE_MARK "マーク機能を有効にする" +#endif #ifdef EMACS_LIKE_LINEEDIT #define CMT_EMACS_LIKE_LINEEDIT "Emacs風の行編集にする" #endif @@ -199,6 +202,9 @@ static int rc_initialized = 0; #define CMT_PDROOT "Directory corresponds to /~user" #define CMT_CGIBIN "Directory corresponds to /cgi-bin" #define CMT_CONFIRM_QQ "Confirm when quitting with q" +#ifdef USE_MARK +#define CMT_USE_MARK "Enable mark operations" +#endif #ifdef EMACS_LIKE_LINEEDIT #define CMT_EMACS_LIKE_LINEEDIT "Emacs-style line editing" #endif @@ -411,6 +417,9 @@ struct param_ptr params3[] = {"save_hist", P_INT, PI_ONOFF, (void *) &SaveURLHist, CMT_SAVEHIST, NULL}, #endif /* USE_HISTORY */ {"confirm_qq", P_INT, PI_ONOFF, (void *) &confirm_on_quit, CMT_CONFIRM_QQ, NULL}, +#ifdef USE_MARK + {"mark", P_INT, PI_ONOFF, (void *) &use_mark, CMT_USE_MARK, NULL }, +#endif #ifdef EMACS_LIKE_LINEEDIT {"emacs_like_lineedit", P_INT, PI_ONOFF, (void *) &emacs_like_lineedit, CMT_EMACS_LIKE_LINEEDIT, NULL }, #endif |