* The Regents of the University of California. All rights reserved.
* This code is derived from software contributed to Berkeley
* by Pace Willisson (pace@blitz.com). The Rock Ridge Extension
* Support code is derived from software contributed to Berkeley
* by Atsushi Murai (amurai@spec.co.jp).
* %sccs.include.redist.c%
* @(#)cd9660_util.c 8.2 (Berkeley) %G%
#include <sys/resourcevar.h>
#include <miscfs/specfs/specdev.h> /* XXX */
#include <miscfs/fifofs/fifo.h> /* XXX */
#include <isofs/cd9660/iso.h>
/* little endian short */
#if BYTE_ORDER != LITTLE_ENDIAN
printf ("isonum_721 called on non little-endian machine!\n");
#if BYTE_ORDER != BIG_ENDIAN
printf ("isonum_722 called on non big-endian machine!\n");
#if BYTE_ORDER == BIG_ENDIAN
return isonum_722 (p
+ 2);
#elif BYTE_ORDER == LITTLE_ENDIAN
printf ("isonum_723 unsupported byte order!\n");
#if BYTE_ORDER != LITTLE_ENDIAN
printf ("isonum_731 called on non little-endian machine!\n");
#if BYTE_ORDER != BIG_ENDIAN
printf ("isonum_732 called on non big-endian machine!\n");
#if BYTE_ORDER == BIG_ENDIAN
return isonum_732 (p
+ 4);
#elif BYTE_ORDER == LITTLE_ENDIAN
printf ("isonum_733 unsupported byte order!\n");
#endif /* __notanymore__ */
* translate and compare a filename
* Note: Version number plus ';' may be omitted.
isofncmp(unsigned char *fn
,int fnlen
,unsigned char *isofn
,int isolen
)
if ((c
= *isofn
++) == ';') {
for (i
= 0; --fnlen
>= 0; i
= i
* 10 + *fn
++ - '0') {
if (*fn
< '0' || *fn
> '9') {
for (j
= 0; --isolen
>= 0; j
= j
* 10 + *isofn
++ - '0');
if (c
>= 'A' && c
<= 'Z') {
if (c
+ ('a' - 'A') != *fn
) {
if (*fn
>= 'a' && *fn
<= 'z')
return *fn
- ('a' - 'A') - c
;
isofntrans(unsigned char *infn
,int infnlen
,
unsigned char *outfn
,unsigned short *outfnlen
,
for (; fnidx
< infnlen
; fnidx
++) {
if (!original
&& c
>= 'A' && c
<= 'Z')
*outfn
++ = c
+ ('a' - 'A');
else if (!original
&& c
== '.' && *infn
== ';')
else if (!original
&& c
== ';')