Moved from root source dir.
This commit is contained in:
parent
517e710002
commit
9c4faeaa88
|
@ -0,0 +1,64 @@
|
||||||
|
/*
|
||||||
|
* Standard directory I/O support routines for PhysicsFS.
|
||||||
|
*
|
||||||
|
* Please see the file LICENSE in the source's root directory.
|
||||||
|
*
|
||||||
|
* This file written by Ryan C. Gordon.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#define __PHYSICSFS_INTERNAL__
|
||||||
|
#include "physfs_internal.h"
|
||||||
|
|
||||||
|
static const FileFunctions __PHYSFS_FileHandle_DIR =
|
||||||
|
{
|
||||||
|
DIR_read, /* read() method */
|
||||||
|
NULL, /* write() method */
|
||||||
|
DIR_eof, /* eof() method */
|
||||||
|
DIR_tell, /* tell() method */
|
||||||
|
DIR_seek, /* seek() method */
|
||||||
|
DIR_close, /* close() method */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static const FileFunctions __PHYSFS_FileHandle_DIRW =
|
||||||
|
{
|
||||||
|
NULL, /* read() method */
|
||||||
|
DIR_write, /* write() method */
|
||||||
|
DIR_eof, /* eof() method */
|
||||||
|
DIR_tell, /* tell() method */
|
||||||
|
DIR_seek, /* seek() method */
|
||||||
|
DIR_close, /* close() method */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const DirFunctions __PHYSFS_DirFunctions_DIR =
|
||||||
|
{
|
||||||
|
DIR_isArchive, /* isArchive() method */
|
||||||
|
DIR_openArchive, /* openArchive() method */
|
||||||
|
DIR_enumerate, /* enumerateFiles() method */
|
||||||
|
DIR_exists, /* exists() method */
|
||||||
|
DIR_isDirectory, /* isDirectory() method */
|
||||||
|
DIR_isSymLink, /* isSymLink() method */
|
||||||
|
DIR_openRead, /* openRead() method */
|
||||||
|
DIR_openWrite, /* openWrite() method */
|
||||||
|
DIR_openAppend, /* openAppend() method */
|
||||||
|
DIR_remove, /* remove() method */
|
||||||
|
DIR_mkdir, /* mkdir() method */
|
||||||
|
DIR_close, /* close() method */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* This doesn't get listed, since it's technically not an archive... */
|
||||||
|
#if 0
|
||||||
|
const __PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_DIR =
|
||||||
|
{
|
||||||
|
"DIR",
|
||||||
|
"non-archive directory I/O"
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* end of dir.c ... */
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* ZIP support routines for PhysicsFS.
|
||||||
|
*
|
||||||
|
* Please see the file LICENSE in the source's root directory.
|
||||||
|
*
|
||||||
|
* This file written by Ryan C. Gordon.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#define __PHYSICSFS_INTERNAL__
|
||||||
|
#include "physfs_internal.h"
|
||||||
|
|
||||||
|
#if (!defined PHYSFS_SUPPORTS_ZIP)
|
||||||
|
#error PHYSFS_SUPPORTS_ZIP must be defined.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
static const FileFunctions __PHYSFS_FileHandle_ZIP =
|
||||||
|
{
|
||||||
|
ZIP_read, /* read() method */
|
||||||
|
NULL, /* write() method */
|
||||||
|
ZIP_eof, /* eof() method */
|
||||||
|
ZIP_tell, /* tell() method */
|
||||||
|
ZIP_seek, /* seek() method */
|
||||||
|
ZIP_close, /* close() method */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const DirFunctions __PHYSFS_DirFunctions_ZIP =
|
||||||
|
{
|
||||||
|
ZIP_isArchive, /* isArchive() method */
|
||||||
|
ZIP_openArchive, /* openArchive() method */
|
||||||
|
ZIP_enumerate, /* enumerateFiles() method */
|
||||||
|
ZIP_exists, /* exists() method */
|
||||||
|
ZIP_isDirectory, /* isDirectory() method */
|
||||||
|
ZIP_isSymLink, /* isSymLink() method */
|
||||||
|
ZIP_openRead, /* openRead() method */
|
||||||
|
NULL, /* openWrite() method */
|
||||||
|
NULL, /* openAppend() method */
|
||||||
|
NULL, /* remove() method */
|
||||||
|
NULL, /* mkdir() method */
|
||||||
|
ZIP_close, /* close() method */
|
||||||
|
};
|
||||||
|
|
||||||
|
const __PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_ZIP =
|
||||||
|
{
|
||||||
|
"ZIP",
|
||||||
|
"PkZip/WinZip/Info-Zip compatible"
|
||||||
|
};
|
||||||
|
|
||||||
|
/* end of zip.c ... */
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
/*
|
||||||
|
* Unix support routines for PhysicsFS.
|
||||||
|
*
|
||||||
|
* Please see the file LICENSE in the source's root directory.
|
||||||
|
*
|
||||||
|
* This file written by Ryan C. Gordon.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#define __PHYSICSFS_INTERNAL__
|
||||||
|
#include "physfs_internal.h"
|
||||||
|
|
||||||
|
|
||||||
|
const char *__PHYSFS_platformDirSeparator = "/";
|
||||||
|
|
||||||
|
char **__PHYSFS_platformDetectAvailableCDs(void)
|
||||||
|
{
|
||||||
|
} /* __PHYSFS_detectAvailableCDs */
|
||||||
|
|
||||||
|
|
||||||
|
char *__PHYSFS_platformCalcBaseDir(char *argv0)
|
||||||
|
{
|
||||||
|
return(NULL);
|
||||||
|
} /* __PHYSFS_platformCalcBaseDir */
|
||||||
|
|
||||||
|
|
||||||
|
char *__PHYSFS_platformGetUserName(void)
|
||||||
|
{
|
||||||
|
} /* __PHYSFS_platformGetUserName */
|
||||||
|
|
||||||
|
|
||||||
|
char *__PHYSFS_platformGetUserDir(void)
|
||||||
|
{
|
||||||
|
} /* __PHYSFS_platformGetUserDir */
|
||||||
|
|
||||||
|
|
||||||
|
int __PHYSFS_platformGetThreadID(void)
|
||||||
|
{
|
||||||
|
return((int) pthread_self());
|
||||||
|
} /* __PHYSFS_platformGetThreadID */
|
||||||
|
|
||||||
|
|
||||||
|
int __PHYSFS_platformStricmp(const char *str1, const char *str2)
|
||||||
|
{
|
||||||
|
return(strcasecmp(str1, str2));
|
||||||
|
} /* __PHYSFS_platformStricmp */
|
||||||
|
|
||||||
|
|
||||||
|
int __PHYSFS_platformIsSymlink(const char *fname)
|
||||||
|
{
|
||||||
|
} /* __PHYSFS_platformIsSymlink */
|
||||||
|
|
||||||
|
|
||||||
|
int __PHYSFS_platformIsDirectory(const char *fname)
|
||||||
|
{
|
||||||
|
} /* __PHYSFS_platformIsDirectory */
|
||||||
|
|
||||||
|
|
||||||
|
/* end of unix.c ... */
|
||||||
|
|
Loading…
Reference in New Issue