Subversion Repositories planix.SVN

Compare Revisions

Ignore whitespace Rev 106 → Rev 107

/ports/trunk/editors/rvi/Makefile
31,7 → 31,7
NONDEBUGFLAGS= -O
DEB= $(NONDEBUGFLAGS) # or $(DEBUGFLAGS) to to debug
# this should be correct for any modern Unix
OPTIONS=-DLISPCODE -DCHDIR -DFASTTAG -DVFORK -DUSG3TTY -DVMUNIX -DBIGMEM -D_BSD_EXTENSION
OPTIONS=-DLISPCODE -DCHDIR -DFASTTAG -DVFORK -DUSG3TTY -DVMUNIX -DBIGMEM -D_BSD_EXTENSION -DTRACE
# define to use ISO-8859-X character sets
#OPTIONS += -DISO
LDFLAGS=
45,8 → 45,8
ex_data.o ex_extern.o ex_get.o ex_io.o ex_put.o ex_re.o \
ex_set.o ex_subr.o ex_tagio.o ex_temp.o ex_tty.o ex_unix.o \
ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voper.o \
ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \
printf.o
ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o
 
HDRS= ex.h ex_argv.h ex_re.h ex_temp.h ex_tty.h ex_tune.h ex_vars.h ex_vis.h
SRC1= ex.c ex_addr.c ex_cmds.c ex_cmds2.c ex_cmdsub.c
SRC2= ex_data.c ex_get.c ex_io.c ex_put.c ex_re.c
58,7 → 58,6
all: ex
 
ex: $(OBJS)
cd termcap && make
$(CC) -o ex $(LDFLAGS) $(OBJS) $(TERMLIB)
 
$(OBJS): $(HDRS)
/ports/trunk/editors/rvi/ex.h
434,6 → 434,9
int vshftop();
int yank();
 
int tgets(char *, int cnt, int fd);
 
 
/*
* C doesn't have a (void) cast, so we have to fake it for lint's sake.
*/
/ports/trunk/editors/rvi/ex_cmdsub.c
558,10 → 558,10
tseek(iof, mid);
if (mid > 0) /* to get first tag in file to work */
/* scan to next \n */
if(tgets(linebuf, sizeof linebuf, iof)==NULL)
if(tgets(linebuf, sizeof linebuf, iof)==0)
goto goleft;
/* get the line itself */
if(tgets(linebuf, sizeof linebuf, iof)==NULL)
if(tgets(linebuf, sizeof linebuf, iof)==0)
goto goleft;
#ifdef TDEBUG
printf("tag: %o %o %o %s\n", bot, mid, top, linebuf);
/ports/trunk/editors/rvi/ex_tagio.c
12,7 → 12,9
static char *sccsid = "@(#)ex_tagio.c 7.3 (Berkeley) 1/31/86";
#endif
 
#include <sys/file.h>
#include <fcntl.h>
#include <stdio.h>
 
#include "ex.h"
 
static long offset = -1;
36,7 → 38,8
return(-1);
}
ibuf = buf;
b_size = statb.st_blksize;
/* b_size = statb.st_blksize;*/
bsize = MAXBSIZE;
return(fd);
}
 
51,7 → 54,7
if (nblock == block)
return(0);
block = nblock;
if (lseek(fd, nblock, L_SET) < 0)
if (lseek(fd, nblock, SEEK_SET) < 0)
return(-1);
if ((bcnt = read(fd, ibuf, b_size)) < 0)
return(-1);
69,12 → 72,12
cc = offset;
if (cc == -1) {
if ((bcnt = read(fd, ibuf, b_size)) <= 0)
return (NULL);
return 0;
cc = 0;
block = 0;
}
if (bcnt == 0) /* EOF */
return(NULL);
return 0;
cp = ibuf + cc;
while (--cnt > 0) {
if (++cc > bcnt) {
81,7 → 84,7
block += b_size;
if ((bcnt = read(fd, ibuf, b_size)) <= 0) {
offset = cc;
return (NULL);
return 0;
}
cp = ibuf;
cc = 1;
89,9 → 92,9
if ((*buf++ = *cp++) == '\n')
break;
}
*--buf = NULL;
*--buf = 0;
offset = cc;
return(1);
return 1;
}
 
