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
[] = "@(#)touchwin.c 1.6 88/02/08 SMI"; /* from UCB 5.1 85/06/07 */
27 * make it look like the whole window has been changed.
37 fprintf(outf
, "TOUCHWIN(%0.2o)\n", win
);
40 for (y
= 0; y
< maxy
; y
++)
41 (void) touchline(win
, y
, 0, win
->_maxx
- 1);
50 touchline(WINDOW
*win
, int y
, int sx
, int ex
)
53 fprintf(outf
, "TOUCHLINE(%0.2o, %d, %d, %d)\n", win
, y
, sx
, ex
);
54 fprintf(outf
, "TOUCHLINE:first = %d, last = %d\n",
55 win
->_firstch
[y
], win
->_lastch
[y
]);
59 if (win
->_firstch
[y
] == _NOCHANGE
) {
60 win
->_firstch
[y
] = (short)sx
;
61 win
->_lastch
[y
] = (short)ex
;
63 if (win
->_firstch
[y
] > sx
)
64 win
->_firstch
[y
] = (short)sx
;
65 if (win
->_lastch
[y
] < ex
)
66 win
->_lastch
[y
] = (short)ex
;
69 fprintf(outf
, "TOUCHLINE:first = %d, last = %d\n",
70 win
->_firstch
[y
], win
->_lastch
[y
]);