Added FS_SEPARATOR definition ('/' on linux, '\\' on windows)

This commit is contained in:
yabause 2006-06-08 22:17:02 +00:00
parent 657bc38dec
commit a68d444913
3 changed files with 8 additions and 0 deletions

View File

@ -6,11 +6,15 @@
#include <stdio.h>
#include <string.h>
const char FS_SEPARATOR = '/';
void * FsReadFirst(const char * path, FsEntry * entry) {
DIR * dir;
struct dirent * e;
struct stat s;
printf("reading %s\n", path);
/* hack: reading a directory gives relative file names
* and there's no way to know that directory from
* DIR, so we're changing working directory... */

View File

@ -2,6 +2,8 @@
#include <windows.h>
const char FS_SEPARATOR = '\\';
void * FsReadFirst(const char * p, FsEntry * entry) {
WIN32_FIND_DATA FindFileData;
HANDLE hFind;

View File

@ -11,6 +11,8 @@ extern "C" {
#define FS_ERR_NO_MORE_FILES 1
extern const char FS_SEPARATOR;
typedef struct {
char cFileName[256];
char cAlternateFileName[14];