/****************************************************************************
- * 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 *
#include <term.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_mvcur.c,v 1.108 2007/04/28 19:58:24 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 */
}
#if NCURSES_NO_PADDING
- if (!(SP->_no_padding))
+ if (!GetNoPadding(SP))
#endif
cum_cost += number * 10;
} else
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");
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;
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();
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);