Commit | Line | Data |
---|---|---|
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 | 9 | static 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 | ||
20 | mvprintw(y, x, fmt, args) | |
21 | reg int y, x; | |
22 | char *fmt; | |
23 | int 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 | ||
33 | mvwprintw(win, y, x, fmt, args) | |
34 | reg WINDOW *win; | |
35 | reg int y, x; | |
36 | char *fmt; | |
37 | int 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 | } |