⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 erase.c

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 C
字号:
#ifdef lintstatic char *sccsid = "@(#)erase.c	4.1	(ULTRIX)	7/2/90";#endif lint# include	"curses.ext"/* *	This routine erases everything on the _window. * * 1/27/81 (Berkeley) @(#)erase.c	1.2 */werase(win)reg WINDOW	*win; {	reg int		y;	reg chtype	*sp, *end, *start, *maxx;	reg int		minx;# ifdef DEBUG	if(outf) fprintf(outf, "WERASE(%0.2o), _maxx %d\n", win, win->_maxx);# endif	for (y = 0; y < win->_maxy; y++) {		minx = _NOCHANGE;		maxx = NULL;		start = win->_y[y];		end = &start[win->_maxx];		for (sp = start; sp < end; sp++) {#ifdef DEBUG			if (y == 23) if(outf) fprintf(outf,				"sp %x, *sp %c %o\n", sp, *sp, *sp);#endif			if (*sp != ' ') {				maxx = sp;				if (minx == _NOCHANGE)					minx = sp - start;				*sp = ' ';			}		}		if (minx != _NOCHANGE) {			if (win->_firstch[y] > minx			     || win->_firstch[y] == _NOCHANGE)				win->_firstch[y] = minx;			if (win->_lastch[y] < maxx - win->_y[y])				win->_lastch[y] = maxx - win->_y[y];		}# ifdef DEBUG	if(outf) fprintf(outf, "WERASE: minx %d maxx %d _firstch[%d] %d, start %x, end %x\n",		minx, maxx ? maxx-start : NULL, y, win->_firstch[y], start, end);# endif	}	win->_curx = win->_cury = 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -