📄 pnoutrfrsh.c
字号:
#ifndef lintstatic char *sccsid = "@(#)pnoutrfrsh.c 4.2 (ULTRIX) 11/15/90";#endif lint/************************************************************************ * * * Copyright (c) Digital Equipment Corporation, 1988, 1990 * * * * All Rights Reserved. Unpublished rights reserved under the * * copyright laws of the United States. * * * * The software contained on this media is proprietary to and * * embodies the confidential technology of Digital Equipment * * Corporation. Possession, use, duplication or dissemination of * * the software and media is authorized only pursuant to a valid * * written license from Digital Equipment Corporation. * * * * RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure by * * the U.S. Government is subject to restrictions as set forth in * * Subparagraph (c)(1)(ii) of DFARS 252.227-7013, or in FAR * * 52.227-19, as applicable. * * * * This software is derived from software received from the * * University of California, Berkeley, and from Bell * * Laboratories. Use, duplication, or disclosure is subject to * * restrictions under license agreements with University of * * California and with AT&T. * * * ************************************************************************//**//* * make the current screen look like "win" over the area covered by * win. * *//* @(#) pnoutrfrsh.c: 1.1 10/15/83 (1.14 3/6/83) *//* * Modification History * * 10/03/90 GWS reset screen cursor position to current pad cursor * position + screen coordinates */#include "curses.ext"extern WINDOW *lwin;/* Put out pad but don't actually update screen. */pnoutrefresh(pad, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol)register WINDOW *pad;int pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol;{ register int pr, r, c; register chtype *nsp, *lch;# ifdef DEBUG if(outf) fprintf(outf, "PREFRESH(pad %x, pcorner %d,%d, smin %d,%d, smax %d,%d)", pad, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol); _dumpwin(pad); if(outf) fprintf(outf, "PREFRESH:\n\tfirstch\tlastch\n");# endif /* Make sure everything fits */ if (pminrow < 0) pminrow = 0; if (pmincol < 0) pmincol = 0; if (sminrow < 0) sminrow = 0; if (smincol < 0) smincol = 0; if (smaxrow >= lines) smaxrow = lines-1; if (smaxcol >= columns) smaxcol = columns-1; if (smaxrow - sminrow > pad->_maxy - pminrow) smaxrow = sminrow + (pad->_maxy - pminrow); /* Copy it out, like a refresh, but appropriately offset */ for (pr=pminrow,r=sminrow; r <= smaxrow; r++,pr++) { /* No record of what previous loc looked like, so do it all */ lch = &pad->_y[pr][pad->_maxx-1]; nsp = &pad->_y[pr][pmincol]; _ll_move(r, smincol); for (c=smincol; nsp<=lch; c++) { if (SP->virt_x++ < columns && c <= smaxcol) *SP->curptr++ = *nsp++; else break; } pad->_firstch[pr] = _NOCHANGE; } _ll_move(sminrow + pad->_cury, smincol + pad->_curx); lwin = pad; return OK;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -