2 * Copyright 2004 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
[] = "@(#)getch.c 1.9 88/02/08 SMI"; /* from UCB 5.3 86/04/16 */
27 * This routine reads in a character from the window.
36 if (!win
->_scroll
&& (win
->_flags
&_FULLWIN
) &&
37 win
->_curx
== win
->_maxx
- 1 && win
->_cury
== win
->_maxy
- 1)
40 fprintf(outf
, "WGETCH: _echoit = %c, _rawmode = %c\n",
41 _echoit
? 'T' : 'F', _rawmode
? 'T' : 'F');
43 if (_echoit
&& !_rawmode
) {
49 fprintf(outf
, "WGETCH got '%s'\n", unctrl(inp
));
52 (void) mvwaddch(curscr
, win
->_cury
+ win
->_begy
,
53 win
->_curx
+ win
->_begx
, inp
);
54 (void) waddch(win
, inp
);