make things work on SunOS
This commit is contained in:
parent
e637c944fe
commit
a0f1e21ff9
19 changed files with 43 additions and 20 deletions
|
|
@ -60,14 +60,14 @@ updatewinsize(int row, int col, int dx, int dy)
|
|||
static struct termios ttmode;
|
||||
|
||||
int
|
||||
israw(int fd)
|
||||
isecho(int fd)
|
||||
{
|
||||
if(tcgetattr(fd, &ttmode) < 0)
|
||||
fprint(2, "tcgetattr: %r\n");
|
||||
if(debug) fprint(2, "israw %c%c\n",
|
||||
ttmode.c_lflag&ICANON ? 'c' : '-',
|
||||
ttmode.c_lflag&ECHO ? 'e' : '-');
|
||||
return !(ttmode.c_lflag&(ICANON|ECHO));
|
||||
return (ttmode.c_lflag&(ICANON|ECHO));
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ initfsize(void)
|
|||
fsize['s'] = 4;
|
||||
fsize['u'] = 2;
|
||||
fsize['x'] = 2;
|
||||
};
|
||||
}
|
||||
|
||||
int
|
||||
fmtsize(Value *v)
|
||||
|
|
@ -1021,7 +1021,7 @@ initexpop(void)
|
|||
expop[OFMT] = ofmt;
|
||||
expop[OEVAL] = oeval;
|
||||
expop[OWHAT] = owhat;
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
initexpr(void)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ initcmap(void)
|
|||
cmap['v']= '\v'+1;
|
||||
cmap['\\']= '\\'+1;
|
||||
cmap['"']= '"'+1;
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
kinit(void)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ initbinop(void)
|
|||
binop[OCAND]= "&&";
|
||||
binop[OCOR]= "||";
|
||||
binop[OASGN]= " = ";
|
||||
};
|
||||
}
|
||||
|
||||
static char *tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
|
||||
char *typenames[] = {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ LIB=lib/libbzip2.a
|
|||
SHORTLIB=bio 9
|
||||
<$PLAN9/src/mkmany
|
||||
|
||||
CFLAGS=$CFLAGS -p -DPLAN9 -Ilib
|
||||
CFLAGS=$CFLAGS -DPLAN9 -Ilib
|
||||
|
||||
test:V: $O.bzip2 $O.bunzip2
|
||||
./$O.bzip2 -1 < sample1.ref > sample1.rb2
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
#include "defs.h"
|
||||
#include "fns.h"
|
||||
|
||||
#define ptrace dbptrace
|
||||
|
||||
extern int infile;
|
||||
extern int outfile;
|
||||
extern int maxpos;
|
||||
|
|
|
|||
|
|
@ -697,6 +697,8 @@ notifyf(void *a, char *s)
|
|||
noted(NDFLT);
|
||||
rescue();
|
||||
}
|
||||
if(strstr(s, "child"))
|
||||
noted(NCONT);
|
||||
fprint(2, "ed: note: %s\n", s);
|
||||
abort();
|
||||
}
|
||||
|
|
@ -928,7 +930,8 @@ callunix(void)
|
|||
*p = 0;
|
||||
pid = fork();
|
||||
if(pid == 0) {
|
||||
execl("/bin/rc", "rc", "-c", buf, 0);
|
||||
execlp("rc", "rc", "-c", buf, 0);
|
||||
sysfatal("exec failed: %r");
|
||||
exits("execl failed");
|
||||
}
|
||||
waiting = 1;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ enum
|
|||
GZOSACORN = 13, /* Acorn RISCOS */
|
||||
GZOSUNK = 255,
|
||||
|
||||
GZCRCPOLY = 0xedb88320UL,
|
||||
#define GZCRCPOLY 0xedb88320
|
||||
/* GZCRCPOLY = 0xedb88320UL, */
|
||||
|
||||
GZOSINFERNO = GZOSUNIX,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ enum
|
|||
ZTrailInfo = 1 << 3, /* uncsize, csize, and crc are in trailer */
|
||||
ZCompPatch = 1 << 5, /* compression patched data */
|
||||
|
||||
ZCrcPoly = 0xedb88320,
|
||||
/* ZCrcPoly = 0xedb88320, */
|
||||
#define ZCrcPoly 0xedb88320
|
||||
|
||||
/*
|
||||
* compression method
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@ extern struct penvir {
|
|||
double grade;
|
||||
int pgap;
|
||||
double pslant;
|
||||
int pmode, foregr, backgr;
|
||||
int pmode;
|
||||
ulong foregr;
|
||||
ulong backgr;
|
||||
} *e0, *e1, *esave;
|
||||
#define RADIAN 57.3 /* radians per degree */
|
||||
struct seg {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue