X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Ftty%2Flib_mvcur.c;h=ffd42bb1849e4f2e5ca052f47fe2307a73ae783d;hb=76a479337308b4b5e749fa8c38b7b7f482998c5b;hp=2288769a04c1ac0e1ded49f60135062052bfeb5f;hpb=ef2d99350e0d3e4606171b5b1466ab92ec440205;p=ncurses.git diff --git a/ncurses/tty/lib_mvcur.c b/ncurses/tty/lib_mvcur.c index 2288769a..ffd42bb1 100644 --- a/ncurses/tty/lib_mvcur.c +++ b/ncurses/tty/lib_mvcur.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. * + * Copyright (c) 1998-2015,2016 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 * @@ -159,7 +159,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_mvcur.c,v 1.134 2014/03/08 20:32:59 tom Exp $") +MODULE_ID("$Id: lib_mvcur.c,v 1.137 2016/05/28 23:32:40 tom Exp $") #define WANT_CHAR(sp, y, x) NewScreen(sp)->_line[y].text[x] /* desired state */ @@ -327,7 +327,7 @@ NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_mvcur_init) (NCURSES_SP_DCL0) /* initialize the cost structure */ { - if (SP_PARM->_ofp && isatty(fileno(SP_PARM->_ofp))) { + if (SP_PARM->_ofp && NC_ISATTY(fileno(SP_PARM->_ofp))) { SP_PARM->_char_padding = ((BAUDBYTE * 1000 * 10) / (BAUDRATE(SP_PARM) > 0 ? BAUDRATE(SP_PARM) @@ -992,10 +992,10 @@ _nc_real_mvcur(NCURSES_SP_DCLx } if (xold >= screen_columns(SP_PARM)) { - int l; if (SP_PARM->_nl) { - l = (xold + 1) / screen_columns(SP_PARM); + int l = (xold + 1) / screen_columns(SP_PARM); + yold += l; if (yold >= screen_lines(SP_PARM)) l -= (yold - screen_lines(SP_PARM) - 1); @@ -1278,7 +1278,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_init(NULL, F_TERMINFO, S_TERMINFO, 70, 0, 0, FALSE, FALSE); dump_entry(&cur_term->type, FALSE, TRUE, 0, 0); putchar('\n'); } else if (buf[0] == 'o') {