Subversion Repositories planix.SVN

Compare Revisions

Ignore whitespace Rev 118 → Rev 119

/ports/trunk/editors/rvi/ex.c
10,7 → 10,7
All rights reserved.\n";
 
static char *sccsid = "@(#)ex.c 7.5.1.1 (Berkeley) 8/12/86";
#endif not lint
#endif /*not lint*/
 
#include "ex.h"
#include "ex_argv.h"
85,8 → 85,8
* for vi we actually force an early visual command.
*/
main(ac, av)
register int ac;
register char *av[];
int ac;
const char *av[];
{
#ifndef VMUNIX
char *erpath = EXSTRINGS;
/ports/trunk/editors/rvi/ex_put.c
1124,7 → 1124,7
gTTY(i)
int i;
{
/*
/* XXX
#ifndef USG3TTY
ignore(gtty(i, &tty));
# ifdef TIOCGETC
/ports/trunk/editors/rvi/ex_set.c
160,7 → 160,8
eol();
}
 
setend()
int
setend(void)
{
return (iswhite(peekchar()) || endcmd(peekchar()));
}
/ports/trunk/editors/rvi/ex_subr.c
207,10 → 207,11
comment();
}
 
 
int
iswhite(c)
int c;
{
 
return (c == ' ' || c == '\t');
}
 
/ports/trunk/editors/rvi/ex_tty.c
157,8 → 157,14
 
setsize()
{
/* XXX register int l, i;
int i,l;
 
get_size(&COLUMNS,&LINES);
 
i = LINES;
printf ("We have before %d x %d tube: %d\n",COLUMNS,LINES,TUBELINES);
 
/* register int l, i;
struct winsize win;
 
if (ioctl(0, TIOCGWINSZ, &win) < 0) {
171,6 → 177,10
if ((COLUMNS = winsz.ws_col = win.ws_col) == 0)
COLUMNS = tgetnum("co");
}
*/
 
 
 
if (LINES <= 5)
LINES = 24;
if (LINES > TUBELINES)
189,7 → 199,9
options[SCROLL].ovalue = options[SCROLL].odefault = HC ? 11 : ((l-1) / 2);
if (i <= 0)
LINES = 2;
*/
 
 
printf ("We have now %d x %d\n",COLUMNS,LINES);
}
 
zap()
/ports/trunk/editors/rvi/ex_vadj.c
620,6 → 620,7
bool anydl = 0;
short oldhold = hold;
 
 
#ifdef ADEBUG
if (trace)
tfixnl(), fprintf(trace, "vredraw(%d)\n", p), tvliny();
/ports/trunk/editors/rvi/mach.c
29,3 → 29,36
raw.c_lflag &= ~(ECHO | ICANON | ISIG);
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}
 
#include <stdio.h>
 
 
void
get_size(short *columns, short *lines)
{
struct winsize win;
int x,y;
if (ioctl(0, TIOCGWINSZ, &win) < 0) {
*lines = tgetnum("li");
*columns = tgetnum("co");
return;
}
 
*lines = win.ws_row;
*columns = win.ws_col;
 
 
printf("Here is the terminal size: %d x %d\n", *columns, *lines );
/*
else {
if ((LINES = winsz.ws_row = win.ws_row) == 0)
LINES = tgetnum("li");
i = LINES;
if ((COLUMNS = winsz.ws_col = win.ws_col) == 0)
COLUMNS = tgetnum("co");
}
*/
 
}