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[] = "@(#)clrtoeol.c 5.1 (Berkeley) 6/7/85";
9: #endif not lint
10:
11: # include "curses.ext"
12:
13: /*
14: * This routine clears up to the end of line
15: *
16: */
17: wclrtoeol(win)
18: reg WINDOW *win; {
19:
20: reg char *sp, *end;
21: reg int y, x;
22: reg char *maxx;
23: reg int minx;
24:
25: y = win->_cury;
26: x = win->_curx;
27: end = &win->_y[y][win->_maxx];
28: minx = _NOCHANGE;
29: maxx = &win->_y[y][x];
30: for (sp = maxx; sp < end; sp++)
31: if (*sp != ' ') {
32: maxx = sp;
33: if (minx == _NOCHANGE)
34: minx = sp - win->_y[y];
35: *sp = ' ';
36: }
37: /*
38: * update firstch and lastch for the line
39: */
40: touchline(win, y, win->_curx, win->_maxx - 1);
41: # ifdef DEBUG
42: fprintf(outf, "CLRTOEOL: minx = %d, maxx = %d, firstch = %d, lastch = %d\n", minx, maxx - win->_y[y], win->_firstch[y], win->_lastch[y]);
43: # endif
44: }
Defined functions
wclrtoeol
defined in line
17; used 36 times
- in /usr/include/curses.h line
106
- in /usr/src/games/cribbage/io.c line
393,
409-414(2),
456
- in /usr/src/games/mille/comp.c line
22
- in /usr/src/games/mille/init.c line
111-113(2)
- in /usr/src/games/mille/move.c line
338
- in /usr/src/games/mille/save.c line
94
- in /usr/src/games/sail/pl_7.c line
50,
77,
130
- in /usr/src/new/mh/uip/vmh.c line
237,
691,
699,
716,
855,
999
- in /usr/src/old/talk/display.c line
94,
158-160(2)
- in /usr/src/old/talk/init_disp.c line
110
- in /usr/src/ucb/systat/iostat.c line
320
- in /usr/src/ucb/systat/main.c line
178
- in /usr/src/ucb/systat/mbufs.c line
37,
90
- in /usr/src/ucb/systat/netstat.c line
307
- in /usr/src/ucb/systat/pigs.c line
136,
240
- in /usr/src/ucb/talk/display.c line
94,
158-160(2)
- in /usr/src/ucb/talk/init_disp.c line
110
- in /usr/src/usr.lib/libcurses/addch.c line
61
- in /usr/src/usr.lib/libcurses/curses.h line
106
Defined variables
sccsid
defined in line
8;
never used