[w3m-dev 03772] Compilation error on Cygwin B20.1

* terms.c (term_title): use Sprintf() instead of snprintf()
* doc-jp/README.cygwin doc/README.cygwin: add note about B20.1
From: patakuti@t3.rim.or.jp
This commit is contained in:
Fumitoshi UKAI
2003-02-23 16:00:11 +00:00
parent 2023d063c6
commit 0545c29559
4 changed files with 17 additions and 5 deletions

View File

@@ -1,3 +1,9 @@
2003-02-24 patakuti@t3.rim.or.jp
* [w3m-dev 03772] Compilation error on Cygwin B20.1
* terms.c (term_title): use Sprintf() instead of snprintf()
* doc-jp/README.cygwin doc/README.cygwin: add note about B20.1
2003-02-21 WATANABE Katsuyuki <knabe@sannet.ne.jp>
* [w3m-dev 03765] Re: README.cygwin
@@ -7227,4 +7233,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
$Id: ChangeLog,v 1.760 2003/02/21 14:25:33 ukai Exp $
$Id: ChangeLog,v 1.761 2003/02/23 16:00:11 ukai Exp $

View File

@@ -12,6 +12,8 @@ Cygwin
w3m-0.2 以降から cygwin 向けの修正パッチが取り込まれたためcygwin-1.1.4
以降の環境であれば特に問題なくビルドできますNet Release 前の B18, B19,
B20あたりでもビルドできるはずですが確認はされていません
(*) Cygwin B20.1 の環境では
LOCAL_LIBRARIES に -luser32 をつける必要があります。
なおtermcap ないし ncurses パッケージは最新のものを使ってください.特
に termcap を使う場合,古いパッケージは /etc/termcap の cygwin のエント

View File

@@ -11,6 +11,7 @@ Build
After w3m-0.2, patches for Cygwin have been marged to w3m packages. If you use
cygwin-1.1.4 or later, w3m shuould be build without any problems.
(*) on Cygwin B20.1, you should add -luser32 to LOCAL_LIBRARIES
The newest version of termcap and ncurses package are recomended. Especially,
older versions of termcap have bugs in the entry for Cygwin which make the

11
terms.c
View File

@@ -1,4 +1,4 @@
/* $Id: terms.c,v 1.47 2003/02/21 14:25:33 ukai Exp $ */
/* $Id: terms.c,v 1.48 2003/02/23 16:00:15 ukai Exp $ */
/*
* An original curses library for EUC-kanji by Akinori ITO, December 1989
* revised by Akinori ITO, January 1995
@@ -1827,9 +1827,12 @@ term_title(char *s)
if (title_str != NULL) {
#ifdef __CYGWIN__
if (isLocalConsole && title_str == CYGWIN_TITLE) {
char buff[1024];
snprintf(buff, sizeof(buff), title_str, s);
SetConsoleTitle(buff);
Str buff;
buff = Sprintf(title_str, s);
if (buff->length > 1024) {
Strtruncate(buff, 1024);
}
SetConsoleTitle(buff->ptr);
}
else if (isLocalConsole || !isWinConsole)
#endif