📄 winchnstr.c
字号:
/* Copyright (c) 1984 AT&T *//* All Rights Reserved *//* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T *//* The copyright notice above does not evidence any *//* actual or intended publication of such source code. */#ifndef lintstatic char sccsid[] = "@(#)winchnstr.c 1.1 92/07/30 SMI"; /* from S5R3.1 1.2 */#endif#include "curses_inc.h"/* * Read in ncols worth of data from window win and assign the * chars to string. NULL terminate string upon completion. * Return the number of chtypes copied. */winchnstr(win,string,ncols)register WINDOW *win;chtype *string;int ncols;{ register chtype *ptr = &(win->_y[win->_cury][win->_curx]); register int counter; /* * Adjust ncols if it will exceed the maximum for the * window being referenced */ if ((win->_curx + ncols) > win->_maxx) ncols = win->_maxx - win->_curx; for (counter = 0; counter < ncols; counter++) *string++ = *ptr++; *string = (chtype) 0; return (counter);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -