[w3m-dev 02481] Re: #ifdef cleanup
From: Fumitoshi UKAI <ukai@debian.or.jp>
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
2001-11-21 Fumitoshi UKAI <ukai@debian.or.jp>
|
||||
|
||||
* [w3m-dev 02481]
|
||||
* s/BG_COLOR/USE_BG_COLOR/
|
||||
* s/ANSI_COLOR/USE_ANSI_COLOR/
|
||||
* s/COLOR/USE_COLOR/
|
||||
* s/MENU/USE_MENU/
|
||||
* s/MOUSE/USE_MOUSE/
|
||||
|
||||
* [w3m-dev 02480] new configure
|
||||
* config.h.dist: updated
|
||||
* configure: $def_emacs_like_lineedit, $def_vi_prec_num
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: backend.c,v 1.3 2001/11/20 17:49:23 ukai Exp $ */
|
||||
/* $Id: backend.c,v 1.4 2001/11/21 19:24:35 ukai Exp $ */
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
@@ -301,9 +301,9 @@ int backend( void ){
|
||||
|
||||
w3m_dump = 0;
|
||||
if (COLS == 0) COLS = 80;
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
use_mouse = FALSE;
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
|
||||
if( backend_batch_commands ){
|
||||
while(( str = popText(backend_batch_commands) ))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* $Id: buffer.c,v 1.4 2001/11/20 17:49:23 ukai Exp $ */
|
||||
/* $Id: buffer.c,v 1.5 2001/11/21 19:24:35 ukai Exp $ */
|
||||
#include "fm.h"
|
||||
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
#ifdef USE_GPM
|
||||
#include <gpm.h>
|
||||
#endif
|
||||
@@ -9,7 +9,7 @@
|
||||
extern int do_getch();
|
||||
#define getch() do_getch()
|
||||
#endif /* USE_GPM */
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
|
||||
#ifdef __EMX__
|
||||
#include <sys/kbdscan.h>
|
||||
@@ -314,14 +314,14 @@ listBuffer(Buffer * top, Buffer * current)
|
||||
Buffer *buf = top;
|
||||
|
||||
move(0, 0);
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
if (useColor) {
|
||||
setfcolor(basic_color);
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
setbcolor(bg_color);
|
||||
#endif /* BG_COLOR */
|
||||
#endif /* USE_BG_COLOR */
|
||||
}
|
||||
#endif /* COLOR */
|
||||
#endif /* USE_COLOR */
|
||||
clrtobotx();
|
||||
for (i = 0; i < LASTLINE; i++) {
|
||||
if (buf == current) {
|
||||
@@ -575,7 +575,7 @@ writeBufferCache(Buffer *buf)
|
||||
Str tmp;
|
||||
FILE *cache = NULL;
|
||||
Line *l;
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
int colorflag;
|
||||
#endif
|
||||
|
||||
@@ -603,7 +603,7 @@ writeBufferCache(Buffer *buf)
|
||||
fwrite(l->lineBuf, 1, l->len, cache) < l->len ||
|
||||
fwrite(l->propBuf, sizeof(Lineprop), l->len, cache) < l->len)
|
||||
goto _error;
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
colorflag = l->colorBuf ? 1 : 0;
|
||||
if (fwrite1(colorflag, cache))
|
||||
goto _error;
|
||||
@@ -630,7 +630,7 @@ readBufferCache(Buffer *buf)
|
||||
FILE *cache;
|
||||
Line *l = NULL, *prevl;
|
||||
long lnum = 0, clnum, tlnum;
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
int colorflag;
|
||||
#endif
|
||||
|
||||
@@ -669,7 +669,7 @@ readBufferCache(Buffer *buf)
|
||||
l->lineBuf[l->len] = '\0';
|
||||
l->propBuf = NewAtom_N(Lineprop, l->len);
|
||||
fread(l->propBuf, sizeof(Lineprop), l->len, cache);
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
if (fread1(colorflag, cache))
|
||||
break;
|
||||
if (colorflag) {
|
||||
|
||||
+6
-6
@@ -20,9 +20,9 @@
|
||||
#define USE_HISTORY
|
||||
|
||||
/*
|
||||
BG_COLOR enables w3m to set background color.
|
||||
USE_BG_COLOR enables w3m to set background color.
|
||||
*/
|
||||
#define BG_COLOR
|
||||
#define USE_BG_COLOR
|
||||
|
||||
/*
|
||||
* Do word fill
|
||||
@@ -91,17 +91,17 @@ MODEL=Linux.i686-monster-ja
|
||||
#define EN 1
|
||||
#define LANG JA
|
||||
#define KANJI_SYMBOLS
|
||||
#define COLOR
|
||||
#undef ANSI_COLOR
|
||||
#define USE_COLOR
|
||||
#undef USE_ANSI_COLOR
|
||||
#undef EMACS_LIKE_LINEEDIT
|
||||
#undef VI_PREC_NUM
|
||||
#undef USE_MARK
|
||||
#undef LABEL_TOPLINE
|
||||
#undef NEXTPAGE_TOPLINE
|
||||
#define MOUSE
|
||||
#define USE_MOUSE
|
||||
#define USE_GPM
|
||||
#undef USE_SYSMOUSE
|
||||
#define MENU
|
||||
#define USE_MENU
|
||||
#define USE_COOKIE
|
||||
#define USE_SSL
|
||||
#undef USE_SSL_VERIFY
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $Id: configure,v 1.11 2001/11/21 18:51:48 ukai Exp $
|
||||
# $Id: configure,v 1.12 2001/11/21 19:24:35 ukai Exp $
|
||||
# Configuration.
|
||||
#
|
||||
|
||||
@@ -517,9 +517,9 @@ echo "Do you want ANSI color escape sequences support?"
|
||||
yesno ansi_color "$ansi_color" n
|
||||
echo "ansi_color=$ansi_color" >> config.param
|
||||
if [ "$ansi_color" = y ]; then
|
||||
def_ansi_color="#define ANSI_COLOR"
|
||||
def_ansi_color="#define USE_ANSI_COLOR"
|
||||
else
|
||||
def_ansi_color="#undef ANSI_COLOR"
|
||||
def_ansi_color="#undef USE_ANSI_COLOR"
|
||||
fi
|
||||
|
||||
|
||||
@@ -584,45 +584,45 @@ dmodel_save="$dmodel"
|
||||
dmodel=$ans
|
||||
case "$ans" in
|
||||
1)
|
||||
use_color=n; def_color="#undef COLOR"
|
||||
use_menu=n; def_menu="#undef MENU"
|
||||
use_mouse=n; def_mouse="#undef MOUSE"
|
||||
use_color=n; def_color="#undef USE_COLOR"
|
||||
use_menu=n; def_menu="#undef USE_MENU"
|
||||
use_mouse=n; def_mouse="#undef USE_MOUSE"
|
||||
use_cookie=n; def_cookie="#undef USE_COOKIE"
|
||||
use_ssl=n; def_ssl="#undef USE_SSL"
|
||||
save_params
|
||||
customized=y
|
||||
;;
|
||||
2)
|
||||
use_color=y; def_color="#define COLOR"
|
||||
use_menu=y; def_menu="#define MENU"
|
||||
use_mouse=n; def_mouse="#undef MOUSE"
|
||||
use_color=y; def_color="#define USE_COLOR"
|
||||
use_menu=y; def_menu="#define USE_MENU"
|
||||
use_mouse=n; def_mouse="#undef USE_MOUSE"
|
||||
use_cookie=n; def_cookie="#undef USE_COOKIE"
|
||||
use_ssl=n; def_ssl="#undef USE_SSL"
|
||||
save_params
|
||||
customized=y
|
||||
;;
|
||||
3)
|
||||
use_color=y; def_color="#define COLOR"
|
||||
use_menu=y; def_menu="#define MENU"
|
||||
use_mouse=y; def_mouse="#define MOUSE"
|
||||
use_color=y; def_color="#define USE_COLOR"
|
||||
use_menu=y; def_menu="#define USE_MENU"
|
||||
use_mouse=y; def_mouse="#define USE_MOUSE"
|
||||
use_cookie=n; def_cookie="#undef USE_COOKIE"
|
||||
use_ssl=n; def_ssl="#undef USE_SSL"
|
||||
save_params
|
||||
customized=y
|
||||
;;
|
||||
4)
|
||||
use_color=y; def_color="#define COLOR"
|
||||
use_menu=y; def_menu="#define MENU"
|
||||
use_mouse=y; def_mouse="#define MOUSE"
|
||||
use_color=y; def_color="#define USE_COLOR"
|
||||
use_menu=y; def_menu="#define USE_MENU"
|
||||
use_mouse=y; def_mouse="#define USE_MOUSE"
|
||||
use_cookie=y; def_cookie="#define USE_COOKIE"
|
||||
use_ssl=n; def_ssl="#undef USE_SSL"
|
||||
save_params
|
||||
customized=y
|
||||
;;
|
||||
5)
|
||||
use_color=y; def_color="#define COLOR"
|
||||
use_menu=y; def_menu="#define MENU"
|
||||
use_mouse=y; def_mouse="#define MOUSE"
|
||||
use_color=y; def_color="#define USE_COLOR"
|
||||
use_menu=y; def_menu="#define USE_MENU"
|
||||
use_mouse=y; def_mouse="#define USE_MOUSE"
|
||||
use_cookie=y; def_cookie="#define USE_COOKIE"
|
||||
use_ssl=y; def_ssl="#define USE_SSL"
|
||||
find_ssl
|
||||
@@ -655,27 +655,27 @@ echo "Do you want to use color ESC sequence for kterm/pxvt "
|
||||
yesno use_color "$use_color" y
|
||||
echo "use_color=$use_color" >> config.param
|
||||
if [ "$use_color" = y ]; then
|
||||
def_color="#define COLOR"
|
||||
def_color="#define USE_COLOR"
|
||||
else
|
||||
def_color="#undef COLOR"
|
||||
def_color="#undef USE_COLOR"
|
||||
fi
|
||||
|
||||
echo 'Do you want to use mouse? (It requires xterm/kterm)'
|
||||
yesno use_mouse "$use_mouse" n
|
||||
echo "use_mouse=$use_mouse" >> config.param
|
||||
if [ "$use_mouse" = y ]; then
|
||||
def_mouse="#define MOUSE"
|
||||
def_mouse="#define USE_MOUSE"
|
||||
else
|
||||
def_mouse="#undef MOUSE"
|
||||
def_mouse="#undef USE_MOUSE"
|
||||
fi
|
||||
|
||||
echo "Do you want to use popup menu?"
|
||||
yesno use_menu "$use_menu" y
|
||||
echo "use_menu=$use_menu" >> config.param
|
||||
if [ "$use_menu" = y ]; then
|
||||
def_menu="#define MENU"
|
||||
def_menu="#define USE_MENU"
|
||||
else
|
||||
def_menu="#undef MENU"
|
||||
def_menu="#undef USE_MENU"
|
||||
fi
|
||||
|
||||
#echo "Do you want to use matrix in rendering table?"
|
||||
@@ -1841,9 +1841,9 @@ cat > config.h << END_OF_CONFIG_H
|
||||
#define USE_HISTORY
|
||||
|
||||
/*
|
||||
BG_COLOR enables w3m to set background color.
|
||||
USE_BG_COLOR enables w3m to set background color.
|
||||
*/
|
||||
#define BG_COLOR
|
||||
#define USE_BG_COLOR
|
||||
|
||||
/*
|
||||
* Do word fill
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/* $Id: display.c,v 1.5 2001/11/21 09:09:10 ukai Exp $ */
|
||||
/* $Id: display.c,v 1.6 2001/11/21 19:24:35 ukai Exp $ */
|
||||
#include <signal.h>
|
||||
#include "fm.h"
|
||||
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
|
||||
#define EFFECT_ANCHOR_START effect_anchor_start()
|
||||
#define EFFECT_ANCHOR_END effect_anchor_end()
|
||||
@@ -108,7 +108,7 @@ static void EFFECT_VISITED_END
|
||||
}
|
||||
}
|
||||
|
||||
#else /* not COLOR */
|
||||
#else /* not USE_COLOR */
|
||||
|
||||
#define EFFECT_ANCHOR_START underline()
|
||||
#define EFFECT_ANCHOR_END underlineend()
|
||||
@@ -121,7 +121,7 @@ static void EFFECT_VISITED_END
|
||||
#define EFFECT_VISITED_START /**/
|
||||
#define EFFECT_VISITED_END /**/
|
||||
|
||||
#endif /* not COLOR */
|
||||
#endif /* not USE_COLOR */
|
||||
|
||||
|
||||
#ifndef KANJI_SYMBOLS
|
||||
@@ -139,10 +139,10 @@ fmTerm(void)
|
||||
move(LASTLINE, 0);
|
||||
clrtoeolx();
|
||||
refresh();
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
if (use_mouse)
|
||||
mouse_end();
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
reset_tty();
|
||||
fmInitialized = FALSE;
|
||||
}
|
||||
@@ -178,7 +178,7 @@ static int anch_mode = 0, emph_mode = 0, imag_mode = 0, form_mode = 0,
|
||||
#ifndef KANJI_SYMBOLS
|
||||
static int graph_mode = 0;
|
||||
#endif /* not KANJI_SYMBOLS */
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
static Linecolor color_mode = 0;
|
||||
#endif
|
||||
|
||||
@@ -250,7 +250,7 @@ displayBuffer(Buffer * buf, int mode)
|
||||
if (buf->topLine == NULL)
|
||||
buf->topLine = buf->firstLine;
|
||||
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
if (use_mouse)
|
||||
#if LANG == JA
|
||||
msg = Strnew_charp("¢ã¢¬¢");
|
||||
@@ -258,7 +258,7 @@ displayBuffer(Buffer * buf, int mode)
|
||||
msg = Strnew_charp("<=UpDn ");
|
||||
#endif /* LANG != JA */
|
||||
else
|
||||
#endif /* not MOUSE */
|
||||
#endif /* not USE_MOUSE */
|
||||
msg = Strnew();
|
||||
Strcat_charp(msg, "Viewing <");
|
||||
Strcat_charp(msg, buf->buffername);
|
||||
@@ -333,14 +333,14 @@ redrawNLine(Buffer * buf, int n)
|
||||
Line *l, *l0;
|
||||
int i;
|
||||
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
if (useColor) {
|
||||
EFFECT_ANCHOR_END_C;
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
setbcolor(bg_color);
|
||||
#endif /* BG_COLOR */
|
||||
#endif /* USE_BG_COLOR */
|
||||
}
|
||||
#endif /* COLOR */
|
||||
#endif /* USE_COLOR */
|
||||
for (i = 0, l = buf->topLine; i < LASTLINE; i++) {
|
||||
if (i >= LASTLINE - n || i < -n)
|
||||
l0 = redrawLine(buf, l, i);
|
||||
@@ -364,10 +364,10 @@ redrawLine(Buffer * buf, Line * l, int i)
|
||||
int column = buf->currentColumn;
|
||||
char *p;
|
||||
Lineprop *pr;
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
Linecolor *pc;
|
||||
#endif
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
Anchor *a;
|
||||
ParsedURL url;
|
||||
int k, vpos = -1;
|
||||
@@ -412,7 +412,7 @@ redrawLine(Buffer * buf, Line * l, int i)
|
||||
pos = columnPos(l, column);
|
||||
p = &(l->lineBuf[pos]);
|
||||
pr = &(l->propBuf[pos]);
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
if (useColor && l->colorBuf)
|
||||
pc = &(l->colorBuf[pos]);
|
||||
else
|
||||
@@ -424,7 +424,7 @@ redrawLine(Buffer * buf, Line * l, int i)
|
||||
delta = 1;
|
||||
#endif
|
||||
for (j = 0; rcol - column < buf->COLS && pos + j < l->len; j += delta) {
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
if (useVisitedColor && vpos <= pos + j && !(pr[j] & PE_VISITED)) {
|
||||
a = retrieveAnchor(buf->href, l->linenumber, pos + j);
|
||||
if (a) {
|
||||
@@ -446,7 +446,7 @@ redrawLine(Buffer * buf, Line * l, int i)
|
||||
ncol = COLPOS(l, pos + j + delta);
|
||||
if (ncol - column > buf->COLS)
|
||||
break;
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
if (pc)
|
||||
do_color(pc[j]);
|
||||
#endif
|
||||
@@ -512,7 +512,7 @@ redrawLine(Buffer * buf, Line * l, int i)
|
||||
graphend();
|
||||
}
|
||||
#endif /* not KANJI_SYMBOLS */
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
if (color_mode)
|
||||
do_color(0);
|
||||
#endif
|
||||
@@ -528,11 +528,11 @@ redrawLineRegion(Buffer * buf, Line * l, int i, int bpos, int epos)
|
||||
int column = buf->currentColumn;
|
||||
char *p;
|
||||
Lineprop *pr;
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
Linecolor *pc;
|
||||
#endif
|
||||
int bcol, ecol;
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
Anchor *a;
|
||||
ParsedURL url;
|
||||
int k, vpos = -1;
|
||||
@@ -543,7 +543,7 @@ redrawLineRegion(Buffer * buf, Line * l, int i, int bpos, int epos)
|
||||
pos = columnPos(l, column);
|
||||
p = &(l->lineBuf[pos]);
|
||||
pr = &(l->propBuf[pos]);
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
if (useColor && l->colorBuf)
|
||||
pc = &(l->colorBuf[pos]);
|
||||
else
|
||||
@@ -557,7 +557,7 @@ redrawLineRegion(Buffer * buf, Line * l, int i, int bpos, int epos)
|
||||
delta = 1;
|
||||
#endif
|
||||
for (j = 0; rcol - column < buf->COLS && pos + j < l->len; j += delta) {
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
if (useVisitedColor && vpos <= pos + j && !(pr[j] & PE_VISITED)) {
|
||||
a = retrieveAnchor(buf->href, l->linenumber, pos + j);
|
||||
if (a) {
|
||||
@@ -579,7 +579,7 @@ redrawLineRegion(Buffer * buf, Line * l, int i, int bpos, int epos)
|
||||
ncol = COLPOS(l, pos + j + delta);
|
||||
if (ncol - column > buf->COLS)
|
||||
break;
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
if (pc)
|
||||
do_color(pc[j]);
|
||||
#endif
|
||||
@@ -649,7 +649,7 @@ redrawLineRegion(Buffer * buf, Line * l, int i, int bpos, int epos)
|
||||
graphend();
|
||||
}
|
||||
#endif /* not KANJI_SYMBOLS */
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
if (color_mode)
|
||||
do_color(0);
|
||||
#endif
|
||||
@@ -710,7 +710,7 @@ do_effects(Lineprop m)
|
||||
#endif /* not KANJI_SYMBOLS */
|
||||
}
|
||||
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
void
|
||||
do_color(Linecolor c)
|
||||
{
|
||||
@@ -718,7 +718,7 @@ do_color(Linecolor c)
|
||||
setfcolor(c & 0x7);
|
||||
else if (color_mode & 0x8)
|
||||
setfcolor(basic_color);
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
if (c & 0x80)
|
||||
setbcolor((c >> 4) & 0x7);
|
||||
else if (color_mode & 0x80)
|
||||
@@ -821,12 +821,12 @@ disp_message_nsec(char *s, int redraw_current, int sec, int purge, int mouse)
|
||||
else
|
||||
message(s, LASTLINE, 0);
|
||||
refresh();
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
if (mouse && use_mouse)
|
||||
mouse_active();
|
||||
#endif
|
||||
sleep_till_anykey(sec, purge);
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
if (mouse && use_mouse)
|
||||
mouse_inactive();
|
||||
#endif
|
||||
@@ -839,7 +839,7 @@ disp_message(char *s, int redraw_current)
|
||||
{
|
||||
disp_message_nsec(s, redraw_current, 10, FALSE, TRUE);
|
||||
}
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
void
|
||||
disp_message_nomouse(char *s, int redraw_current)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: etc.c,v 1.5 2001/11/20 16:46:32 ukai Exp $ */
|
||||
/* $Id: etc.c,v 1.6 2001/11/21 19:24:35 ukai Exp $ */
|
||||
#include "fm.h"
|
||||
#include <pwd.h>
|
||||
#include "myctype.h"
|
||||
@@ -294,7 +294,7 @@ getAnchor(char *arg, char **arg_return)
|
||||
return allocStr(arg, p - arg);
|
||||
}
|
||||
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
static int
|
||||
parse_ansi_color(char **str, Lineprop *effect, Linecolor *color)
|
||||
{
|
||||
@@ -374,7 +374,7 @@ parse_ansi_color(char **str, Lineprop *effect, Linecolor *color)
|
||||
|
||||
Str
|
||||
checkType(Str s, Lineprop * oprop,
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
Linecolor * ocolor, int * check_color,
|
||||
#endif
|
||||
int len)
|
||||
@@ -383,7 +383,7 @@ checkType(Str s, Lineprop * oprop,
|
||||
Lineprop effect = PE_NORMAL;
|
||||
Lineprop *prop = oprop;
|
||||
char *str = s->ptr, *endp = &s->ptr[s->length], *bs = NULL;
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
Lineprop ceffect = PE_NORMAL;
|
||||
Linecolor cmode = 0;
|
||||
Linecolor *color = NULL;
|
||||
@@ -392,13 +392,13 @@ checkType(Str s, Lineprop * oprop,
|
||||
int do_copy = FALSE;
|
||||
int size = (len < s->length) ? len : s->length;
|
||||
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
if (check_color)
|
||||
*check_color = FALSE;
|
||||
#endif
|
||||
if (ShowEffect) {
|
||||
bs = memchr(str, '\b', s->length);
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
if (ocolor) {
|
||||
es = memchr(str, ESC_CODE, s->length);
|
||||
if (es)
|
||||
@@ -406,7 +406,7 @@ checkType(Str s, Lineprop * oprop,
|
||||
}
|
||||
#endif
|
||||
if (s->length > size || (bs != NULL)
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
|| (es != NULL)
|
||||
#endif
|
||||
) {
|
||||
@@ -538,12 +538,12 @@ checkType(Str s, Lineprop * oprop,
|
||||
bs = memchr(str, '\b', endp - str);
|
||||
continue;
|
||||
}
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
else if (str > bs)
|
||||
bs = memchr(str, '\b', endp - str);
|
||||
#endif
|
||||
}
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
if (es != NULL) {
|
||||
if (str == es) {
|
||||
int ok = parse_ansi_color(&str, &ceffect, &cmode);
|
||||
@@ -561,7 +561,7 @@ checkType(Str s, Lineprop * oprop,
|
||||
#endif
|
||||
|
||||
mode = get_mctype(str);
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
effect |= ceffect;
|
||||
#endif
|
||||
#ifdef JP_CHARSET
|
||||
@@ -574,7 +574,7 @@ checkType(Str s, Lineprop * oprop,
|
||||
}
|
||||
prop += 2;
|
||||
str += 2;
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
if (color) {
|
||||
color[0] = cmode;
|
||||
color[1] = cmode;
|
||||
@@ -590,7 +590,7 @@ checkType(Str s, Lineprop * oprop,
|
||||
Strcat_char(s, *str);
|
||||
prop++;
|
||||
str++;
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
if (color) {
|
||||
*color = cmode;
|
||||
color++;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: file.c,v 1.10 2001/11/21 16:29:46 ukai Exp $ */
|
||||
/* $Id: file.c,v 1.11 2001/11/21 19:24:35 ukai Exp $ */
|
||||
#include "fm.h"
|
||||
#include <sys/types.h>
|
||||
#include "myctype.h"
|
||||
@@ -30,13 +30,13 @@ static Buffer *loadcmdout(char *cmd,
|
||||
Buffer *defaultbuf);
|
||||
static void close_textarea(struct html_feed_environ *h_env);
|
||||
static void addnewline(Buffer * buf, char *line, Lineprop * prop,
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
Linecolor * color,
|
||||
#endif
|
||||
int pos, int nlines);
|
||||
|
||||
static Lineprop propBuffer[LINELEN];
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
static Linecolor colorBuffer[LINELEN];
|
||||
#endif
|
||||
|
||||
@@ -487,14 +487,14 @@ readHeader(URLFile * uf,
|
||||
for (p = lineBuf2->ptr; *p; p = q) {
|
||||
for (q = p; *q && *q != '\r' && *q != '\n'; q++);
|
||||
lineBuf2 = checkType(Strnew_charp(p), propBuffer,
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
NULL, NULL,
|
||||
#endif
|
||||
min(LINELEN, q - p));
|
||||
Strcat(tmp, lineBuf2);
|
||||
if (thru)
|
||||
addnewline(newBuf, lineBuf2->ptr, propBuffer,
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
NULL,
|
||||
#endif
|
||||
lineBuf2->length, -1);
|
||||
@@ -703,7 +703,7 @@ readHeader(URLFile * uf,
|
||||
}
|
||||
if (thru)
|
||||
addnewline(newBuf, "", propBuffer,
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
NULL,
|
||||
#endif
|
||||
0, -1);
|
||||
@@ -4014,7 +4014,7 @@ HTMLlineproc2body(Buffer * buf, Str (*feed) (), int llimit)
|
||||
}
|
||||
/* end of processing for one line */
|
||||
addnewline(buf, outc, outp,
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
NULL,
|
||||
#endif
|
||||
pos, nlines);
|
||||
@@ -4517,7 +4517,7 @@ extern Lineprop NullProp[];
|
||||
|
||||
static void
|
||||
addnewline(Buffer * buf, char *line, Lineprop * prop,
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
Linecolor * color,
|
||||
#endif
|
||||
int pos, int nlines)
|
||||
@@ -4534,7 +4534,7 @@ addnewline(Buffer * buf, char *line, Lineprop * prop,
|
||||
l->lineBuf = NullLine;
|
||||
l->propBuf = NullProp;
|
||||
}
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
if (pos > 0 && color) {
|
||||
l->colorBuf = NewAtom_N(Linecolor, pos);
|
||||
bcopy((void *) color, (void *) l->colorBuf, pos * sizeof(Linecolor));
|
||||
@@ -5093,7 +5093,7 @@ loadBuffer(URLFile * uf, Buffer * newBuf)
|
||||
int nlines;
|
||||
Str tmpf;
|
||||
int linelen = 0, trbyte = 0;
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
int check_color;
|
||||
#endif
|
||||
MySignalHandler(*prevtrap) ();
|
||||
@@ -5154,12 +5154,12 @@ loadBuffer(URLFile * uf, Buffer * newBuf)
|
||||
#endif /* USE_NNTP */
|
||||
Strchop(lineBuf2);
|
||||
lineBuf2 = checkType(lineBuf2, propBuffer,
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
colorBuffer, &check_color,
|
||||
#endif
|
||||
LINELEN);
|
||||
addnewline(newBuf, lineBuf2->ptr, propBuffer,
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
check_color ? colorBuffer : NULL,
|
||||
#endif
|
||||
lineBuf2->length, nlines);
|
||||
@@ -5405,7 +5405,7 @@ getNextPage(Buffer * buf, int plen)
|
||||
URLFile uf;
|
||||
char code;
|
||||
int squeeze_flag = 0;
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
int check_color;
|
||||
#endif
|
||||
|
||||
@@ -5455,7 +5455,7 @@ getNextPage(Buffer * buf, int plen)
|
||||
++nlines;
|
||||
Strchop(lineBuf2);
|
||||
lineBuf2 = checkType(lineBuf2, propBuffer,
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
colorBuffer, &check_color,
|
||||
#endif
|
||||
LINELEN);
|
||||
@@ -5464,7 +5464,7 @@ getNextPage(Buffer * buf, int plen)
|
||||
l->lineBuf = lineBuf2->ptr;
|
||||
l->propBuf = NewAtom_N(Lineprop, len);
|
||||
bcopy((void *) propBuffer, (void *) l->propBuf, len * sizeof(Lineprop));
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
if (check_color) {
|
||||
l->colorBuf = NewAtom_N(Linecolor, len);
|
||||
bcopy((void *) colorBuffer, (void *) l->colorBuf, len * sizeof(Linecolor));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: fm.h,v 1.9 2001/11/21 16:29:46 ukai Exp $ */
|
||||
/* $Id: fm.h,v 1.10 2001/11/21 19:24:35 ukai Exp $ */
|
||||
/*
|
||||
* w3m: WWW wo Miru utility
|
||||
*
|
||||
@@ -18,13 +18,13 @@
|
||||
#include "config.h"
|
||||
#include "history.h"
|
||||
|
||||
#ifdef MENU
|
||||
#ifdef USE_MENU
|
||||
#define MENU_SELECT
|
||||
#define MENU_MAP
|
||||
#endif /* MENU */
|
||||
#endif /* USE_MENU */
|
||||
|
||||
#ifndef COLOR
|
||||
#undef ANSI_COLOR
|
||||
#ifndef USE_COLOR
|
||||
#undef USE_ANSI_COLOR
|
||||
#endif
|
||||
|
||||
#include "ctrlcode.h"
|
||||
@@ -255,7 +255,7 @@ extern int REV_LB[];
|
||||
*/
|
||||
|
||||
typedef unsigned short Lineprop;
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
typedef unsigned char Linecolor;
|
||||
#endif
|
||||
|
||||
@@ -269,7 +269,7 @@ typedef struct _MapList {
|
||||
typedef struct _Line {
|
||||
char *lineBuf;
|
||||
Lineprop *propBuf;
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
Linecolor *colorBuf;
|
||||
#endif
|
||||
struct _Line *next;
|
||||
@@ -669,7 +669,7 @@ global Buffer *Currentbuf;
|
||||
global Buffer *Firstbuf;
|
||||
global int CurrentKey;
|
||||
global char *CurrentKeyData;
|
||||
#ifdef MENU
|
||||
#ifdef USE_MENU
|
||||
global char *CurrentMenuData;
|
||||
#endif
|
||||
extern char *ullevel[];
|
||||
@@ -689,20 +689,20 @@ global int w3m_halfload init(FALSE);
|
||||
global Str header_string init(NULL);
|
||||
global int override_content_type init(FALSE);
|
||||
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
global int useColor init(TRUE);
|
||||
global int basic_color init(8); /* don't change */
|
||||
global int anchor_color init(4); /* blue */
|
||||
global int image_color init(2); /* green */
|
||||
global int form_color init(1); /* red */
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
global int bg_color init(8); /* don't change */
|
||||
#endif /* BG_COLOR */
|
||||
#endif /* USE_BG_COLOR */
|
||||
global int useActiveColor init(FALSE);
|
||||
global int active_color init(6); /* cyan */
|
||||
global int useVisitedColor init(FALSE);
|
||||
global int visited_color init(5); /* magenta */
|
||||
#endif /* COLOR */
|
||||
#endif /* USE_COLOR */
|
||||
global int confirm_on_quit init(TRUE);
|
||||
global int displayLink init(FALSE);
|
||||
global int retryAsHttp init(TRUE);
|
||||
@@ -786,11 +786,11 @@ extern char UseAltEntity;
|
||||
global char *rc_dir;
|
||||
global int rc_dir_is_tmp init(FALSE);
|
||||
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
global int use_mouse init(TRUE);
|
||||
extern int mouseActive;
|
||||
global int reverse_mouse init(FALSE);
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
|
||||
#ifdef USE_COOKIE
|
||||
global int default_use_cookie init(TRUE);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* $Id: linein.c,v 1.4 2001/11/20 04:11:16 ukai Exp $ */
|
||||
/* $Id: linein.c,v 1.5 2001/11/21 19:24:35 ukai Exp $ */
|
||||
#include "fm.h"
|
||||
#include "local.h"
|
||||
#include "myctype.h"
|
||||
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
#ifdef USE_GPM
|
||||
#include <gpm.h>
|
||||
#endif
|
||||
@@ -11,7 +11,7 @@
|
||||
extern int do_getch();
|
||||
#define getch() do_getch()
|
||||
#endif /* USE_GPM */
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
|
||||
#ifdef __EMX__
|
||||
#include <sys/kbdscan.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: main.c,v 1.14 2001/11/21 18:51:48 ukai Exp $ */
|
||||
/* $Id: main.c,v 1.15 2001/11/21 19:24:35 ukai Exp $ */
|
||||
#define MAINPROGRAM
|
||||
#include "fm.h"
|
||||
#include <signal.h>
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "terms.h"
|
||||
#include "myctype.h"
|
||||
#include "regex.h"
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
#ifdef USE_GPM
|
||||
#include <gpm.h>
|
||||
#endif /* USE_GPM */
|
||||
@@ -107,9 +107,9 @@ fusage(FILE *f, int err)
|
||||
fprintf(f, " -T type specify content-type\n");
|
||||
fprintf(f, " -m internet message mode\n");
|
||||
fprintf(f, " -v visual startup mode\n");
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
fprintf(f, " -M monochrome display\n");
|
||||
#endif /* COLOR */
|
||||
#endif /* USE_COLOR */
|
||||
fprintf(f, " -F automatically render frame\n");
|
||||
fprintf(f, " -cols width specify column width (used with -dump)\n");
|
||||
fprintf(f, " -ppc count specify the number of pixels per character (4.0...32.0)\n");
|
||||
@@ -123,9 +123,9 @@ fusage(FILE *f, int err)
|
||||
fprintf(f, " +<num> goto <num> line\n");
|
||||
fprintf(f, " -num show line number\n");
|
||||
fprintf(f, " -no-proxy don't use proxy\n");
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
fprintf(f, " -no-mouse don't use mouse\n");
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
#ifdef USE_COOKIE
|
||||
fprintf(f, " -cookie use cookie (-no-cookie: don't use cookie)\n");
|
||||
#endif /* USE_COOKIE */
|
||||
@@ -425,10 +425,10 @@ MAIN(int argc, char **argv, char **envp)
|
||||
SearchHeader = search_header = TRUE;
|
||||
else if (!strcmp("-v", argv[i]))
|
||||
visual_start = TRUE;
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
else if (!strcmp("-M", argv[i]))
|
||||
useColor = FALSE;
|
||||
#endif /* COLOR */
|
||||
#endif /* USE_COLOR */
|
||||
else if (!strcmp("-B", argv[i]))
|
||||
load_bookmark = TRUE;
|
||||
else if (!strcmp("-bookmark", argv[i])) {
|
||||
@@ -515,11 +515,11 @@ MAIN(int argc, char **argv, char **envp)
|
||||
Strcat (header_string, hs);
|
||||
}
|
||||
}
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
else if (!strcmp("-no-mouse", argv[i])) {
|
||||
use_mouse = FALSE;
|
||||
}
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
#ifdef USE_COOKIE
|
||||
else if (!strcmp("-no-cookie", argv[i])) {
|
||||
use_cookie = FALSE;
|
||||
@@ -608,7 +608,7 @@ MAIN(int argc, char **argv, char **envp)
|
||||
backend();
|
||||
if (!w3m_dump) {
|
||||
initKeymap();
|
||||
#ifdef MENU
|
||||
#ifdef USE_MENU
|
||||
initMenu();
|
||||
CurrentMenuData = NULL;
|
||||
#endif /* MENU */
|
||||
@@ -820,7 +820,7 @@ MAIN(int argc, char **argv, char **envp)
|
||||
for (i = 0; i < n_event_queue; i++) {
|
||||
CurrentKey = -1;
|
||||
CurrentKeyData = eventQueue[i].user_data;
|
||||
#ifdef MENU
|
||||
#ifdef USE_MENU
|
||||
CurrentMenuData = NULL;
|
||||
#endif
|
||||
w3mFuncList[eventQueue[i].cmd].func();
|
||||
@@ -829,10 +829,10 @@ MAIN(int argc, char **argv, char **envp)
|
||||
}
|
||||
CurrentKeyData = NULL;
|
||||
/* get keypress event */
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
if (use_mouse)
|
||||
mouse_active();
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
#ifdef USE_ALARM
|
||||
if (alarm_status == AL_IMPLICIT) {
|
||||
alarm_buffer = Currentbuf;
|
||||
@@ -852,10 +852,10 @@ MAIN(int argc, char **argv, char **envp)
|
||||
alarm(0);
|
||||
}
|
||||
#endif
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
if (use_mouse)
|
||||
mouse_inactive();
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
if (IS_ASCII(c)) { /* Ascii */
|
||||
if (((prec_num && c == '0') || '1' <= c) && (c <= '9')) {
|
||||
prec_num = prec_num * 10 + (int) (c - '0');
|
||||
@@ -4180,7 +4180,7 @@ curlno()
|
||||
disp_message(tmp->ptr, FALSE);
|
||||
}
|
||||
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
/* Addition:mouse event */
|
||||
#define MOUSE_BTN1_DOWN 0
|
||||
#define MOUSE_BTN2_DOWN 1
|
||||
@@ -4270,12 +4270,12 @@ process_mouse(int btn, int x, int y)
|
||||
backBf();
|
||||
break;
|
||||
case MOUSE_BTN3_DOWN:
|
||||
#ifdef MENU
|
||||
#ifdef USE_MENU
|
||||
if (x >= Currentbuf->rootX)
|
||||
cursorXY(Currentbuf, x - Currentbuf->rootX, y);
|
||||
onA();
|
||||
mainMenu(x, y);
|
||||
#endif /* MENU */
|
||||
#endif /* USE_MENU */
|
||||
break;
|
||||
case MOUSE_BTN4_DOWN_RXVT:
|
||||
for (i = 0; i < MOUSE_SCROLL_LINE; i++)
|
||||
@@ -4385,7 +4385,7 @@ sysm_process_mouse(int x, int y, int nbs, int obs)
|
||||
return 0;
|
||||
}
|
||||
#endif /* USE_SYSMOUSE */
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
|
||||
void
|
||||
dispVer()
|
||||
@@ -4542,7 +4542,7 @@ searchKeyData(void)
|
||||
|
||||
if (CurrentKeyData != NULL && *CurrentKeyData != '\0')
|
||||
return allocStr(CurrentKeyData, 0);
|
||||
#ifdef MENU
|
||||
#ifdef USE_MENU
|
||||
if (CurrentMenuData != NULL && *CurrentMenuData != '\0')
|
||||
return allocStr(CurrentMenuData, 0);
|
||||
#endif
|
||||
@@ -4597,7 +4597,7 @@ SigAlarm(SIGNAL_ARG)
|
||||
if (alarm_sec > 0) {
|
||||
CurrentKey = -1;
|
||||
CurrentKeyData = (char *)alarm_event.user_data;
|
||||
#ifdef MENU
|
||||
#ifdef USE_MENU
|
||||
CurrentMenuData = NULL;
|
||||
#endif
|
||||
w3mFuncList[alarm_event.cmd].func();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: menu.c,v 1.4 2001/11/20 17:49:23 ukai Exp $ */
|
||||
/* $Id: menu.c,v 1.5 2001/11/21 19:24:35 ukai Exp $ */
|
||||
/*
|
||||
* w3m menu.c
|
||||
*/
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "myctype.h"
|
||||
#include "regex.h"
|
||||
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
#ifdef USE_GPM
|
||||
#include <gpm.h>
|
||||
static int gpm_process_menu_mouse(Gpm_Event * event, void *data);
|
||||
@@ -28,9 +28,9 @@ extern int do_getch();
|
||||
#define getch() do_getch()
|
||||
#endif /* defined(USE_GPM) || * * * * * *
|
||||
* defined(USE_SYSMOUSE) */
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
|
||||
#ifdef MENU
|
||||
#ifdef USE_MENU
|
||||
|
||||
#ifdef KANJI_SYMBOLS
|
||||
static char *FRAME[] =
|
||||
@@ -613,12 +613,12 @@ action_menu(Menu * menu)
|
||||
select_menu(menu, menu->select);
|
||||
|
||||
while (1) {
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
if (use_mouse)
|
||||
mouse_active();
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
c = getch();
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
if (use_mouse)
|
||||
mouse_inactive();
|
||||
#if defined(USE_GPM) || defined(USE_SYSMOUSE)
|
||||
@@ -629,7 +629,7 @@ action_menu(Menu * menu)
|
||||
}
|
||||
#endif /* defined(USE_GPM) || * * * * * *
|
||||
* defined(USE_SYSMOUSE) */
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
if (IS_ASCII(c)) { /* Ascii */
|
||||
select = (*menu->keymap[(int) c]) (c);
|
||||
if (select != MENU_NOTHING)
|
||||
@@ -671,14 +671,14 @@ popup_menu(Menu * parent, Menu * menu)
|
||||
if (menu->active)
|
||||
return;
|
||||
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
#ifdef USE_GPM
|
||||
gpm_handler = gpm_process_menu_mouse;
|
||||
#endif /* USE_GPM */
|
||||
#ifdef USE_SYSMOUSE
|
||||
sysm_handler = sysm_process_menu_mouse;
|
||||
#endif /* USE_SYSMOUSE */
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
menu->parent = parent;
|
||||
menu->select = menu->initial;
|
||||
menu->offset = 0;
|
||||
@@ -697,7 +697,7 @@ popup_menu(Menu * parent, Menu * menu)
|
||||
}
|
||||
menu->active = 0;
|
||||
CurrentMenu = parent;
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
#ifdef USE_GPM
|
||||
if (CurrentMenu == NULL)
|
||||
gpm_handler = gpm_process_mouse;
|
||||
@@ -706,7 +706,7 @@ popup_menu(Menu * parent, Menu * menu)
|
||||
if (CurrentMenu == NULL)
|
||||
sysm_handler = sysm_process_mouse;
|
||||
#endif /* USE_SYSMOUSE */
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1068,7 +1068,7 @@ mSrchP (char c)
|
||||
return (MENU_NOTHING);
|
||||
}
|
||||
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
#define MOUSE_BTN1_DOWN 0
|
||||
#define MOUSE_BTN2_DOWN 1
|
||||
#define MOUSE_BTN3_DOWN 2
|
||||
@@ -1202,13 +1202,13 @@ sysm_process_menu_mouse(int x, int y, int nbs, int obs)
|
||||
return X_MOUSE_SELECTED;
|
||||
}
|
||||
#endif /* USE_SYSMOUSE */
|
||||
#else /* not MOUSE */
|
||||
#else /* not USE_MOUSE */
|
||||
static int
|
||||
mMouse(char c)
|
||||
{
|
||||
return (MENU_NOTHING);
|
||||
}
|
||||
#endif /* not MOUSE */
|
||||
#endif /* not USE_MOUSE */
|
||||
|
||||
/* --- MenuFunctions (END) --- */
|
||||
|
||||
@@ -1556,4 +1556,4 @@ getMenuN(MenuList * list, char *id)
|
||||
|
||||
/* --- InitMenu (END) --- */
|
||||
|
||||
#endif /* MENU */
|
||||
#endif /* USE_MENU */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: proto.h,v 1.5 2001/11/20 08:20:56 ukai Exp $ */
|
||||
/* $Id: proto.h,v 1.6 2001/11/21 19:24:35 ukai Exp $ */
|
||||
/*
|
||||
* This file was automatically generated by version 1.7 of cextract.
|
||||
* Manual editing not recommended.
|
||||
@@ -190,7 +190,7 @@ extern void redrawNLine(Buffer * buf, int n);
|
||||
extern Line *redrawLine(Buffer * buf, Line * l, int i);
|
||||
extern int redrawLineRegion(Buffer * buf, Line * l, int i, int bpos, int epos);
|
||||
extern void do_effects(Lineprop m);
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
extern void do_color(Linecolor c);
|
||||
#endif
|
||||
extern void addChar(char c, Lineprop mode);
|
||||
@@ -201,7 +201,7 @@ extern void message(char *s, int return_x, int return_y);
|
||||
#define disp_err_message(s, f) (record_err_message((s)), disp_message((s), (f)))
|
||||
extern void disp_message_nsec(char *s, int redraw_current, int sec, int purge, int mouse);
|
||||
extern void disp_message(char *s, int redraw_current);
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
extern void disp_message_nomouse(char *s, int redraw_current);
|
||||
#else
|
||||
#define disp_message_nomouse disp_message
|
||||
@@ -223,7 +223,7 @@ extern Line *currentLineSkip(Buffer * buf, Line * line, int offset, int last);
|
||||
extern int gethtmlcmd(char **s, int *status);
|
||||
extern char *getAnchor(char *arg, char **arg_return);
|
||||
extern Str checkType(Str s, Lineprop * oprop,
|
||||
#ifdef ANSI_COLOR
|
||||
#ifdef USE_ANSI_COLOR
|
||||
Linecolor * ocolor, int * check_color,
|
||||
#endif
|
||||
int len);
|
||||
@@ -325,12 +325,12 @@ extern void underlineend(void);
|
||||
extern void graphstart(void);
|
||||
extern void graphend(void);
|
||||
extern int graph_ok(void);
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
extern void setfcolor(int color);
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
extern void setbcolor(int color);
|
||||
#endif /* BG_COLOR */
|
||||
#endif /* COLOR */
|
||||
#endif /* USE_BG_COLOR */
|
||||
#endif /* USE_COLOR */
|
||||
extern void refresh(void);
|
||||
extern void clear(void);
|
||||
extern void scroll(int);
|
||||
@@ -473,17 +473,17 @@ extern void reMark(void);
|
||||
#define reMark nulcmd
|
||||
#endif /* not USE_MARK */
|
||||
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
extern void mouse(void);
|
||||
extern void mouse_init(void);
|
||||
extern void mouse_end(void);
|
||||
extern void mouse_active(void);
|
||||
extern void mouse_inactive(void);
|
||||
extern void msToggle(void);
|
||||
#else /* not MOUSE */
|
||||
#else /* not USE_MOUSE */
|
||||
#define mouse nulcmd
|
||||
#define msToggle nulcmd
|
||||
#endif /* not MOUSE */
|
||||
#endif /* not USE_MOUSE */
|
||||
|
||||
extern char *searchKeyData(void);
|
||||
|
||||
@@ -496,7 +496,7 @@ extern KeyListItem *searchKeyList(KeyList *list, int key);
|
||||
extern char *getWord(char **str);
|
||||
extern char *getQWord(char **str);
|
||||
|
||||
#ifdef MENU
|
||||
#ifdef USE_MENU
|
||||
extern void new_menu(Menu * menu, MenuItem * item);
|
||||
extern void geom_menu(Menu * menu, int x, int y, int select);
|
||||
extern void draw_all_menu(Menu * menu);
|
||||
@@ -521,10 +521,10 @@ extern void mainMn(void);
|
||||
extern void selMn(void);
|
||||
extern void optionMenu(int x, int y, char **label, int *variable, int initial, void (*func) ());
|
||||
extern void initMenu(void);
|
||||
#else /* not MENU */
|
||||
#else /* not USE_MENU */
|
||||
#define mainMn nulcmd
|
||||
#define selMn selBuf
|
||||
#endif /* not MENU */
|
||||
#endif /* not USE_MENU */
|
||||
|
||||
#ifdef DICT
|
||||
extern void dictword(void);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: rc.c,v 1.6 2001/11/21 16:29:47 ukai Exp $ */
|
||||
/* $Id: rc.c,v 1.7 2001/11/21 19:24:35 ukai Exp $ */
|
||||
/*
|
||||
* Initialization file etc.
|
||||
*/
|
||||
@@ -43,7 +43,7 @@ static int rc_initialized = 0;
|
||||
#if defined(USE_SSL) && defined(USE_SSL_VERIFY)
|
||||
#define P_SSLPATH 5
|
||||
#endif
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
#define P_COLOR 6
|
||||
#endif
|
||||
#ifdef JP_CHARSET
|
||||
@@ -115,10 +115,10 @@ static int rc_initialized = 0;
|
||||
#define CMT_IFILE "各ディレクトリのインデックスファイル"
|
||||
#define CMT_RETRY_HTTP "URLに自動的に http:// を補う"
|
||||
#define CMT_DECODE_CTE "保存時に Content-Transfer-Encoding をデコードする"
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
#define CMT_MOUSE "マウスを使う"
|
||||
#define CMT_REVERSE_MOUSE "マウスのドラッグ動作を逆にする"
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
#define CMT_CLEAR_BUF "表示されていないバッファのメモリを開放する"
|
||||
#define CMT_NOSENDREFERER "Referer: を送らないようにする"
|
||||
#define CMT_IGNORE_CASE "サーチ時に大文字小文字の区別をしない"
|
||||
@@ -210,10 +210,10 @@ static int rc_initialized = 0;
|
||||
#define CMT_IFILE "Index file for the directory"
|
||||
#define CMT_RETRY_HTTP "Prepend http:// to URL automatically"
|
||||
#define CMT_DECODE_CTE "Decode Content-Transfer-Encoding when saving"
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
#define CMT_MOUSE "Use mouse"
|
||||
#define CMT_REVERSE_MOUSE "Reverse mouse dragging action"
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
#define CMT_CLEAR_BUF "Free memory of the undisplayed buffers"
|
||||
#define CMT_NOSENDREFERER "Don't send header `Referer:'"
|
||||
#define CMT_IGNORE_CASE "Ignore case when search"
|
||||
@@ -279,7 +279,7 @@ static struct sel_c scodestr[] =
|
||||
};
|
||||
#endif /* JP_CHARSET */
|
||||
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
static struct sel_c colorstr[] =
|
||||
{
|
||||
#if LANG == JA
|
||||
@@ -306,7 +306,7 @@ static struct sel_c colorstr[] =
|
||||
{0, NULL, NULL}
|
||||
#endif /* LANG != JA */
|
||||
};
|
||||
#endif /* COLOR */
|
||||
#endif /* USE_COLOR */
|
||||
|
||||
#ifdef INET6
|
||||
static struct sel_c dnsorders[] =
|
||||
@@ -353,7 +353,7 @@ struct param_ptr params1[] =
|
||||
{NULL, 0, 0, NULL, NULL, NULL},
|
||||
};
|
||||
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
struct param_ptr params2[] =
|
||||
{
|
||||
{"color", P_INT, PI_ONOFF, (void *) &useColor, CMT_COLOR, NULL},
|
||||
@@ -361,16 +361,16 @@ struct param_ptr params2[] =
|
||||
{"anchor_color", P_COLOR, PI_SEL_C, (void *) &anchor_color, CMT_A_COLOR, colorstr},
|
||||
{"image_color", P_COLOR, PI_SEL_C, (void *) &image_color, CMT_I_COLOR, colorstr},
|
||||
{"form_color", P_COLOR, PI_SEL_C, (void *) &form_color, CMT_F_COLOR, colorstr},
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
{"bg_color", P_COLOR, PI_SEL_C, (void *) &bg_color, CMT_BG_COLOR, colorstr},
|
||||
#endif /* BG_COLOR */
|
||||
#endif /* USE_BG_COLOR */
|
||||
{"active_style", P_INT, PI_ONOFF, (void *) &useActiveColor, CMT_ACTIVE_STYLE, NULL},
|
||||
{"active_color", P_COLOR, PI_SEL_C, (void *) &active_color, CMT_C_COLOR, colorstr},
|
||||
{"visited_anchor", P_INT, PI_ONOFF, (void *) &useVisitedColor, CMT_VISITED_ANCHOR, NULL},
|
||||
{"visited_color", P_COLOR, PI_SEL_C, (void *) &visited_color, CMT_V_COLOR, colorstr},
|
||||
{NULL, 0, 0, NULL, NULL, NULL},
|
||||
};
|
||||
#endif /* COLOR */
|
||||
#endif /* USE_COLOR */
|
||||
|
||||
|
||||
struct param_ptr params3[] =
|
||||
@@ -383,10 +383,10 @@ struct param_ptr params3[] =
|
||||
{"confirm_qq", P_INT, PI_ONOFF, (void *) &confirm_on_quit, CMT_CONFIRM_QQ, NULL},
|
||||
{"wrap_search", P_INT, PI_ONOFF, (void *) &WrapDefault, CMT_WRAP, NULL},
|
||||
{"ignorecase_search", P_INT, PI_ONOFF, (void *) &IgnoreCase, CMT_IGNORE_CASE, NULL},
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
{"use_mouse", P_INT, PI_ONOFF, (void *) &use_mouse, CMT_MOUSE, NULL},
|
||||
{"reverse_mouse", P_INT, PI_ONOFF, (void *) &reverse_mouse, CMT_REVERSE_MOUSE, NULL},
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
{"clear_buffer", P_INT, PI_ONOFF, (void *) &clear_buffer, CMT_CLEAR_BUF, NULL},
|
||||
{"decode_cte", P_CHARINT, PI_ONOFF, (void *) &DecodeCTE, CMT_DECODE_CTE, NULL},
|
||||
{NULL, 0, 0, NULL, NULL, NULL},
|
||||
@@ -476,9 +476,9 @@ struct param_section sections[] =
|
||||
{
|
||||
#if LANG == JA
|
||||
{"表示関係", params1},
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
{"表示色", params2},
|
||||
#endif /* COLOR */
|
||||
#endif /* USE_COLOR */
|
||||
{"雑多な設定", params3},
|
||||
{"ディレクトリ設定", params5},
|
||||
{"外部プログラム", params6},
|
||||
@@ -493,9 +493,9 @@ struct param_section sections[] =
|
||||
#endif
|
||||
#else /* LANG != JA */
|
||||
{"Display", params1},
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
{"Color Setting", params2},
|
||||
#endif /* COLOR */
|
||||
#endif /* USE_COLOR */
|
||||
{"Miscellaneous Setting", params3},
|
||||
{"Directory Setting", params5},
|
||||
{"External Programs", params6},
|
||||
@@ -643,7 +643,7 @@ show_params(FILE * fp)
|
||||
t = "path";
|
||||
break;
|
||||
#endif
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
case P_COLOR:
|
||||
t = "color";
|
||||
break;
|
||||
@@ -702,7 +702,7 @@ str_to_bool(char *value, int old)
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
static int
|
||||
str_to_color(char *value)
|
||||
{
|
||||
@@ -846,7 +846,7 @@ set_param(char *name, char *value)
|
||||
ssl_path_modified = 1;
|
||||
break;
|
||||
#endif
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
case P_COLOR:
|
||||
*(int *) p->varptr = str_to_color(value);
|
||||
break;
|
||||
@@ -1131,7 +1131,7 @@ to_str(struct param_ptr *p)
|
||||
{
|
||||
switch (p->type) {
|
||||
case P_INT:
|
||||
#ifdef COLOR
|
||||
#ifdef USE_COLOR
|
||||
case P_COLOR:
|
||||
#endif
|
||||
case P_NZINT:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: terms.c,v 1.12 2001/11/21 18:51:48 ukai Exp $ */
|
||||
/* $Id: terms.c,v 1.13 2001/11/21 19:24:35 ukai Exp $ */
|
||||
/*
|
||||
* An original curses library for EUC-kanji by Akinori ITO, December 1989
|
||||
* revised by Akinori ITO, January 1995
|
||||
@@ -15,7 +15,7 @@
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
#ifdef USE_GPM
|
||||
#include <gpm.h>
|
||||
#endif /* USE_GPM */
|
||||
@@ -35,7 +35,7 @@ static int xpix, ypix, nbs, obs = 0;
|
||||
static int is_xterm = 0;
|
||||
void mouse_init(), mouse_end();
|
||||
int mouseActive = 0;
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
|
||||
#include "terms.h"
|
||||
#include "fm.h"
|
||||
@@ -125,7 +125,7 @@ typedef struct sgttyb TerminalMode;
|
||||
|
||||
#define S_COLORED 0xf00
|
||||
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
/* Background Color */
|
||||
#define COL_BCOLOR 0xf000
|
||||
#define COL_BBLACK 0x8000
|
||||
@@ -139,7 +139,7 @@ typedef struct sgttyb TerminalMode;
|
||||
#define COL_BTERM 0x0000
|
||||
|
||||
#define S_BCOLORED 0xf000
|
||||
#endif /* BG_COLOR */
|
||||
#endif /* USE_BG_COLOR */
|
||||
|
||||
|
||||
#define S_GRAPHICS 0x10
|
||||
@@ -217,7 +217,7 @@ writestr(char *s)
|
||||
|
||||
#define MOVE(line,column) writestr(tgoto(T_cm,column,line));
|
||||
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
static char *xterm_mouse_term[] = {
|
||||
"xterm", "kterm", "rxvt", "cygwin",
|
||||
NULL
|
||||
@@ -228,9 +228,6 @@ int
|
||||
set_tty(void)
|
||||
{
|
||||
char *ttyn;
|
||||
#ifdef MOUSE
|
||||
char *term;
|
||||
#endif
|
||||
|
||||
if (isatty(0)) /* stdin */
|
||||
ttyn = ttyname(0);
|
||||
@@ -243,9 +240,9 @@ set_tty(void)
|
||||
}
|
||||
ttyf = fdopen(tty, "w");
|
||||
TerminalGet(tty, &d_ioval);
|
||||
#ifdef MOUSE
|
||||
term = getenv("TERM");
|
||||
#ifdef USE_MOUSE
|
||||
{
|
||||
char *term = getenv("TERM");
|
||||
char **p;
|
||||
for (p = xterm_mouse_term; *p != NULL; p++) {
|
||||
if (!strncmp(term, *p, strlen(*p))) {
|
||||
@@ -342,10 +339,10 @@ MySignalHandler
|
||||
reset_exit(SIGNAL_ARG)
|
||||
{
|
||||
reset_tty();
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
if (mouseActive)
|
||||
mouse_end();
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
w3m_exit(0);
|
||||
SIGNAL_RETURN;
|
||||
}
|
||||
@@ -702,11 +699,11 @@ move(int line, int column)
|
||||
CurColumn = column;
|
||||
}
|
||||
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
#define M_SPACE (S_SCREENPROP|S_COLORED|S_BCOLORED|S_GRAPHICS)
|
||||
#else /* not BG_COLOR */
|
||||
#else /* not USE_BG_COLOR */
|
||||
#define M_SPACE (S_SCREENPROP|S_COLORED|S_GRAPHICS)
|
||||
#endif /* not BG_COLOR */
|
||||
#endif /* not USE_BG_COLOR */
|
||||
|
||||
static int
|
||||
need_redraw(char c1, l_prop pr1, char c2, l_prop pr2)
|
||||
@@ -978,7 +975,7 @@ color_seq(int colmode)
|
||||
return seqbuf;
|
||||
}
|
||||
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
void
|
||||
setbcolor(int color)
|
||||
{
|
||||
@@ -994,16 +991,16 @@ bcolor_seq(int colmode)
|
||||
sprintf(seqbuf, "\033[%dm", ((colmode >> 12) & 7) + 40);
|
||||
return seqbuf;
|
||||
}
|
||||
#endif /* BG_COLOR */
|
||||
#endif /* USE_BG_COLOR */
|
||||
|
||||
#define RF_NEED_TO_MOVE 0
|
||||
#define RF_CR_OK 1
|
||||
#define RF_NONEED_TO_MOVE 2
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
#define M_MEND (S_STANDOUT|S_UNDERLINE|S_BOLD|S_COLORED|S_BCOLORED|S_GRAPHICS)
|
||||
#else /* not BG_COLOR */
|
||||
#else /* not USE_BG_COLOR */
|
||||
#define M_MEND (S_STANDOUT|S_UNDERLINE|S_BOLD|S_COLORED|S_GRAPHICS)
|
||||
#endif /* not BG_COLOR */
|
||||
#endif /* not USE_BG_COLOR */
|
||||
void
|
||||
refresh(void)
|
||||
{
|
||||
@@ -1013,9 +1010,9 @@ refresh(void)
|
||||
char *pc;
|
||||
l_prop *pr, mode = 0;
|
||||
l_prop color = COL_FTERM;
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
l_prop bcolor = COL_BTERM;
|
||||
#endif /* BG_COLOR */
|
||||
#endif /* USE_BG_COLOR */
|
||||
short *dirty;
|
||||
|
||||
for (line = 0; line <= LASTLINE; line++) {
|
||||
@@ -1084,25 +1081,25 @@ refresh(void)
|
||||
* avoid the scroll, I prohibit to draw character on
|
||||
* (COLS-1,LINES-1).
|
||||
*/
|
||||
#if !defined(BG_COLOR) || defined(__CYGWIN__)
|
||||
#if !defined(USE_BG_COLOR) || defined(__CYGWIN__)
|
||||
#if defined(__CYGWIN__) && LANG == JA
|
||||
if (isWinConsole)
|
||||
#endif /* defined(__CYGWIN__) && LANG == JA */
|
||||
if (line == LINES - 1 && col == COLS - 1)
|
||||
break;
|
||||
#endif /* !defined(BG_COLOR) || defined(__CYGWIN__) */
|
||||
#endif /* !defined(USE_BG_COLOR) || defined(__CYGWIN__) */
|
||||
if ((!(pr[col] & S_STANDOUT) && (mode & S_STANDOUT)) ||
|
||||
(!(pr[col] & S_UNDERLINE) && (mode & S_UNDERLINE)) ||
|
||||
(!(pr[col] & S_BOLD) && (mode & S_BOLD)) ||
|
||||
(!(pr[col] & S_COLORED) && (mode & S_COLORED))
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
|| (!(pr[col] & S_BCOLORED) && (mode & S_BCOLORED))
|
||||
#endif /* BG_COLOR */
|
||||
#endif /* USE_BG_COLOR */
|
||||
|| (!(pr[col] & S_GRAPHICS) && (mode & S_GRAPHICS))) {
|
||||
if ((mode & S_COLORED)
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
|| (mode & S_BCOLORED)
|
||||
#endif /* BG_COLOR */
|
||||
#endif /* USE_BG_COLOR */
|
||||
)
|
||||
writestr(T_op);
|
||||
if (mode & S_GRAPHICS)
|
||||
@@ -1134,13 +1131,13 @@ refresh(void)
|
||||
mode = ((mode & ~COL_FCOLOR) | color);
|
||||
writestr(color_seq(color));
|
||||
}
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
if ((pr[col] & S_BCOLORED) && (pr[col] ^ mode) & COL_BCOLOR) {
|
||||
bcolor = (pr[col] & COL_BCOLOR);
|
||||
mode = ((mode & ~COL_BCOLOR) | bcolor);
|
||||
writestr(bcolor_seq(bcolor));
|
||||
}
|
||||
#endif /* BG_COLOR */
|
||||
#endif /* USE_BG_COLOR */
|
||||
if ((pr[col] & S_GRAPHICS) && !(mode & S_GRAPHICS)) {
|
||||
if (!graph_enabled) {
|
||||
graph_enabled = 1;
|
||||
@@ -1161,9 +1158,9 @@ refresh(void)
|
||||
*dirty &= ~(L_NEED_CE | L_CLRTOEOL);
|
||||
if (mode & M_MEND) {
|
||||
if (mode & (S_COLORED
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
| S_BCOLORED
|
||||
#endif /* BG_COLOR */
|
||||
#endif /* USE_BG_COLOR */
|
||||
))
|
||||
writestr(T_op);
|
||||
if (mode & S_GRAPHICS)
|
||||
@@ -1326,7 +1323,7 @@ clrtoeol(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BG_COLOR
|
||||
#ifdef USE_BG_COLOR
|
||||
void
|
||||
clrtoeol_with_bcolor(void)
|
||||
{
|
||||
@@ -1352,14 +1349,14 @@ clrtoeolx(void)
|
||||
{
|
||||
clrtoeol_with_bcolor();
|
||||
}
|
||||
#else /* not BG_COLOR */
|
||||
#else /* not USE_BG_COLOR */
|
||||
|
||||
void
|
||||
clrtoeolx(void)
|
||||
{
|
||||
clrtoeol();
|
||||
}
|
||||
#endif /* not BG_COLOR */
|
||||
#endif /* not USE_BG_COLOR */
|
||||
|
||||
void
|
||||
clrtobot_eol(void (*clrtoeol) ())
|
||||
@@ -1579,7 +1576,7 @@ getch(void)
|
||||
return c;
|
||||
}
|
||||
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
#ifdef USE_GPM
|
||||
char
|
||||
wgetch(void)
|
||||
@@ -1649,7 +1646,7 @@ sysmouse(SIGNAL_ARG)
|
||||
ioctl(tty, CONS_MOUSECTL, &mi);
|
||||
}
|
||||
#endif /* USE_SYSMOUSE */
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
|
||||
void
|
||||
bell(void)
|
||||
@@ -1665,7 +1662,7 @@ skip_escseq(void)
|
||||
c = getch();
|
||||
if (c == '[' || c == 'O') {
|
||||
c = getch();
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
if (is_xterm && c == 'M') {
|
||||
getch();
|
||||
getch();
|
||||
@@ -1707,7 +1704,7 @@ sleep_till_anykey(int sec, int purge)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOUSE
|
||||
#ifdef USE_MOUSE
|
||||
|
||||
#define XTERM_ON {fputs("\033[?1001s\033[?1000h",ttyf); flush_tty();}
|
||||
#define XTERM_OFF {fputs("\033[?1000l\033[?1001r",ttyf); flush_tty();}
|
||||
@@ -1862,7 +1859,7 @@ mouse_inactive()
|
||||
mouse_end();
|
||||
}
|
||||
|
||||
#endif /* MOUSE */
|
||||
#endif /* USE_MOUSE */
|
||||
|
||||
void
|
||||
flush_tty()
|
||||
|
||||
Reference in New Issue
Block a user