X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_move.c;h=d9ba8c0c70cbac95cdd0ac7fab758fcb3dbd55b0;hp=68415d6e620d953e42b84d54d154900c4fce0b3a;hb=dafd158641767f37aa900c195aaa77b27da38500;hpb=b1f61d9f3aa244512045a6b02e759825d7049d34 diff --git a/ncurses/base/lib_move.c b/ncurses/base/lib_move.c index 68415d6e..d9ba8c0c 100644 --- a/ncurses/base/lib_move.c +++ b/ncurses/base/lib_move.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 1998-2004,2009 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 +30,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-on * ****************************************************************************/ /* @@ -40,16 +42,14 @@ #include -MODULE_ID("$Id: lib_move.c,v 1.9 2000/04/29 21:11:19 tom Exp $") +MODULE_ID("$Id: lib_move.c,v 1.14 2020/02/02 23:34:34 tom Exp $") -int +NCURSES_EXPORT(int) wmove(WINDOW *win, int y, int x) { - T((T_CALLED("wmove(%p,%d,%d)"), win, y, x)); + T((T_CALLED("wmove(%p,%d,%d)"), (void *) win, y, x)); - if (win && - x >= 0 && x <= win->_maxx && - y >= 0 && y <= win->_maxy) { + if (LEGALYX(win, y, x)) { win->_curx = (NCURSES_SIZE_T) x; win->_cury = (NCURSES_SIZE_T) y;