From f04882c76d0d23a35942e736e89ef19268f541b5 Mon Sep 17 00:00:00 2001 From: Sadrul Habib Chowdhury Date: Sat, 7 Feb 2009 20:00:26 -0500 Subject: Copyright for 2009 --- src/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/misc.c') diff --git a/src/misc.c b/src/misc.c index dd20ab1..c56d87a 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 +/* Copyright (c) 2008, 2009 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Micah Cowan (micah@cowan.name) -- cgit v1.2.1 From 575b2d074605453e9a694d2704a2ae7bc2e5ff3a Mon Sep 17 00:00:00 2001 From: Thomas Dickey Date: Wed, 11 Nov 2009 11:14:32 -0500 Subject: Add a note about a fixed bug in ncurses. References Debian#344759 --- src/misc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/misc.c') diff --git a/src/misc.c b/src/misc.c index c56d87a..4418803 100644 --- a/src/misc.c +++ b/src/misc.c @@ -657,6 +657,19 @@ int (*outc) __P((int)); * zeros but sleeps instead. This breaks CalcCost, of course. * Also, the ncurses wait functions use a global variable * to store the current outc function. Oh well... + * + * This comment dates from late 1998. See ncurses NEWS (990102): + * + * + provide support for termcap ospeed variable by copying it from the + * internal cur_term member, and using ospeed as the baudrate reference + * for the delay_output and tputs functions. If an application does not + * set ospeed, the library behaves as before, except that _nc_timed_wait + * is no longer used, or needed, since ospeed always has a value. But + * the application can modify ospeed to adjust the output of padding + * characters (from a bug report for screen 3.7.6 and email from Michael + * Schroeder ). + * + * Also read the source code for delay_output() -TD */ int (*save_outc) __P((int)); -- cgit v1.2.1 From 7b2854221b487ee6157baf814d1e49035ba11736 Mon Sep 17 00:00:00 2001 From: Sadrul Habib Chowdhury Date: Wed, 11 Nov 2009 17:29:33 -0500 Subject: Remove ooooold cruft. The bug in ncurses that this tried to work around has long been fixed. Thanks to Thomas Dickey. --- src/misc.c | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) (limited to 'src/misc.c') diff --git a/src/misc.c b/src/misc.c index 4418803..9d7c13d 100644 --- a/src/misc.c +++ b/src/misc.c @@ -651,52 +651,6 @@ int (*outc) __P((int)); return 0; } -# ifdef linux - -/* stupid stupid linux ncurses! It won't to padding with - * zeros but sleeps instead. This breaks CalcCost, of course. - * Also, the ncurses wait functions use a global variable - * to store the current outc function. Oh well... - * - * This comment dates from late 1998. See ncurses NEWS (990102): - * - * + provide support for termcap ospeed variable by copying it from the - * internal cur_term member, and using ospeed as the baudrate reference - * for the delay_output and tputs functions. If an application does not - * set ospeed, the library behaves as before, except that _nc_timed_wait - * is no longer used, or needed, since ospeed always has a value. But - * the application can modify ospeed to adjust the output of padding - * characters (from a bug report for screen 3.7.6 and email from Michael - * Schroeder ). - * - * Also read the source code for delay_output() -TD - */ - -int (*save_outc) __P((int)); - -# undef tputs - -void -xtputs(str, affcnt, outc) -char *str; -int affcnt; -int (*outc) __P((int)); -{ - extern int tputs __P((const char *, int, int (*)(int))); - save_outc = outc; - tputs(str, affcnt, outc); -} - -int -_nc_timed_wait(mode, ms, tlp) -int mode, ms, *tlp; -{ - _delay(ms * 10, save_outc); - return 0; -} - -# endif /* linux */ - #endif /* TERMINFO */ -- cgit v1.2.1 From 2199ead34441dd5291ffecb737b9ff4e7ae47f0d Mon Sep 17 00:00:00 2001 From: Sadrul Habib Chowdhury Date: Sat, 5 Dec 2009 21:53:52 -0500 Subject: Revamp the display list. Revamp the display list (in works). The future changes are expected to add full mouse control, and perhaps some other utility functions (e.g. detaching a display, changing permissions perhaps? etc.) --- src/misc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/misc.c') diff --git a/src/misc.c b/src/misc.c index 9d7c13d..7bc06f6 100644 --- a/src/misc.c +++ b/src/misc.c @@ -125,9 +125,10 @@ int y; } void -leftline(str, y) +leftline(str, y, rend) char *str; int y; +struct mchar *rend; { int l, n; struct mchar mchar_dol; @@ -139,7 +140,7 @@ int y; l = n = strlen(str); if (n > flayer->l_width - 1) n = flayer->l_width - 1; - LPutStr(flayer, str, n, &mchar_blank, 0, y); + LPutStr(flayer, str, n, rend ? rend : &mchar_blank, 0, y); if (n != l) LPutChar(flayer, &mchar_dol, n, y); } -- cgit v1.2.1 From 261a022ce947d17471b73a71345c265df9bfe7a4 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sun, 7 Mar 2010 19:29:39 -0500 Subject: Fix build with -Werror=format-security Some distributions ( mandriva for example ) use -Werror=format-security by default when build C software to try to enhance code quality and prevent security bugs. As the policy is to correct all occurences of the error ( so there is no false positive, nor question about to fix it or not ), a patch that fix the error on gnu screen 4.0.3 have been added to the package. I have rediffed it against latest git snapshot, to be sent upstream. It mainly add "%s" where applicable. --- src/misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/misc.c') diff --git a/src/misc.c b/src/misc.c index 7bc06f6..ff3bebb 100644 --- a/src/misc.c +++ b/src/misc.c @@ -57,7 +57,7 @@ register const char *str; register char *cp; if ((cp = malloc(strlen(str) + 1)) == NULL) - Panic(0, strnomem); + Panic(0, "%s", strnomem); else strcpy(cp, str); return cp; @@ -71,7 +71,7 @@ int n; register char *cp; if ((cp = malloc(n + 1)) == NULL) - Panic(0, strnomem); + Panic(0, "%s", strnomem); else { bcopy((char *)str, cp, n); -- cgit v1.2.1 From 6e67aee852c60c8b8a67981233ed29ca48ff8506 Mon Sep 17 00:00:00 2001 From: Sadrul Habib Chowdhury Date: Fri, 12 Mar 2010 19:27:09 -0500 Subject: Fix a typo. --- src/misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/misc.c') diff --git a/src/misc.c b/src/misc.c index ff3bebb..43e93a2 100644 --- a/src/misc.c +++ b/src/misc.c @@ -609,7 +609,7 @@ char *value; * the string space, we can free our buf now. */ free(buf); -# else /* NEEDSETENV */ +# else /* NEEDPUTENV */ /* * For all sysv-ish systems that link a standard putenv() * the string-space buf is added to the environment and must not @@ -617,7 +617,7 @@ char *value; * We are sorry to say that memory is lost here, when setting * the same variable again and again. */ -# endif /* NEEDSETENV */ +# endif /* NEEDPUTENV */ #else /* USESETENV */ # if HAVE_SETENV_3 setenv(var, value, 1); -- cgit v1.2.1