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: #if !defined(lint) && !defined(NOSCCS)
8: static char sccsid[] = "@(#)printw.c 5.1 (Berkeley) 6/7/85";
9: #endif
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 176 times
- in /usr/src/games/battlestar/fly.c line
197,
239-243(3)
- in /usr/src/games/canfield.c line
181-183(2),
204-228(13),
238-262(13),
274-277(2),
286-290(3),
299-303(3),
314-317(2),
329-355(14),
373-391(9),
468,
486,
515,
661-663(2),
696,
706,
719,
787,
798,
819,
826,
851-853(2),
871-875(3),
908-915(4),
938,
950,
974-996(9),
1028-1044(9),
1221,
1236-1241(2),
1464-1465(2),
1473-1478(2),
1486,
1535-1544(5),
1566
- in /usr/src/games/hangman/endgame.c line
18-20(2)
- in /usr/src/games/phantasia/fight.c line
56,
62
- in /usr/src/games/phantasia/func0.c line
26,
42,
120,
189,
197,
226,
249,
279,
361,
632-634(2),
658,
672,
688,
700,
708,
724,
738,
754,
793
- in /usr/src/games/phantasia/func1.c line
138,
259-262(2),
268,
275,
581-598(14)
- in /usr/src/games/phantasia/func2.c line
285,
590
- in /usr/src/games/phantasia/main.c line
226
- 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/PORT/systat/disks.c line
92
- in /usr/src/ucb/PORT/systat/netcmds.c line
195-197(2),
257
Defined variables
sccsid
defined in line
8;
never used