new stdio; renamed from doprnt.c. There was a trivial vfprintf.c
[unix-history] / usr / src / lib / libcurses / move.c
CommitLineData
87c6fcf8 1/*
2f14f200
KB
2 * Copyright (c) 1981 Regents of the University of California.
3 * All rights reserved.
4 *
c07973a2 5 * %sccs.include.redist.c%
87c6fcf8
DF
6 */
7
8#ifndef lint
c07973a2 9static char sccsid[] = "@(#)move.c 5.5 (Berkeley) %G%";
2f14f200 10#endif /* not lint */
87c6fcf8 11
0114689d
KA
12# include "curses.ext"
13
14/*
15 * This routine moves the cursor to the given point
16 *
0114689d
KA
17 */
18wmove(win, y, x)
19reg WINDOW *win;
20reg int y, x; {
21
22# ifdef DEBUG
23 fprintf(outf, "MOVE to (%d, %d)\n", y, x);
24# endif
d38c8e6d
JB
25 if (x < 0 || y < 0)
26 return ERR;
0114689d
KA
27 if (x >= win->_maxx || y >= win->_maxy)
28 return ERR;
29 win->_curx = x;
30 win->_cury = y;
31 return OK;
32}