2 * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
6 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
7 /* All Rights Reserved */
10 * Copyright (c) 1980 Regents of the University of California.
11 * All rights reserved. The Berkeley software License Agreement
12 * specifies the terms and conditions for redistribution.
15 #pragma ident "%Z%%M% %I% %E% SMI"
21 sccsid
[] = "@(#)printw.c 1.8 88/02/08 SMI"; /* from UCB 5.1 85/06/07 */
34 * This routine implements a printf on the standard screen.
38 printw(char *fmt
, ...)
43 return (_sprintw(stdscr
, fmt
, ap
));
47 * This routine implements a printf on the given window.
51 wprintw(WINDOW
*win
, char *fmt
, ...)
56 return (_sprintw(win
, fmt
, ap
));
59 * This routine actually executes the printf and adds it to the window
61 * This code now uses the vsprintf routine, which portably digs
62 * into stdio. We provide a vsprintf for older systems that don't
67 _sprintw(WINDOW
*win
, char *fmt
, va_list ap
)
71 (void) vsprintf(buf
, fmt
, ap
);
72 return (waddstr(win
, buf
));