/****************************************************************************
- * 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 *
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
****************************************************************************/
/*
#include <curses.priv.h>
-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;