1: /*
2: * Copyright (c) 1980 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: */
6:
7: #ifndef lint
8: static char sccsid[] = "@(#)printw.c 5.1 (Berkeley) 6/7/85";
9: #endif not lint
10:
11: /*
12: * printw and friends
13: *
14: */
15:
16: # include "curses.ext"
17:
18: /*
19: * This routine implements a printf on the standard screen.
20: */
21: printw(fmt, args)
22: char *fmt;
23: int args; {
24:
25: return _sprintw(stdscr, fmt, &args);
26: }
27:
28: /*
29: * This routine implements a printf on the given window.
30: */
31: wprintw(win, fmt, args)
32: WINDOW *win;
33: char *fmt;
34: int args; {
35:
36: return _sprintw(win, fmt, &args);
37: }
38: /*
39: * This routine actually executes the printf and adds it to the window
40: *
41: * This is really a modified version of "sprintf". As such,
42: * it assumes that sprintf interfaces with the other printf functions
43: * in a certain way. If this is not how your system works, you
44: * will have to modify this routine to use the interface that your
45: * "sprintf" uses.
46: */
47: _sprintw(win, fmt, args)
48: WINDOW *win;
49: char *fmt;
50: int *args; {
51:
52: FILE junk;
53: char buf[512];
54:
55: junk._flag = _IOWRT + _IOSTRG;
56: junk._ptr = buf;
57: junk._cnt = 32767;
58: _doprnt(fmt, args, &junk);
59: putc('\0', &junk);
60: return waddstr(win, buf);
61: }
Defined functions
printw
defined in line
21; used 132 times
- in /usr/src/games/battlestar/fly.c line
197,
239-243(3)
- in /usr/src/games/canfield.c line
183-185(2),
206-230(13),
240-264(13),
276-279(2),
288-292(3),
301-305(3),
316-319(2),
331-357(14),
375-393(9),
470,
488,
517,
663-665(2),
698,
708,
721,
789,
800,
821,
828,
853-855(2),
873-877(3),
910-917(4),
940,
952,
976-998(9),
1030-1046(9),
1223,
1238-1243(2),
1466-1467(2),
1475-1480(2),
1488,
1537-1546(5),
1568
- in /usr/src/games/hangman/endgame.c line
18-20(2)
- in /usr/src/games/robots/main.c line
115
- in /usr/src/games/robots/move_robs.c line
108
- in /usr/src/games/robots/play_level.c line
71,
82
- in /usr/src/games/robots/score.c line
93
- in /usr/src/games/sail/pl_7.c line
392
- in /usr/src/ucb/systat/disks.c line
92
- in /usr/src/ucb/systat/netcmds.c line
195-197(2),
257
wprintw
defined in line
31; used 39 times
- in /usr/src/games/mille/save.c line
93
- in /usr/src/games/sail/pl_7.c line
84,
118-120(2),
248,
255-288(14),
307-317(3),
323
- in /usr/src/games/worm.c line
83,
218
- in /usr/src/new/mh/uip/vmh.c line
236,
674-676(2),
741,
847-854(3),
930,
951
- in /usr/src/old/talk/io.c line
100,
115
- in /usr/src/ucb/systat/main.c line
182
- in /usr/src/ucb/talk/io.c line
100,
115
Defined variables
sccsid
defined in line
8;
never used