new copyright notice
[unix-history] / usr / src / lib / libcurses / mvprintw.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[] = "@(#)mvprintw.c 5.5 (Berkeley) %G%";
2f14f200 10#endif /* not lint */
87c6fcf8 11
9fa02549
KA
12# include "curses.ext"
13
14/*
15 * implement the mvprintw commands. Due to the variable number of
16 * arguments, they cannot be macros. Sigh....
17 *
9fa02549
KA
18 */
19
20mvprintw(y, x, fmt, args)
21reg int y, x;
22char *fmt;
23int args; {
24
8543fbf9
KB
25 char buf[512];
26
27 if (move(y, x) != OK)
28 return ERR;
29 (void) vsprintf(buf, fmt, &args);
30 return waddstr(stdscr, buf);
9fa02549
KA
31}
32
33mvwprintw(win, y, x, fmt, args)
34reg WINDOW *win;
35reg int y, x;
36char *fmt;
37int args; {
38
8543fbf9
KB
39 char buf[512];
40
41 if (move(y, x) != OK)
42 return ERR;
43 (void) vsprintf(buf, fmt, &args);
44 return waddstr(win, buf);
9fa02549 45}