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

📄 wdeleteln.c

📁 minux的源代码,一个非常小的操作系统
💻 C
字号:
#include <curses.h>
#include "curspriv.h"

/****************************************************************/
/* Wdeleteln() deletes the line at the window cursor, and the	*/
/* Lines below it are shifted up, inserting a blank line at	*/
/* The bottom of the window.					*/
/****************************************************************/

int wdeleteln(win)
WINDOW *win;
{
  int *end, *temp, y, blank;

  blank = ' ' | (win->_attrs & ATR_MSK);

  temp = win->_line[win->_cury];
  for (y = win->_cury; y < win->_regbottom; y++) {
	win->_line[y] = win->_line[y + 1];
	win->_minchng[y] = 0;
	win->_maxchng[y] = win->_maxx;
  }
  win->_minchng[y] = 0;
  win->_maxchng[y] = win->_maxx;
  win->_line[win->_regbottom] = temp;
  for (end = &(temp[win->_maxx]); temp <= end;) *temp++ = blank;
  return(OK);
}

⌨️ 快捷键说明

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