w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 925f5ce60dd1d6b4c534cf7c4bf748a1bfcb32a3
parent c6bd580190a0577a86d94ee837d15dc834151a70
Author: ukai <ukai>
Date:   Fri, 23 Nov 2001 22:07:45 +0000

add use_mark

Diffstat:
Mfm.h | 3+++
Mmain.c | 10++++++++++
Mrc.c | 9+++++++++
3 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/fm.h b/fm.h @@ -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 diff --git a/main.c b/main.c @@ -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); diff --git a/rc.c b/rc.c @@ -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