Some work on file I/O
This commit is contained in:
@@ -62,19 +62,13 @@ namespace lime {
|
||||
//#define val_os_string val_string
|
||||
|
||||
#if defined(IPHONE)
|
||||
FILE *OpenRead(const char *inName);
|
||||
FILE *OpenOverwrite(const char *inName); // [ddc]
|
||||
extern int gFixedOrientation;
|
||||
|
||||
#elif defined(HX_MACOS)
|
||||
FILE *OpenRead(const char *inName);
|
||||
#define OpenOverwrite(x) fopen(x,"wb")
|
||||
#else
|
||||
#ifdef TIZEN
|
||||
extern int gFixedOrientation;
|
||||
#endif
|
||||
#define OpenRead(x) fopen(x,"rb")
|
||||
#define OpenOverwrite(x) fopen(x,"wb") // [ddc]
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
|
||||
27
project/include/utils/FileIO.h
Normal file
27
project/include/utils/FileIO.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef LIME_UTILS_FILEIO_H
|
||||
#define LIME_UTILS_FILEIO_H
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
}
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
extern int fclose (FILE *stream);
|
||||
extern FILE* fopen (const char *filename, const char *mode);
|
||||
//extern FILE* freopen (const char *filename, const char *mode, FILE *stream);
|
||||
extern size_t fread (void *ptr, size_t size, size_t count, FILE *stream);
|
||||
extern int fseek (FILE *stream, long int offset, int origin);
|
||||
extern long int ftell (FILE *stream);
|
||||
extern size_t fwrite (const void *ptr, size_t size, size_t count, FILE *stream);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user