Ken Arnold edits for document distributed with 4.3BSD
[unix-history] / usr / src / lib / libcurses / move.c
CommitLineData
87c6fcf8
DF
1/*
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 */
6
7#ifndef lint
d38c8e6d 8static char sccsid[] = "@(#)move.c 5.2 (Berkeley) %G%";
87c6fcf8
DF
9#endif not lint
10
0114689d
KA
11# include "curses.ext"
12
13/*
14 * This routine moves the cursor to the given point
15 *
0114689d
KA
16 */
17wmove(win, y, x)
18reg WINDOW *win;
19reg int y, x; {
20
21# ifdef DEBUG
22 fprintf(outf, "MOVE to (%d, %d)\n", y, x);
23# endif
d38c8e6d
JB
24 if (x < 0 || y < 0)
25 return ERR;
0114689d
KA
26 if (x >= win->_maxx || y >= win->_maxy)
27 return ERR;
28 win->_curx = x;
29 win->_cury = y;
30 return OK;
31}