Subversion Repositories planix.SVN

Compare Revisions

Ignore whitespace Rev 120 → Rev 121

/ports/trunk/editors/rvi/Makefile
31,7 → 31,7
NONDEBUGFLAGS= -O0
DEB= $(NONDEBUGFLAGS) # or $(DEBUGFLAGS) to to debug
# this should be correct for any modern Unix
OPTIONS=-DLISPCODE -DCHDIR -DFASTTAG -DUSG3TTY -DVMUNIX -DBIGMEM -D_BSD_EXTENSION -DTRACE -g -O0
OPTIONS=-DLISPCODE -DCHDIR -DFASTTAG -DUSG3TTY -DVMUNIX -DBIGMEM -D_BSD_EXTENSION -DTRACE -g -O0 -DADEBUG
# define to use ISO-8859-X character sets
#OPTIONS += -DISO
LDFLAGS=
/ports/trunk/editors/rvi/ex.c
21,6 → 21,8
char tttrace[] = { '/','d','e','v','/','t','t','y','x','x',0 };
#endif
 
#include<stdio.h>
 
#if defined (__GLIBC__) && (__GLIBC__ >= 2)
#include <malloc.h>
#endif
91,7 → 93,7
#ifndef VMUNIX
char *erpath = EXSTRINGS;
#endif
register char *cp;
const char *cp;
register int c;
bool recov = 0;
bool ivis;
191,6 → 193,7
 
#ifdef TRACE
case 'T':
printf("There was an trace\n");
if (av[0][2] == 0)
tracef = "trace";
else {
201,10 → 204,12
else
tracef[9] = 0;
}
trace = fopen(tracef, "w");
/* XXX tracef */
trace = fopen("/tmp/trace.txt", "w+a");
#define tracbuf NULL
if (trace == NULL)
printf("Trace create error\n");
fprintf(stderr,"Error creating trace file %s: %s\n",tracef,strerror(errno));
else
setbuf(trace, tracbuf);
break;
405,7 → 410,8
* Main thing here is to get a new buffer (in fileinit),
* rest is peripheral state resetting.
*/
init()
int
init(void)
{
register int i;
 
425,7 → 431,7
*/
char *
tailpath(p)
register char *p;
register char *p;
{
register char *r;
 
439,8 → 445,9
* Check ownership of file. Return nonzero if it exists and is owned by the
* user or the option sourceany is used
*/
int
iownit(file)
char *file;
char *file;
{
struct stat sb;
 
/ports/trunk/editors/rvi/ex_argv.h
13,16 → 13,16
* space. The statically allocated glob structure could be replaced
* by a dynamically allocated argument area space.
*/
var char **argv;
var char **argv0;
var char *args;
var char *args0;
const char **argv;
const char **argv0;
const char *args;
const char *args0;
var short argc;
var short argc0;
var short morargc; /* Used with "More files to edit..." */
 
var int firstln; /* From +lineno */
var char *firstpat; /* From +/pat */
const char *firstpat; /* From +/pat */
 
/* Yech... */
struct glob {
/ports/trunk/editors/rvi/ex_v.c
319,7 → 319,13
*/
setwind()
{
#ifdef ADEBUG
if (trace)
tfixnl(), fprintf(trace, "setwindw() - bastate: %d,%d,%d)\n",
bastate,basWTOP,WBOT), tvliny();
#endif
 
 
WCOLS = COLUMNS;
switch (bastate) {
 
434,6 → 440,14
{
register int b;
 
#ifdef ADEBUG
if (trace)
tfixnl(), fprintf(trace, "vsetsize(%d): size\n",
size), tvliny();
#endif
 
 
 
if (bastate != VISUAL)
return;
b = LINES - 1 - size;
441,6 → 455,8
b = LINES - 2;
if (b < 0)
b = 0;
 
//fprintf(trace,"vstesize LINES: %d, \n",LINES);
basWTOP = b;
basWLINES = WBOT - b + 1;
}
/ports/trunk/editors/rvi/ex_vadj.c
28,6 → 28,7
* on the screen in which case the line may actually end up
* somewhere other than line p.
*/
int
vopen(tp, p)
line *tp;
int p;
521,10 → 522,15
* Repaint the screen, with cursor at curs, aftern an arbitrary change.
* Handle notification on large changes.
*/
int
vrepaint(curs)
char *curs;
{
 
#ifdef ADEBUG
if (trace)
fprintf(trace, "vrepaint(%d)\n", curs);
#endif
wdot = NOLINE;
/*
* In open want to notify first.
620,11 → 626,11
bool anydl = 0;
short oldhold = hold;
 
 
#ifdef ADEBUG
if (trace)
tfixnl(), fprintf(trace, "vredraw(%d)\n", p), tvliny();
#endif
 
if (holdupd) {
holdupd = 3;
return;
818,6 → 824,7
vsync(LINE(vcline));
}
 
int
vsync(p)
register int p;
{
/ports/trunk/editors/rvi/ex_vwind.c
247,6 → 247,11
register int i = vcline + cnt;
short oldhold = hold;
 
#ifdef ADEBUG
if (trace)
tfixnl(), fprintf(trace, "vshow(%d)\n", 123), tvliny();
#endif
 
if (state != HARDOPEN && state != ONEOPEN && i >= 0 && i < vcnt) {
dot = addr;
getDOT();
/ports/trunk/editors/rvi/mach.c
22,9 → 22,10
void
enable_raw()
{
struct termios raw;
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disable_raw);
struct termios raw = orig_termios;
raw = orig_termios;
raw.c_iflag &= ~(IXON);
raw.c_lflag &= ~(ECHO | ICANON | ISIG);
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);