/****************************************************************************
- * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,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 *
#include <curses.priv.h>
-MODULE_ID("$Id: lib_mvwin.c,v 1.12 2001/12/19 01:06:22 tom Exp $")
+MODULE_ID("$Id: lib_mvwin.c,v 1.15 2009/04/18 18:25:37 tom Exp $")
NCURSES_EXPORT(int)
mvwin(WINDOW *win, int by, int bx)
if (!win || (win->_flags & _ISPAD))
returnCode(ERR);
+ /*
+ * mvwin() should only modify the indices. See test/demo_menus.c and
+ * test/movewindow.c for examples.
+ */
+#if 0
/* Copying subwindows is allowed, but it is expensive... */
if (win->_flags & _SUBWIN) {
int err = ERR;
}
returnCode(err);
}
+#endif
- if (by + win->_maxy > screen_lines - 1
- || bx + win->_maxx > screen_columns - 1
+ if (by + win->_maxy > screen_lines(CURRENT_SCREEN) - 1
+ || bx + win->_maxx > screen_columns(CURRENT_SCREEN) - 1
|| by < 0
|| bx < 0)
returnCode(ERR);