X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_move.c;h=488b195d15a3c3f44be611c104dbb2064257bb9a;hp=e917eb78052563a744512279fa7cce2818a8b6d3;hb=4aaab5e7c855d212deaa53608a08de5648fd86f6;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01;ds=sidebyside diff --git a/ncurses/base/lib_move.c b/ncurses/base/lib_move.c index e917eb78..488b195d 100644 --- a/ncurses/base/lib_move.c +++ b/ncurses/base/lib_move.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * Copyright (c) 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 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-on * ****************************************************************************/ /* @@ -40,16 +41,14 @@ #include -MODULE_ID("$Id: lib_move.c,v 1.11 2000/12/10 02:43:27 tom Exp $") +MODULE_ID("$Id: lib_move.c,v 1.13 2009/10/24 22:34:07 tom Exp $") 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;