mirror of
https://github.com/tildeclub/ex-vi.git
synced 2026-06-24 12:49:24 +00:00
files from last release. ex-050325
This commit is contained in:
29
ex_vadj.c
29
ex_vadj.c
@@ -73,7 +73,7 @@
|
||||
|
||||
#ifndef lint
|
||||
#ifdef DOSCCS
|
||||
static char sccsid[] = "@(#)ex_vadj.c 1.16 (gritter) 8/6/05";
|
||||
static char sccsid[] = "@(#)ex_vadj.c 1.11 (gritter) 3/4/05";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -192,8 +192,7 @@ vreopen(int p, int lineno, int l)
|
||||
* necessary to determine which way to go.
|
||||
*/
|
||||
vigoto(p, 0);
|
||||
if (pline(lineno, WCOLS*WLINES) == 1)
|
||||
vp->vflags |= VLONG;
|
||||
pline(lineno);
|
||||
|
||||
/*
|
||||
* When we are typing part of a line for hardcopy open, don't
|
||||
@@ -419,14 +418,14 @@ vopenup(int cnt, int could, int l)
|
||||
void
|
||||
vadjAL(int p, int cnt)
|
||||
{
|
||||
cell **tlines = smalloc(TUBELINES * sizeof *tlines);
|
||||
cell *tlines[TUBELINES];
|
||||
register int from, to;
|
||||
|
||||
#ifdef ADEBUG
|
||||
if (trace)
|
||||
tfixnl(), fprintf(trace, "vadjal(%d, %d)\n", p, cnt);
|
||||
#endif
|
||||
copy(tlines, vtube, TUBELINES * sizeof *tlines); /*SASSIGN*/
|
||||
copy(tlines, vtube, sizeof vtube); /*SASSIGN*/
|
||||
for (from = p, to = p + cnt; to <= WECHO; from++, to++)
|
||||
vtube[to] = tlines[from];
|
||||
for (to = p; from <= WECHO; from++, to++) {
|
||||
@@ -438,7 +437,6 @@ vadjAL(int p, int cnt)
|
||||
* necessarily consistent with the rest of the display.
|
||||
*/
|
||||
vclrech(0);
|
||||
free(tlines);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -511,7 +509,7 @@ void
|
||||
vscroll(register int cnt)
|
||||
{
|
||||
register int from, to;
|
||||
cell **tlines;
|
||||
cell *tlines[TUBELINES];
|
||||
|
||||
#ifdef ADEBUG
|
||||
if (trace)
|
||||
@@ -521,8 +519,7 @@ vscroll(register int cnt)
|
||||
error(catgets(catd, 1, 219, "Internal error: vscroll"));
|
||||
if (cnt == 0)
|
||||
return;
|
||||
tlines = smalloc(TUBELINES * sizeof *tlines);
|
||||
copy(tlines, vtube, TUBELINES * sizeof *tlines);
|
||||
copy(tlines, vtube, sizeof vtube);
|
||||
for (to = ZERO, from = ZERO + cnt; to <= WECHO - cnt; to++, from++)
|
||||
vtube[to] = tlines[from];
|
||||
for (from = ZERO; to <= WECHO; to++, from++) {
|
||||
@@ -531,7 +528,6 @@ vscroll(register int cnt)
|
||||
}
|
||||
for (from = 0; from <= vcnt; from++)
|
||||
LINE(from) -= cnt;
|
||||
free(tlines);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -684,7 +680,7 @@ vredraw(register int p)
|
||||
{
|
||||
register int l;
|
||||
register line *tp;
|
||||
char *temp;
|
||||
char temp[LBSIZE];
|
||||
bool anydl = 0;
|
||||
short oldhold = hold;
|
||||
|
||||
@@ -701,7 +697,6 @@ vredraw(register int p)
|
||||
if (p < 0 /* || p > WECHO */)
|
||||
error(catgets(catd, 1, 221, "Internal error: vredraw"));
|
||||
|
||||
temp = smalloc(LBSIZE);
|
||||
/*
|
||||
* Trim the ragged edges (lines which are off the screen but
|
||||
* not yet logically discarded), save the current line, and
|
||||
@@ -795,7 +790,6 @@ vredraw(register int p)
|
||||
if (trace)
|
||||
tvliny();
|
||||
#endif
|
||||
free(temp);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -851,7 +845,7 @@ vdellin(int p, int cnt, int l)
|
||||
void
|
||||
vadjDL(int p, int cnt)
|
||||
{
|
||||
cell **tlines = smalloc(TUBELINES * sizeof *tlines);
|
||||
cell *tlines[TUBELINES];
|
||||
register int from, to;
|
||||
|
||||
#ifdef ADEBUG
|
||||
@@ -863,14 +857,13 @@ vadjDL(int p, int cnt)
|
||||
* v7 compiler (released with phototypesetter for v6)
|
||||
* can't hack it.
|
||||
*/
|
||||
copy(tlines, vtube, TUBELINES * sizeof *tlines); /*SASSIGN*/
|
||||
copy(tlines, vtube, sizeof vtube); /*SASSIGN*/
|
||||
for (from = p + cnt, to = p; from <= WECHO; from++, to++)
|
||||
vtube[to] = tlines[from];
|
||||
for (from = p; to <= WECHO; from++, to++) {
|
||||
vtube[to] = tlines[from];
|
||||
vclrcell(vtube[to], WCOLS);
|
||||
}
|
||||
free(tlines);
|
||||
}
|
||||
/*
|
||||
* Sync the screen, like redraw but more lazy and willing to leave
|
||||
@@ -903,7 +896,7 @@ void
|
||||
vsync1(register int p)
|
||||
{
|
||||
register int l;
|
||||
char *temp;
|
||||
char temp[LBSIZE];
|
||||
register struct vlinfo *vp = &vlinfo[0];
|
||||
short oldhold = hold;
|
||||
|
||||
@@ -918,7 +911,6 @@ vsync1(register int p)
|
||||
}
|
||||
if (state == HARDOPEN || splitw)
|
||||
return;
|
||||
temp = smalloc(LBSIZE);
|
||||
vscrap();
|
||||
CP(temp, linebuf);
|
||||
if (vcnt == 0)
|
||||
@@ -968,7 +960,6 @@ vsync1(register int p)
|
||||
hold = oldhold;
|
||||
if (heldech)
|
||||
vclrech(0);
|
||||
free(temp);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user