1 /* 2 * Copyright (c) 1981 Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)mvprintw.c 5.5 (Berkeley) 06/01/90"; 10 #endif /* not lint */ 11 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 * 18 */ 19 20 mvprintw(y, x, fmt, args) 21 reg int y, x; 22 char *fmt; 23 int args; { 24 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); 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 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); 45 } 46