diff options
Diffstat (limited to 'ncurses/tty')
| -rw-r--r-- | ncurses/tty/hardscroll.c | 19 | ||||
| -rw-r--r-- | ncurses/tty/lib_mvcur.c | 14 | ||||
| -rw-r--r-- | ncurses/tty/lib_twait.c | 8 | ||||
| -rw-r--r-- | ncurses/tty/tty_update.c | 6 |
4 files changed, 32 insertions, 15 deletions
diff --git a/ncurses/tty/hardscroll.c b/ncurses/tty/hardscroll.c index 7d8979a4f51b..2c40997fb6b1 100644 --- a/ncurses/tty/hardscroll.c +++ b/ncurses/tty/hardscroll.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,6 +29,8 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 * * and: Eric S. Raymond <esr@snark.thyrsus.com> * + * and: Thomas E. Dickey 1996-on * + * and: Alexander V Lukyanov 1997-1998 * ****************************************************************************/ /****************************************************************************** @@ -145,7 +147,7 @@ AUTHOR #include <curses.priv.h> -MODULE_ID("$Id: hardscroll.c,v 1.41 2007/09/29 21:48:36 tom Exp $") +MODULE_ID("$Id: hardscroll.c,v 1.42 2008/08/03 23:49:30 tom Exp $") #if defined(SCROLLDEBUG) || defined(HASHDEBUG) @@ -270,13 +272,14 @@ _nc_linedump(void) char *buf = 0; size_t want = (screen_lines + 1) * 4; - buf = typeMalloc(char, want); + if ((buf = typeMalloc(char, want)) != 0) { - (void) strcpy(buf, "virt"); - for (n = 0; n < screen_lines; n++) - (void) sprintf(buf + strlen(buf), " %02d", OLDNUM(n)); - TR(TRACE_UPDATE | TRACE_MOVE, (buf)); - free(buf); + (void) strcpy(buf, "virt"); + for (n = 0; n < screen_lines; n++) + (void) sprintf(buf + strlen(buf), " %02d", OLDNUM(n)); + TR(TRACE_UPDATE | TRACE_MOVE, (buf)); + free(buf); + } } #endif /* defined(TRACE) || defined(SCROLLDEBUG) */ diff --git a/ncurses/tty/lib_mvcur.c b/ncurses/tty/lib_mvcur.c index 19984c92333e..8e66fa3bf64c 100644 --- a/ncurses/tty/lib_mvcur.c +++ b/ncurses/tty/lib_mvcur.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -155,7 +155,7 @@ #include <term.h> #include <ctype.h> -MODULE_ID("$Id: lib_mvcur.c,v 1.110 2007/08/11 16:15:57 tom Exp $") +MODULE_ID("$Id: lib_mvcur.c,v 1.113 2008/08/16 19:30:58 tom Exp $") #define WANT_CHAR(y, x) SP->_newscr->_line[y].text[x] /* desired state */ #define BAUDRATE cur_term->_baudrate /* bits per second */ @@ -230,7 +230,7 @@ _nc_msec_cost(const char *const cap, int affcnt) } #if NCURSES_NO_PADDING - if (!(SP->_no_padding)) + if (!GetNoPadding(SP)) #endif cum_cost += number * 10; } else @@ -426,8 +426,11 @@ _nc_mvcur_wrap(void) mvcur(-1, -1, screen_lines - 1, 0); /* set cursor to normal mode */ - if (SP->_cursor != -1) + if (SP->_cursor != -1) { + int cursor = SP->_cursor; curs_set(1); + SP->_cursor = cursor; + } if (exit_ca_mode) { TPUTS_TRACE("exit_ca_mode"); @@ -628,7 +631,8 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int int i; for (i = 0; i < n; i++) - *check.s_tail++ = CharOf(WANT_CHAR(to_y, from_x + i)); + *check.s_tail++ = (char) CharOf(WANT_CHAR(to_y, + from_x + i)); *check.s_tail = '\0'; check.s_size -= n; lhcost += n * SP->_char_padding; diff --git a/ncurses/tty/lib_twait.c b/ncurses/tty/lib_twait.c index 6d46081862fd..16d12edbbe3c 100644 --- a/ncurses/tty/lib_twait.c +++ b/ncurses/tty/lib_twait.c @@ -43,6 +43,10 @@ #include <curses.priv.h> +#if defined __HAIKU__ && defined __BEOS__ +#undef __BEOS__ +#endif + #ifdef __BEOS__ #undef false #undef true @@ -62,7 +66,9 @@ # endif #endif -MODULE_ID("$Id: lib_twait.c,v 1.57 2008/05/03 21:35:57 tom Exp $") +#undef CUR + +MODULE_ID("$Id: lib_twait.c,v 1.59 2008/08/30 20:08:19 tom Exp $") static long _nc_gettime(TimeType * t0, bool first) diff --git a/ncurses/tty/tty_update.c b/ncurses/tty/tty_update.c index 16fc17d27236..6a3a0c8e9341 100644 --- a/ncurses/tty/tty_update.c +++ b/ncurses/tty/tty_update.c @@ -44,6 +44,10 @@ #include <curses.priv.h> +#if defined __HAIKU__ && defined __BEOS__ +#undef __BEOS__ +#endif + #ifdef __BEOS__ #undef false #undef true @@ -74,7 +78,7 @@ #include <ctype.h> #include <term.h> -MODULE_ID("$Id: tty_update.c,v 1.245 2008/05/03 22:43:04 tom Exp $") +MODULE_ID("$Id: tty_update.c,v 1.246 2008/08/30 20:08:19 tom Exp $") /* * This define controls the line-breakout optimization. Every once in a |
