Builds on Mac Classic again.

This commit is contained in:
Ryan C. Gordon 2005-03-14 12:05:07 +00:00
parent d840403c1c
commit 3a0e6fa051
4 changed files with 6 additions and 10 deletions

View File

@ -5,7 +5,7 @@
03132005 - More mount work, added PHYSFS_getMountPoint() and more cleanups. 03132005 - More mount work, added PHYSFS_getMountPoint() and more cleanups.
Replaced all the C runtime allocations with PhysFS allocation hooks. Replaced all the C runtime allocations with PhysFS allocation hooks.
Added pocketpc.c to EXTRA_DIST. Added allocation hooks to some Added pocketpc.c to EXTRA_DIST. Added allocation hooks to some
platform drivers. platform drivers. Updated Mac Classic build.
03122005 - Added evil GOTO_*_MACRO_* macros. Fixed unix.c to compile again on 03122005 - Added evil GOTO_*_MACRO_* macros. Fixed unix.c to compile again on
MacOS X. Added PHYSFS_mount() (thanks, Philip!). Cleaned up the MacOS X. Added PHYSFS_mount() (thanks, Philip!). Cleaned up the
INSTALL and CREDITS files a little. Split off start of INSTALL and CREDITS files a little. Split off start of

Binary file not shown.

View File

@ -1302,8 +1302,8 @@ static int verifyPath(DirHandle *h, char **_fname, int allowMissing)
if (h->mountPoint != NULL) /* NULL mountpoint means "/". */ if (h->mountPoint != NULL) /* NULL mountpoint means "/". */
{ {
size_t mntpntlen = strlen(h->mountPoint); size_t mntpntlen = strlen(h->mountPoint);
assert(mntpntlen > 1); /* root mount points should be NULL. */
size_t len = strlen(fname); size_t len = strlen(fname);
assert(mntpntlen > 1); /* root mount points should be NULL. */
/* not under the mountpoint, so skip this archive. */ /* not under the mountpoint, so skip this archive. */
BAIL_IF_MACRO(len < mntpntlen-1, ERR_NO_SUCH_PATH, 0); BAIL_IF_MACRO(len < mntpntlen-1, ERR_NO_SUCH_PATH, 0);
/* !!! FIXME: Case insensitive? */ /* !!! FIXME: Case insensitive? */
@ -2065,11 +2065,5 @@ static void setDefaultAllocator(void)
allocator.Free = __PHYSFS_platformAllocatorFree; allocator.Free = __PHYSFS_platformAllocatorFree;
} /* setDefaultAllocator */ } /* setDefaultAllocator */
PHYSFS_Allocator *__PHYSFS_getAllocator(void)
{
return(&allocator);
} /* __PHYFS_getAllocator */
/* end of physfs.c ... */ /* end of physfs.c ... */

View File

@ -207,7 +207,7 @@ void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data)
size = (size_t) volName[0]; /* convert to ASCIZ string... */ size = (size_t) volName[0]; /* convert to ASCIZ string... */
memmove(&volName[0], &volName[1], size); memmove(&volName[0], &volName[1], size);
volName[size] = '\0'; volName[size] = '\0';
cb(data, volName); cb(data, (const char *) volName);
} /* if */ } /* if */
} /* if */ } /* if */
@ -619,8 +619,10 @@ static int macClassicEnumerateFiles(const char *dirname,
size = (size_t) str255[0]; /* (convert to ASCIZ string...) */ size = (size_t) str255[0]; /* (convert to ASCIZ string...) */
memmove(&str255[0], &str255[1], size); memmove(&str255[0], &str255[1], size);
str255[size] = '\0'; str255[size] = '\0';
callback(callbackdata, str255); callback(callbackdata, (const char *) str255);
} /* for */ } /* for */
return(1);
} /* macClassicEnumerateFiles */ } /* macClassicEnumerateFiles */