Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Compiles and runs on Visual C. What an uphill climb THAT was.
  • Loading branch information
icculus committed Aug 23, 2001
1 parent 87ca686 commit 7096266
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 53 deletions.
21 changes: 13 additions & 8 deletions Makefile
Expand Up @@ -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)
Expand All @@ -185,6 +189,7 @@ endif

ifeq ($(strip $(cygwin)),true)
MAINSRCS += platform/win32.c
CFLAGS += -DWIN32
else
MAINSRCS += platform/unix.c
endif
Expand Down
13 changes: 6 additions & 7 deletions physfs.c
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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.