X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftty%2Flib_mvcur.c;h=530de327e4e8d5baba4a2dbfe586202ca1eb59b9;hp=4c0ef4a27e3ee90ff84b5956efff31c697f68aab;hb=7c4bc0fa99a1be37a14aa19a5943a549570954c4;hpb=027ae42953e3186daed8f3882da73de48291b606 diff --git a/ncurses/tty/lib_mvcur.c b/ncurses/tty/lib_mvcur.c index 4c0ef4a2..530de327 100644 --- a/ncurses/tty/lib_mvcur.c +++ b/ncurses/tty/lib_mvcur.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 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 #include -MODULE_ID("$Id: lib_mvcur.c,v 1.107 2006/11/25 22:31:59 tom Exp $") +MODULE_ID("$Id: lib_mvcur.c,v 1.112 2008/06/28 12:50:46 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"); @@ -959,6 +962,7 @@ NCURSES_EXPORT_VAR(int) _nc_optimize_enable = OPTIMIZE_ALL; #include #include +#include NCURSES_EXPORT_VAR(const char *) _nc_progname = "mvcur"; @@ -1017,7 +1021,7 @@ roll(int n) int main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) { - (void) strcpy(tname, termname()); + strcpy(tname, getenv("TERM")); load_term(); _nc_setupscreen(lines, columns, stdout, FALSE, 0); baudrate(); @@ -1088,7 +1092,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) load_term(); } else if (sscanf(buf, "d %s", capname) == 1) { struct name_table_entry const *np = _nc_find_entry(capname, - _nc_info_hash_table); + _nc_get_hash_table(FALSE)); if (np == NULL) (void) printf("No such capability as \"%s\"\n", capname); @@ -1116,7 +1120,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) } } else if (buf[0] == 'i') { dump_init((char *) NULL, F_TERMINFO, S_TERMINFO, 70, 0, FALSE); - dump_entry(&cur_term->type, FALSE, TRUE, 0, 0, 0); + dump_entry(&cur_term->type, FALSE, TRUE, 0, 0); putchar('\n'); } else if (buf[0] == 'o') { if (_nc_optimize_enable & OPTIMIZE_MVCUR) {