Placate the Sun monster.
This commit is contained in:
parent
13afc7e57c
commit
5241ed2bc2
4 changed files with 26 additions and 6 deletions
|
|
@ -201,7 +201,7 @@ main(int argc, char **argv)
|
||||||
checknames(&iroot, isbadiso9660);
|
checknames(&iroot, isbadiso9660);
|
||||||
convertnames(&iroot, struprcpy);
|
convertnames(&iroot, struprcpy);
|
||||||
} else
|
} else
|
||||||
convertnames(&iroot, (void *) strcpy);
|
convertnames(&iroot, (char* (*)(char*, char*))strcpy);
|
||||||
|
|
||||||
// isoabstract = findconform(&iroot, abstract);
|
// isoabstract = findconform(&iroot, abstract);
|
||||||
// isobiblio = findconform(&iroot, biblio);
|
// isobiblio = findconform(&iroot, biblio);
|
||||||
|
|
@ -215,7 +215,7 @@ main(int argc, char **argv)
|
||||||
// jnotice = findconform(&jroot, notice);
|
// jnotice = findconform(&jroot, notice);
|
||||||
|
|
||||||
checknames(&jroot, isbadjoliet);
|
checknames(&jroot, isbadjoliet);
|
||||||
convertnames(&jroot, (void *) strcpy);
|
convertnames(&jroot, (char* (*)(char*, char*))strcpy);
|
||||||
dsort(&jroot, jolietcmp);
|
dsort(&jroot, jolietcmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -301,14 +301,14 @@ Dofix:
|
||||||
* Write dump tree at end. We assume the name characters
|
* Write dump tree at end. We assume the name characters
|
||||||
* are all conforming, so everything is already sorted properly.
|
* are all conforming, so everything is already sorted properly.
|
||||||
*/
|
*/
|
||||||
convertnames(&idumproot, (info.flags & CDconform) ? (void *) struprcpy : (void *) strcpy);
|
convertnames(&idumproot, (info.flags & CDconform) ? struprcpy : (char* (*)(char*, char*)) strcpy);
|
||||||
if(cd->nulldump) {
|
if(cd->nulldump) {
|
||||||
r = walkdirec(&idumproot, dumpname);
|
r = walkdirec(&idumproot, dumpname);
|
||||||
assert(r != nil);
|
assert(r != nil);
|
||||||
copybutname(r, &iroot);
|
copybutname(r, &iroot);
|
||||||
}
|
}
|
||||||
if(cd->flags & CDjoliet) {
|
if(cd->flags & CDjoliet) {
|
||||||
convertnames(&jdumproot, (void *) strcpy);
|
convertnames(&jdumproot, (char* (*)(char*, char*))strcpy);
|
||||||
if(cd->nulldump) {
|
if(cd->nulldump) {
|
||||||
r = walkdirec(&jdumproot, dumpname);
|
r = walkdirec(&jdumproot, dumpname);
|
||||||
assert(r != nil);
|
assert(r != nil);
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ dirtoxdir(XDir *xd, Dir *d)
|
||||||
//xd->symlink = atom(d->symlink);
|
//xd->symlink = atom(d->symlink);
|
||||||
xd->symlink = atom("symlink"); // XXX: rsc
|
xd->symlink = atom("symlink"); // XXX: rsc
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
fdtruncate(int fd, ulong size)
|
fdtruncate(int fd, ulong size)
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ isecho(int fd)
|
||||||
if(debug) fprint(2, "israw %c%c\n",
|
if(debug) fprint(2, "israw %c%c\n",
|
||||||
ttmode.c_lflag&ICANON ? 'c' : '-',
|
ttmode.c_lflag&ICANON ? 'c' : '-',
|
||||||
ttmode.c_lflag&ECHO ? 'e' : '-');
|
ttmode.c_lflag&ECHO ? 'e' : '-');
|
||||||
return (ttmode.c_lflag&(ICANON|ECHO));
|
return (ttmode.c_lflag&ICANON && ttmode.c_lflags&ECHO);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,9 @@ enum
|
||||||
Isprefix= 16,
|
Isprefix= 16,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// XXX: manually initialize once to placate the Sun monster
|
||||||
|
uchar prefixvals[256];
|
||||||
|
#ifdef NOTDEF
|
||||||
uchar prefixvals[256] =
|
uchar prefixvals[256] =
|
||||||
{
|
{
|
||||||
[0x00] 0 | Isprefix,
|
[0x00] 0 | Isprefix,
|
||||||
|
|
@ -19,6 +22,7 @@ uchar prefixvals[256] =
|
||||||
[0xFE] 7 | Isprefix,
|
[0xFE] 7 | Isprefix,
|
||||||
[0xFF] 8 | Isprefix,
|
[0xFF] 8 | Isprefix,
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
eipfmt(Fmt *f)
|
eipfmt(Fmt *f)
|
||||||
|
|
@ -31,6 +35,22 @@ eipfmt(Fmt *f)
|
||||||
ushort s;
|
ushort s;
|
||||||
int i, j, n, eln, eli;
|
int i, j, n, eln, eli;
|
||||||
|
|
||||||
|
static int once = 0; // XXX: placate the Sun monster
|
||||||
|
|
||||||
|
if(!once){
|
||||||
|
once = 1;
|
||||||
|
memset(prefixvals, 0, sizeof(prefixvals));
|
||||||
|
prefixvals[0x00] = 0 | Isprefix;
|
||||||
|
prefixvals[0x80] = 1 | Isprefix;
|
||||||
|
prefixvals[0xC0] = 2 | Isprefix;
|
||||||
|
prefixvals[0xE0] = 3 | Isprefix;
|
||||||
|
prefixvals[0xF0] = 4 | Isprefix;
|
||||||
|
prefixvals[0xF8] = 5 | Isprefix;
|
||||||
|
prefixvals[0xFC] = 6 | Isprefix;
|
||||||
|
prefixvals[0xFE] = 7 | Isprefix;
|
||||||
|
prefixvals[0xFF] = 8 | Isprefix;
|
||||||
|
}
|
||||||
|
|
||||||
switch(f->r) {
|
switch(f->r) {
|
||||||
case 'E': /* Ethernet address */
|
case 'E': /* Ethernet address */
|
||||||
p = va_arg(f->args, uchar*);
|
p = va_arg(f->args, uchar*);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue