diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2004-07-15 16:32:38 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2004-07-15 16:32:38 +0000 |
commit | 055ad4c6900d3b9be67f46ceb660e3c3277e58f8 (patch) | |
tree | 9db1aca963382ed53b3f4489f01e7f0bf85a851b | |
parent | [w3m-dev 04091] option panel: gettextize select list (diff) | |
download | w3m-055ad4c6900d3b9be67f46ceb660e3c3277e58f8.tar.gz w3m-055ad4c6900d3b9be67f46ceb660e3c3277e58f8.zip |
[w3m-dev 04092] remove __CYGWIN__ && LANG == JA
* remove condition LANG == JA && __CYGWIN__
* cygwin_mouse_btn_swapped enabled when before 1.5.x
From: WATANABE Katsuyuki <knabe@sannet.ne.jp>
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | config.h.in | 2 | ||||
-rw-r--r-- | display.c | 6 | ||||
-rw-r--r-- | fm.h | 8 | ||||
-rw-r--r-- | main.c | 4 | ||||
-rw-r--r-- | menu.c | 4 | ||||
-rw-r--r-- | terms.c | 35 | ||||
-rw-r--r-- | terms.h | 6 |
8 files changed, 41 insertions, 32 deletions
@@ -1,5 +1,11 @@ 2004-07-16 WATANABE Katsuyuki <knabe@sannet.ne.jp> + * [w3m-dev 04092] remove __CYGWIN__ && LANG == JA + * remove condition LANG == JA && __CYGWIN__ + * cygwin_mouse_btn_swapped enabled when before 1.5.x + +2004-07-16 WATANABE Katsuyuki <knabe@sannet.ne.jp> + * [w3m-dev 04091] option panel: gettextize select list * rc.c: gettextize option select list. * rc.c: add gettextize message. @@ -8512,4 +8518,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.929 2004/07/15 16:26:03 ukai Exp $ +$Id: ChangeLog,v 1.930 2004/07/15 16:32:38 ukai Exp $ diff --git a/config.h.in b/config.h.in index a9ad24b..32a1647 100644 --- a/config.h.in +++ b/config.h.in @@ -193,10 +193,8 @@ typedef RETSIGTYPE MySignalHandler; #if defined( __CYGWIN__ ) #define SUPPORT_NETBIOS_SHARE 1 -#if LANG == JA #define SUPPORT_WIN9X_CONSOLE_MBCS 1 #endif -#endif #if defined(__DJGPP__) #define DEFAULT_TERM "dosansi" @@ -1,4 +1,4 @@ -/* $Id: display.c,v 1.68 2003/09/26 17:59:51 ukai Exp $ */ +/* $Id: display.c,v 1.69 2004/07/15 16:32:38 ukai Exp $ */ #include <signal.h> #include "fm.h" @@ -433,11 +433,11 @@ displayBuffer(Buffer *buf, int mode) scroll(n); } else if (n < 0 && n > -buf->LINES) { -#if defined(__CYGWIN__) && LANG == JA +#if 0 /* defined(__CYGWIN__) */ move(LASTLINE + n + 1, 0); clrtoeolx(); refresh(); -#endif /* defined(__CYGWIN__) && LANG == JA */ +#endif /* defined(__CYGWIN__) */ rscroll(-n); } redrawNLine(buf, n); @@ -1,4 +1,4 @@ -/* $Id: fm.h,v 1.125 2004/04/16 18:47:19 ukai Exp $ */ +/* $Id: fm.h,v 1.126 2004/07/15 16:32:38 ukai Exp $ */ /* * w3m: WWW wo Miru utility * @@ -759,11 +759,11 @@ typedef struct http_request { */ extern int LINES, COLS; -#if defined(__CYGWIN__) && LANG == JA +#if defined(__CYGWIN__) extern int LASTLINE; -#else /* not defined(__CYGWIN__) || LANG != JA */ +#else /* not defined(__CYGWIN__) */ #define LASTLINE (LINES-1) -#endif /* not defined(__CYGWIN__) || LANG != JA */ +#endif /* not defined(__CYGWIN__) */ global int Tabstop init(8); global int IndentIncr init(4); @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.242 2004/04/04 16:47:20 ukai Exp $ */ +/* $Id: main.c,v 1.243 2004/07/15 16:32:38 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include <signal.h> @@ -5323,7 +5323,7 @@ DEFUN(mouse, MOUSE, "mouse operation") int btn, x, y; btn = (unsigned char)getch() - 32; -#if defined(__CYGWIN__) +#if defined(__CYGWIN__) && CYGWIN_VERSION_DLL_MAJOR < 1005 if (cygwin_mouse_btn_swapped) { if (btn == MOUSE_BTN2_DOWN) btn = MOUSE_BTN3_DOWN; @@ -1,4 +1,4 @@ -/* $Id: menu.c,v 1.41 2004/03/23 16:44:02 ukai Exp $ */ +/* $Id: menu.c,v 1.42 2004/07/15 16:32:38 ukai Exp $ */ /* * w3m menu.c */ @@ -1183,7 +1183,7 @@ mMouse(char c) int btn, x, y; btn = (unsigned char)getch() - 32; -#if defined(__CYGWIN__) +#if defined(__CYGWIN__) && CYGWIN_VERSION_DLL_MAJOR < 1005 if (cygwin_mouse_btn_swapped) { if (btn == MOUSE_BTN2_DOWN) btn = MOUSE_BTN3_DOWN; @@ -1,4 +1,4 @@ -/* $Id: terms.c,v 1.51 2003/12/08 16:06:34 ukai Exp $ */ +/* $Id: terms.c,v 1.52 2004/07/15 16:32:38 ukai Exp $ */ /* * An original curses library for EUC-kanji by Akinori ITO, December 1989 * revised by Akinori ITO, January 1995 @@ -56,8 +56,11 @@ static int tty; #include <windows.h> #include <sys/cygwin.h> static int isWinConsole = 0; +#define TERM_CYGWIN 1 +#define TERM_CYGWIN_RESERVE_IME 2 static int isLocalConsole = 0; -#ifdef USE_MOUSE + +#if CYGWIN_VERSION_DLL_MAJOR < 1005 && defined(USE_MOUSE) int cygwin_mouse_btn_swapped = 0; #endif @@ -79,9 +82,6 @@ check_win9x(void) } if (winVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) { isWin95 = 1; - if (ttyslot() != -1) { - isLocalConsole = 0; - } } else { isWin95 = 0; @@ -200,7 +200,7 @@ GetConsoleHwnd(void) return (hwndFound); } -#ifdef USE_MOUSE +#if CYGWIN_VERSION_DLL_MAJOR < 1005 && defined(USE_MOUSE) static unsigned long cygwin_version(void) { @@ -223,7 +223,7 @@ check_cygwin_console(void) if (term == NULL) term = DEFAULT_TERM; if (term && strncmp(term, "cygwin", 6) == 0) { - isWinConsole = 1; + isWinConsole = TERM_CYGWIN; } if (isWinConsole) { hWnd = GetConsoleHwnd(); @@ -232,11 +232,17 @@ check_cygwin_console(void) isLocalConsole = 1; } } + if (strncmp(getenv("LANG"), "ja", 2) == 0) { + isWinConsole = TERM_CYGWIN_RESERVE_IME; + } #ifdef SUPPORT_WIN9X_CONSOLE_MBCS check_win9x(); + if (isWin95 && ttyslot() != -1) { + isLocalConsole = 0; + } #endif } -#ifdef USE_MOUSE +#if CYGWIN_VERSION_DLL_MAJOR < 1005 && defined(USE_MOUSE) if (cygwin_version() <= 1003015) { /* cygwin DLL 1.3.15 or earler */ cygwin_mouse_btn_swapped = 1; @@ -382,9 +388,10 @@ char *T_cd, *T_ce, *T_kr, *T_kl, *T_cr, *T_bt, *T_ta, *T_sc, *T_rc, *T_ti, *T_te, *T_nd, *T_as, *T_ae, *T_eA, *T_ac, *T_op; int LINES, COLS; -#if defined(__CYGWIN__) && LANG == JA +#if defined(__CYGWIN__) int LASTLINE; -#endif /* defined(__CYGWIN__) && LANG == JA */ +#endif /* defined(__CYGWIN__) */ + static int max_LINES = 0, max_COLS = 0; static int tab_step = 8; static int CurLine, CurColumn; @@ -763,9 +770,9 @@ setlinescols(void) COLS = MAX_COLUMN; if (LINES > MAX_LINE) LINES = MAX_LINE; -#if defined(__CYGWIN__) && LANG == JA - LASTLINE = LINES - (isWinConsole ? 2 : 1); -#endif /* defined(__CYGWIN__) && LANG == JA */ +#if defined(__CYGWIN__) + LASTLINE = LINES - (isWinConsole == TERM_CYGWIN_RESERVE_IME ? 2 : 1); +#endif /* defined(__CYGWIN__) */ } void @@ -1285,9 +1292,7 @@ refresh(void) * (COLS-1,LINES-1). */ #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(USE_BG_COLOR) || defined(__CYGWIN__) */ @@ -1,9 +1,9 @@ -/* $Id: terms.h,v 1.9 2003/09/22 21:02:22 ukai Exp $ */ +/* $Id: terms.h,v 1.10 2004/07/15 16:32:39 ukai Exp $ */ #ifndef TERMS_H #define TERMS_H extern int LINES, COLS; -#if defined(__CYGWIN__) && LANG == JA +#if defined(__CYGWIN__) extern int LASTLINE; #endif @@ -21,7 +21,7 @@ extern int LASTLINE; #endif #ifdef __CYGWIN__ -#ifdef USE_MOUSE +#if CYGWIN_VERSION_DLL_MAJOR < 1005 && defined(USE_MOUSE) extern int cygwin_mouse_btn_swapped; #endif #ifdef SUPPORT_WIN9X_CONSOLE_MBCS |