Skip to content
Permalink
Browse files
Compiles and runs on Visual C. What an uphill climb THAT was.
  • Loading branch information
icculus committed Aug 23, 2001
1 parent 87ca686 commit 709626633ea6394db8380ff900d74a521bad6f3b
Showing with 90 additions and 53 deletions.
  1. +13 −8 Makefile
  2. +6 −7 physfs.c
  3. +45 −37 physfs.h
  4. +26 −1 test/test_physfs.c
@@ -168,14 +168,18 @@ TESTSRCS := test/test_physfs.c
MAINSRCS := physfs.c archivers/dir.c

ifeq ($(strip $(use_archive_zip)),true)
MAINSRCS += archivers/zip.c archivers/unzip.c
CFLAGS += -DPHYSFS_SUPPORTS_ZIP
ifeq ($(strip $(cygwin)),true)
CFLAGS += -Izlibwin32
LDFLAGS += zlibwin32/zlibstat.lib
else
LDFLAGS += -lz
endif
MAINSRCS += archivers/zip.c archivers/unzip.c
CFLAGS += -DPHYSFS_SUPPORTS_ZIP
ifeq ($(strip $(cygwin)),true)
CFLAGS += -Izlibwin32
ifeq ($(strip $(debugging)),true)
LDFLAGS += zlibwin32/zlibstat_multid.lib
else
LDFLAGS += zlibwin32/zlibstat_multir.lib
endif
else
LDFLAGS += -lz
endif
endif

ifeq ($(strip $(use_archive_grp)),true)
@@ -185,6 +189,7 @@ endif

ifeq ($(strip $(cygwin)),true)
MAINSRCS += platform/win32.c
CFLAGS += -DWIN32
else
MAINSRCS += platform/unix.c
endif
@@ -626,7 +626,7 @@ char **PHYSFS_getSearchPath(void)


int PHYSFS_setSaneConfig(const char *appName, const char *archiveExt,
int includeCdRoms, int archivesFirst)
int includeCdRoms, int archivesFirst)
{
const char *basedir = PHYSFS_getBaseDir();
const char *userdir = PHYSFS_getUserDir();
@@ -737,9 +737,9 @@ void PHYSFS_permitSymbolicLinks(int allow)


/* string manipulation in C makes my ass itch. */
char *__PHYSFS_convertToDependent(const char *prepend,
const char *dirName,
const char *append)
char * __PHYSFS_convertToDependent(const char *prepend,
const char *dirName,
const char *append)
{
const char *dirsep = PHYSFS_getDirSeparator();
int sepsize = strlen(dirsep);
@@ -1233,7 +1233,7 @@ int PHYSFS_close(PHYSFS_file *handle)


int PHYSFS_read(PHYSFS_file *handle, void *buffer,
unsigned int objSize, unsigned int objCount)
unsigned int objSize, unsigned int objCount)
{
FileHandle *h = (FileHandle *) handle->opaque;
assert(h != NULL);
@@ -1244,7 +1244,7 @@ int PHYSFS_read(PHYSFS_file *handle, void *buffer,


int PHYSFS_write(PHYSFS_file *handle, void *buffer,
unsigned int objSize, unsigned int objCount)
unsigned int objSize, unsigned int objCount)
{
FileHandle *h = (FileHandle *) handle->opaque;
assert(h != NULL);
@@ -1294,6 +1294,5 @@ int PHYSFS_fileLength(PHYSFS_file *handle)
return(h->funcs->fileLength(h));
} /* PHYSFS_filelength */


/* end of physfs.c ... */

0 comments on commit 7096266

Please sign in to comment.