mirror of
https://github.com/tildeclub/ex-vi.git
synced 2026-06-25 05:09:23 +00:00
files from last release. ex-050325
This commit is contained in:
57
ex_put.c
57
ex_put.c
@@ -73,7 +73,7 @@
|
||||
|
||||
#ifndef lint
|
||||
#ifdef DOSCCS
|
||||
static char sccsid[] = "@(#)ex_put.c 1.35 (gritter) 12/25/06";
|
||||
static char sccsid[] = "@(#)ex_put.c 1.32 (gritter) 2/17/05";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -101,7 +101,7 @@ static char sccsid[] = "@(#)ex_put.c 1.35 (gritter) 12/25/06";
|
||||
*/
|
||||
int (*Outchar)(int) = termchar;
|
||||
int (*Putchar)(int) = normchar;
|
||||
int (*Pline)(int, int) = normline;
|
||||
void (*Pline)(int) = normline;
|
||||
|
||||
int (*
|
||||
setlist(int t))(int)
|
||||
@@ -114,10 +114,10 @@ setlist(int t))(int)
|
||||
return (P);
|
||||
}
|
||||
|
||||
int (*
|
||||
setnumb(int t))(int, int)
|
||||
void (*
|
||||
setnumb(int t))(int)
|
||||
{
|
||||
register int (*P)(int, int);
|
||||
register void (*P)(int);
|
||||
|
||||
numberf = t;
|
||||
P = Pline;
|
||||
@@ -272,68 +272,41 @@ slobber(int c)
|
||||
/*
|
||||
* Print a line with a number.
|
||||
*/
|
||||
int
|
||||
numbline(int i, int max)
|
||||
void
|
||||
numbline(int i)
|
||||
{
|
||||
|
||||
if (shudclob)
|
||||
slobber(' ');
|
||||
max -= printf("%6d ", i);
|
||||
return normline(0, max);
|
||||
printf("%6d ", i);
|
||||
normline(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Normal line output, no numbering.
|
||||
*/
|
||||
int
|
||||
normline(int unused, int max)
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
normline(int unused)
|
||||
{
|
||||
extern short vcntcol, lastsc;
|
||||
short ovc = -1;
|
||||
register char *cp;
|
||||
int (*OO)(int);
|
||||
int c, n;
|
||||
int ret = 0;
|
||||
|
||||
if (max > 0)
|
||||
vcntcol = 0;
|
||||
if (shudclob)
|
||||
slobber(linebuf[0]);
|
||||
/* pdp-11 doprnt is not reentrant so can't use "printf" here
|
||||
in case we are tracing */
|
||||
cp = linebuf;
|
||||
vcolbp = cp;
|
||||
while (*cp && max) {
|
||||
while (*cp) {
|
||||
vcolbp = cp;
|
||||
nextc(c, cp, n);
|
||||
cp += n;
|
||||
if (max > 0) {
|
||||
if (Outchar != qcount) {
|
||||
OO = Outchar;
|
||||
Outchar = qcount;
|
||||
putchar(c);
|
||||
Outchar = OO;
|
||||
} else
|
||||
putchar(c);
|
||||
if ((vcntcol-1) % WCOLS == 0 && lastsc > 1)
|
||||
vcntcol++;
|
||||
if (vcntcol >= max) {
|
||||
putchar('@');
|
||||
vcntcol = ovc + 1;
|
||||
lastsc = 1;
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
ovc = vcntcol;
|
||||
if (Outchar != qcount)
|
||||
putchar(c);
|
||||
} else
|
||||
putchar(c);
|
||||
putchar(c);
|
||||
}
|
||||
if (!inopen) {
|
||||
putchar('\n' | QUOTE);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1054,7 +1027,7 @@ setoutt(void)
|
||||
void
|
||||
vlprintf(char *cp, va_list ap)
|
||||
{
|
||||
register int (*P)(int);
|
||||
register int (*P)();
|
||||
|
||||
P = setlist(1);
|
||||
vprintf(cp, ap);
|
||||
|
||||
Reference in New Issue
Block a user