_scrollf.c

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· C语言 代码 · 共 40 行

C
40
字号
#ifdef lintstatic char *sccsid = "@(#)_scrollf.c	4.1	(ULTRIX)	7/2/90";#endif lint#include "curses.ext"extern	int	_outch();/* * Scroll the terminal forward n lines, bringing up blank lines from bottom. * This only affects the current scrolling region. */_scrollf(n)int n;{	register int i;	if( scroll_forward )	{		_setwind();		_pos( SP->des_bot_mgn, 0 );		for( i=0; i<n; i++ )		{			tputs(scroll_forward, 1, _outch);		}		SP->ml_above += n;		if( SP->ml_above + lines > lines_of_memory )		{			SP->ml_above = lines_of_memory - lines;		}	}	else	{		/* If terminal can't do it, try delete line. */		_pos(0, 0);		_dellines(n);	}}

⌨️ 快捷键说明

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