aboutsummaryrefslogtreecommitdiffstats
path: root/terms.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-02-23 16:00:11 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-02-23 16:00:11 +0000
commit0545c29559f7d3b4d333f7f64f594398e796264e (patch)
treed33790c5a90a8b10a435e27a0e26376e77f87ed8 /terms.c
parent[w3m-dev 03765] Re: README.cygwin (diff)
downloadw3m-0545c29559f7d3b4d333f7f64f594398e796264e.tar.gz
w3m-0545c29559f7d3b4d333f7f64f594398e796264e.zip
[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
Diffstat (limited to '')
-rw-r--r--terms.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/terms.c b/terms.c
index 9ba8faa..6be5d33 100644
--- a/terms.c
+++ b/terms.c
@@ -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