tclose(fd)
/ports/trunk/editors/rvi/ex_tty.c
21,7 → 21,7
 
gettmode()
{
 
/*a XXX
#ifndef USG3TTY
if (gtty(1, &tty) < 0)
return;
34,13 → 34,13
#else
if (ioctl(1, TCGETA, &tty) < 0)
return;
if (o_speed != (tty.c_cflag & CBAUD)) /* mjm */
if (o_speed != (tty.c_cflag & CBAUD)) // mjm
value(SLOWOPEN) = (tty.c_cflag & CBAUD) < B1200;
o_speed = tty.c_cflag & CBAUD;
normf = tty;
GT = (tty.c_oflag & TABDLY) != TAB3 && !XT;
NONL = (tty.c_oflag & ONLCR) == 0;
#endif
#endif */
}
 
char *xPC;
154,7 → 154,8
 
setsize()
{
register int l, i;
/* XXX register int l, i;
struct winsize win;
 
if (ioctl(0, TIOCGWINSZ, &win) < 0) {
173,7 → 174,7
LINES = TUBELINES;
l = LINES;
if (o_speed < B1200)
l = 9; /* including the message line at the bottom */
l = 9; // including the message line at the bottom
else if (o_speed < B2400)
l = 17;
if (l > LINES)
185,6 → 186,7
options[SCROLL].ovalue = options[SCROLL].odefault = HC ? 11 : ((l-1) / 2);
if (i <= 0)
LINES = 2;
*/
}
 
zap()
/ports/trunk/editors/rvi/ex_unix.c
279,7 → 279,7
if (mode & 1) {
if(FIXUNDO)
undap1 = undap2 = addr2+1;
if (fstat(io, &statb) < 0)
/* XXX if (fstat(io, &statb) < 0)
bsize = LBSIZE;
else {
bsize = statb.st_blksize;
286,6 → 286,9
if (bsize <= 0)
bsize = LBSIZE;
}
*/
bsize = LBSIZE;
 
ignore(append(getfile, addr2));
#ifdef TRACE
if (trace)
/ports/trunk/editors/rvi/ex_v.c
86,7 → 86,7
inopen = 0;
addr1 = addr2 = dot;
}
(void)signal(SIGWINCH, winch);
/* XXX (void)signal(SIGWINCH, winch); */
ovbeg();
if (peekchar() == '/') {
ignore(compile(getchar(), 1));
143,7 → 143,7
vclean();
Command = "open";
ovend(f);
(void)signal(SIGWINCH, SIG_DFL);
/* XXX (void)signal(SIGWINCH, SIG_DFL); */
}
 
ovbeg()
222,7 → 222,7
inopen = 0;
addr1 = addr2 = dot;
}
(void)signal(SIGWINCH, winch);
/* XXX (void)signal(SIGWINCH, winch); */
ovbeg();
bastate = VISUAL;
c = 0;
245,7 → 245,7
vmain();
Command = "visual";
ovend(f);
(void)signal(SIGWINCH, SIG_DFL);
/*XXX (void)signal(SIGWINCH, SIG_DFL); */
}
 
/*
405,6 → 405,7
}
 
#ifdef CBREAK
void
vintr()
{
extern jmp_buf readbuf;
/ports/trunk/editors/rvi/ex_vget.c
629,8 → 629,8
*/
fastpeekkey()
{
int trapalarm();
int (*Oint)();
void trapalarm();
void (*Oint)();
register int c;
 
/*
681,6 → 681,7
return(c);
}
 
void
trapalarm() {
alarm(0);
if (vcatch)
/ports/trunk/editors/rvi/ex_vops.c
656,7 → 656,7
 
if (value(SLOWOPEN) || value(REDRAW) && AL && DL)
cnt = 1;
oldmask = sigblock(sigmask(SIGWINCH));
/* XXX oldmask = sigblock(sigmask(SIGWINCH)); */
vsave();
setLAST();
if (value(AUTOINDENT))
/ports/trunk/editors/rvi/ex_vops2.c
226,7 → 226,7
*/
gobblebl = 0;
 
oldmask = sigblock(sigmask(SIGWINCH));
/* XXX oldmask = sigblock(sigmask(SIGWINCH)); */
/*
* Text gathering loop.
* New text goes into genbuf starting at gcursor.