equal
deleted
inserted
replaced
|
1 #ifndef PORTABLE_H |
|
2 #define PORTABLE_H |
|
3 |
|
4 #include <sys/types.h> |
|
5 #include <stdio.h> |
|
6 |
|
7 #if defined(_WIN32) |
|
8 typedef __int64 portable_off_t; |
|
9 #else |
|
10 typedef off_t portable_off_t; |
|
11 #endif |
|
12 |
|
13 /** @file |
|
14 * @brief Portable versions of functions that are platform dependent. |
|
15 */ |
|
16 |
|
17 int portable_system(const char *command,const char *args,bool commandHasConsole=TRUE); |
|
18 uint portable_pid(); |
|
19 const char * portable_getenv(const char *variable); |
|
20 void portable_setenv(const char *variable,const char *value); |
|
21 void portable_unsetenv(const char *variable); |
|
22 portable_off_t portable_fseek(FILE *f,portable_off_t offset, int whence); |
|
23 portable_off_t portable_ftell(FILE *f); |
|
24 char portable_pathSeparator(); |
|
25 char portable_pathListSeparator(); |
|
26 const char * portable_ghostScriptCommand(); |
|
27 const char * portable_commandExtension(); |
|
28 bool portable_fileSystemIsCaseSensitive(); |
|
29 FILE * portable_popen(const char *name,const char *type); |
|
30 int portable_pclose(FILE *stream); |
|
31 double portable_getSysElapsedTime(); |
|
32 |
|
33 extern "C" { |
|
34 void * portable_iconv_open(const char* tocode, const char* fromcode); |
|
35 size_t portable_iconv (void *cd, const char** inbuf, size_t *inbytesleft, |
|
36 char* * outbuf, size_t *outbytesleft); |
|
37 int portable_iconv_close (void *cd); |
|
38 } |
|
39 |
|
40 |
|
41 #endif |
|
42 |