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