add use_mark

This commit is contained in:
Fumitoshi UKAI
2001-11-23 22:07:45 +00:00
parent da4c9c4db7
commit f9ec244bea
3 changed files with 25 additions and 3 deletions

5
fm.h
View File

@@ -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

12
main.c
View File

@@ -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);

11
rc.c
View File

@@ -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 <20><>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǥ<EFBFBD><C7A5><EFBFBD>ȥ<EFBFBD>"
#define CMT_CGIBIN "/cgi-bin <20><>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǥ<EFBFBD><C7A5><EFBFBD>ȥ<EFBFBD>"
#define CMT_CONFIRM_QQ "q <20>Ǥν<C7A4>λ<EFBFBD><CEBB><EFBFBD>˳<EFBFBD>ǧ<EFBFBD><C7A7><EFBFBD><EFBFBD>"
#ifdef USE_MARK
#define CMT_USE_MARK "<22>ޡ<EFBFBD><DEA1><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><C7BD>ͭ<EFBFBD><CDAD><EFBFBD>ˤ<EFBFBD><CBA4><EFBFBD>"
#endif
#ifdef EMACS_LIKE_LINEEDIT
#define CMT_EMACS_LIKE_LINEEDIT "Emacs<63><73><EFBFBD>ι<EFBFBD><CEB9>Խ<EFBFBD><D4BD>ˤ<EFBFBD><CBA4><EFBFBD>"
#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