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

📄 _blanks.c

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 C
字号:
#ifdef lintstatic char *sccsid = "@(#)_blanks.c	4.1	(ULTRIX)	7/2/90";#endif lint#include "curses.ext"extern	int	_outch();extern	int	_sethl();extern	int	_setmode();extern	char	*tparm();extern	int	tputs();/* * Output n blanks, or the equivalent.  This is done to erase text, and * also to insert blanks.  The semantics of this call do not define where * it leaves the cursor - it might be where it was before, or it might * be at the end of the blanks.  We will, of course, leave SP->phys_x * properly updated. */_blanks (n){#ifdef DEBUG	if(outf) fprintf(outf, "_blanks(%d).\n", n);#endif	if (n == 0)		return;	_setmode ();	_sethl ();	if (SP->virt_irm==1 && parm_ich) {		if (n == 1)			tputs(insert_character, 1, _outch);		else			tputs(tparm(parm_ich, n), n, _outch);		return;	}	if (erase_chars && SP->phys_irm != 1 && n > 5) {		tputs(tparm(erase_chars, n), n, _outch);		return;	}	if (repeat_char && SP->phys_irm != 1 && n > 5) {		tputs(tparm(repeat_char, ' ', n), n, _outch);		SP->phys_x += n;		return;	}	while (--n >= 0) {		if (SP->phys_irm == 1 && insert_character)			tputs (insert_character, columns - SP->phys_x, _outch);		if (++SP->phys_x >= columns && auto_right_margin) {			if (SP->phys_y >= lines-1) {				/*				 * We attempted to put something in the last				 * position of the last line.  Since this will				 * cause a scroll (we only get here if the				 * terminal has auto_right_margin) we refuse				 * to put it out.				 */				SP->phys_x--;				return;			}			SP->phys_x = 0;			SP->phys_y++;		}		_outch (' ');		if (SP->phys_irm == 1 && insert_padding)			tputs (insert_padding, 1, _outch);	}}

⌨️ 快捷键说明

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