Changeset 281 for cpp/common/nonstd_stdio.h
- Timestamp:
- 12/27/14 01:01:43 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/nonstd_stdio.h
r247 r281 20 20 #include <dir.h> 21 21 #else 22 #ifndef MOBILE2D23 22 #include <direct.h> 24 #endif25 23 #define mkdir _mkdir 24 #define S_ISDIR(m) (((m)&S_IFDIR)==S_IFDIR) 26 25 #endif 27 26 28 #ifndef MOBILE2D 29 #include <io.h> //borland compiler: include <io.h> before <dir.h> causes the SimWorld class in "simul.h" be unrecognized, for unknown reason :O moreover, this problem is only pertinent to the CLI project, not GUI. Maybe this is caused by global defines like NOVCL, NO_STRICT etc.? 27 #include <io.h> //borland compiler: include <io.h> before <dir.h> causes the SimWorld class in "simul.h" be unrecognized, for unknown reason :O moreover, this problem is only pertinent to the CLI project, not GUI. Maybe this is caused by global defines like NOVCL, NO_STRICT etc.? 30 28 // #define makeDirectory(name) mkdir(name) 31 #endif32 33 #define S_ISDIR(x) ((x & _S_IFDIR)==_S_IFDIR)34 29 35 30 #else 36 31 37 38 32 #include <unistd.h> 33 #include <sys/stat.h> 39 34 // #define makeDirectory(name) mkdir(name,0777) 40 41 35 #define _unlink unlink //_unlink jest ISO-conformant, unlink jest POSIX-deprecated 36 #define _stat stat 42 37 #endif 43 38 … … 49 44 #ifdef __ANDROID__ 50 45 #include <nv_file/nv_file.h> 51 52 46 struct rwFILE //jedno z dwoch pol jest zainicjowane w zaleznosci od tego gdzie jest plik 47 { //nvidia uses a similar trick in nv_file.h (STD_FILE and APK_FILE), maybe doing a similar thing here is redundant? but their trick uses some trial-and-error code (see NvFOpen()) 53 48 NvFile *rfile; //can only read 54 49 FILE *rwfile; 55 50 rwFILE() {rfile=rwfile=NULL;} 56 57 51 }; 52 typedef rwFILE MFILE; 58 53 #else //SHP: 59 60 61 62 63 64 54 //z <stdio.h> wzielismy sprintfy i inne ktore dzia³aj¹... 55 #include <FIo.h> 56 // wklejone z sailora w ramach integracji frams+engine 57 // ale to nie sprawia ze framsy korzystaja z mfile - potrzebna jest implementacja virtfile dla bady! (patrz: stdiofile.h) 58 // i wtedy bedzie mozna mfile wywalic tez z sailora 59 typedef Osp::Io::File MFILE; 65 60 #endif 66 61 … … 82 77 83 78 #else 84 typedef FILE MFILE; 79 typedef FILE MFILE; 80 #ifdef _WIN32 81 #define mfopen _wfopen 82 #else 85 83 #define mfopen fopen 86 #define mfclose fclose 87 #define mfread fread 88 #define mfwrite fwrite 89 #define mfputs fputs 90 #define mfgets fgets 91 #define mfeof feof 92 #define mfseek fseek 93 #define mftell ftell 84 #endif 85 #define mfclose fclose 86 #define mfread fread 87 #define mfwrite fwrite 88 #define mfputs fputs 89 #define mfgets fgets 90 #define mfeof feof 91 #define mfseek fseek 92 #define mftell ftell 94 93 #endif 95 94
Note: See TracChangeset
for help on using the changeset viewer.