Added FS_SEPARATOR definition ('/' on linux, '\\' on windows)
This commit is contained in:
parent
657bc38dec
commit
a68d444913
|
@ -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... */
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include <windows.h>
|
||||
|
||||
const char FS_SEPARATOR = '\\';
|
||||
|
||||
void * FsReadFirst(const char * p, FsEntry * entry) {
|
||||
WIN32_FIND_DATA FindFileData;
|
||||
HANDLE hFind;
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue