vfuncs.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1985 AT&T
* All Rights Reserved
*/
#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.10 */
#include <stdio.h>
#include <curses.h>
#include "wish.h"
#include "token.h"
#include "ctl.h"
#include "winp.h"
#include "fmacs.h"
#include "terror.h"
#include "vtdefs.h"
extern void acsputstring();
int num;
{
register int i;
if (Buffoffset == 0) {
setarrows();
return(FALSE); /* top of file */
}
}
/*
* first, store bottom lines
*/
Buffoffset -= pagebytes;
/*
* second, push displayed lines off the bottom
*/
fgo(0, 0);
/*
* thirdly, put buffered text at the top
*/
fgo(i, 0);
}
/*
* finally, adjust cursor so that is points to the same character
* that it did before the scroll (if possible)
*
* Also, update the scroll indicator before returning TRUE
*/
setarrows();
return(TRUE);
}
int num;
{
register int i;
register unsigned fieldoffset;
{
setarrows(); /* at the end of the scroll buffer */
return(FALSE);
}
/*
* first, synchronize the scroll buffer with the window
*/
Buffoffset += pagebytes;
/*
* secondly, delete displayed lines form the top of the field
*/
fgo(0, 0);
/*
* thirdly, display buffered text at the bottom of the field
*/
for (i = 0; i < pagelines; i++) {
/*
* If you are at the end of the scroll buffer then,
* if there is more text (Valptr != NULL), display
* it on the screen.
*/
if (fieldoffset >= Bufflast) {
if (Valptr)
break;
}
fieldoffset += LINEBYTES;
}
/*
* finally, adjust cursor so that is points to the same character
* that it did before the scroll (if possible)
*
* Also, update the scroll indicator before returning TRUE
*/
saverow = 0;
setarrows();
return(TRUE);
}
int num;
{
if (Buffoffset == 0) {
/*
* if at top of the buffer then update scroll arrows
* and return FALSE
*/
setarrows();
return(FALSE);
}
/*
* first sync buffer to the visible contents of the field
*/
syncbuf(Buffoffset, 0, 0);
Buffoffset -= pagechars;
/*
* next, shift visible window
*/
fgo(0, 0);
fclearline();
fgo(0, 0);
/*
* finally, adjust cursor so that is points to the same character
* that it did before the scroll (if possible)
*
* Also, update the scroll indicator before returning TRUE
*/
setarrows();
return(TRUE);
}
int num;
bool just_synced; /* for performance. abs f15 */
{
register unsigned fieldoffset;
/*
* if you are at the end of the "used" part of the buffer
* (Bufflast), simply update the scroll indicator and
* return FALSE
*/
{
setarrows();
return(FALSE);
}
/*
* First sync the field buffer to the visible contents of the field ...
* unless it was done just before calling this function ...
* Secondly, bump the buffer offset by pagechars (growing the buffer if
* necessary)
*/
syncbuf(Buffoffset, 0, 0);
Buffoffset += pagechars;
/*
* Next, shift the visible window
*/
fgo(0, 0);
fclearline();
fgo(0, 0);
/*
* Finally, adjust cursor so that is points to the same character
* that it did before the scroll (if possible)
*
* Also, update the scroll indicator before returning TRUE
*/
savecol = 0;
setarrows();
return(TRUE);
}