Dump9660 (and mk9660). Until we either do something
intelligent with symlinks or put in a switch for things like dump9660, this is of rather limited utility under Unix.
This commit is contained in:
parent
e1dddc0532
commit
7285a491c1
20 changed files with 4375 additions and 0 deletions
39
src/cmd/9660/rune.c
Normal file
39
src/cmd/9660/rune.c
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#include <u.h>
|
||||
#include <libc.h>
|
||||
#include <bio.h>
|
||||
#include <libsec.h>
|
||||
|
||||
#include "iso9660.h"
|
||||
|
||||
Rune*
|
||||
strtorune(Rune *r, char *s)
|
||||
{
|
||||
Rune *or;
|
||||
|
||||
if(s == nil)
|
||||
return nil;
|
||||
|
||||
or = r;
|
||||
while(*s)
|
||||
s += chartorune(r++, s);
|
||||
*r = L'\0';
|
||||
return or;
|
||||
}
|
||||
|
||||
Rune*
|
||||
runechr(Rune *s, Rune c)
|
||||
{
|
||||
for(; *s; s++)
|
||||
if(*s == c)
|
||||
return s;
|
||||
return nil;
|
||||
}
|
||||
|
||||
int
|
||||
runecmp(Rune *s, Rune *t)
|
||||
{
|
||||
while(*s && *t && *s == *t)
|
||||
s++, t++;
|
||||
return *s - *t;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue