Root/
Source at commit 1322 created 12 years 7 months ago. By meklort, Add doxygen to utils folder | |
---|---|
1 | #ifndef PORTABLE_H␊ |
2 | #define PORTABLE_H␊ |
3 | ␊ |
4 | #include <sys/types.h>␊ |
5 | #include <stdio.h>␊ |
6 | #include <qglobal.h>␊ |
7 | ␊ |
8 | #if defined(_WIN32)␊ |
9 | typedef __int64 portable_off_t;␊ |
10 | #else␊ |
11 | typedef off_t portable_off_t;␊ |
12 | #endif␊ |
13 | ␊ |
14 | /** @file␊ |
15 | * @brief Portable versions of functions that are platform dependent.␊ |
16 | */␊ |
17 | ␊ |
18 | int portable_system(const char *command,const char *args,bool commandHasConsole=TRUE);␊ |
19 | uint portable_pid();␊ |
20 | const char * portable_getenv(const char *variable);␊ |
21 | void portable_setenv(const char *variable,const char *value);␊ |
22 | void portable_unsetenv(const char *variable);␊ |
23 | portable_off_t portable_fseek(FILE *f,portable_off_t offset, int whence);␊ |
24 | portable_off_t portable_ftell(FILE *f);␊ |
25 | FILE * portable_fopen(const char *fileName,const char *mode);␊ |
26 | char portable_pathSeparator();␊ |
27 | char portable_pathListSeparator();␊ |
28 | const char * portable_ghostScriptCommand();␊ |
29 | const char * portable_commandExtension();␊ |
30 | bool portable_fileSystemIsCaseSensitive();␊ |
31 | FILE * portable_popen(const char *name,const char *type);␊ |
32 | int portable_pclose(FILE *stream);␊ |
33 | void portable_sysTimerStart();␊ |
34 | void portable_sysTimerStop();␊ |
35 | double portable_getSysElapsedTime();␊ |
36 | void portable_sleep(int ms);␊ |
37 | ␊ |
38 | extern "C" {␊ |
39 | void * portable_iconv_open(const char* tocode, const char* fromcode);␊ |
40 | size_t portable_iconv (void *cd, const char** inbuf, size_t *inbytesleft, ␊ |
41 | char* * outbuf, size_t *outbytesleft);␊ |
42 | int portable_iconv_close (void *cd);␊ |
43 | }␊ |
44 | ␊ |
45 | ␊ |
46 | #endif␊ |
47 | ␊ |
48 |