37 extern const uint8_t
res[];
56 dirLength =
letoh32(resHeader->rootEntry.dataLength);
61 for(found =
FALSE; !found && path[0] !=
'\0'; path +=
n + 1)
64 for(
n = 0; path[
n] !=
'\\' && path[
n] !=
'/' && path[
n] !=
'\0';
n++)
68 if(
n == 0 && path[
n] !=
'\0')
72 for(
n = 0; path[
n] !=
'\\' && path[
n] !=
'/' && path[
n] !=
'\0';
n++)
78 for(match =
FALSE; !match && dirLength > 0; )
84 if(dirLength < (
sizeof(
ResEntry) + resEntry->nameLength))
88 if(resEntry->nameLength ==
n && !
strncasecmp(resEntry->name, path,
n))
94 dirLength =
letoh32(resEntry->dataLength);
113 dirLength -=
sizeof(
ResEntry) + resEntry->nameLength;
117 resEntry->nameLength);
164 for(found =
FALSE; !found && path[0] !=
'\0'; path +=
n + 1)
167 for(
n = 0; path[
n] !=
'\\' && path[
n] !=
'/' && path[
n] !=
'\0';
n++)
171 if(
n == 0 && path[
n] !=
'\0')
175 for(
n = 0; path[
n] !=
'\\' && path[
n] !=
'/' && path[
n] !=
'\0';
n++)
191 if(resEntry->nameLength ==
n && !
strncasecmp(resEntry->name, path,
n))
220 resEntry->nameLength);
234 dirEntry->
type = resEntry->type;
289 error = resOpenFile(
file, &dirEntry, MODE_BINARY);
296 return (FILE *)
file;
300 size_t fread(
void *ptr,
size_t size,
size_t count, FILE *stream)
304 n = resReadFile((
FsFile *) stream, ptr, size * count);
310 int_t fclose(FILE *stream)
318 uint_t fileGetSize(FILE *stream)