portable.h
Go to the documentation of this file.
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);
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);
25 FILE * portable_fopen(const char *fileName,const char *mode);
28 const char * portable_ghostScriptCommand();
29 const char * portable_commandExtension();
31 FILE * portable_popen(const char *name,const char *type);
32 int portable_pclose(FILE *stream);
36 void portable_sleep(int ms);
37 bool portable_isAbsolutePath(const char *fileName);
38 
39 extern "C" {
40  void * portable_iconv_open(const char* tocode, const char* fromcode);
41  size_t portable_iconv (void *cd, char** inbuf, size_t *inbytesleft,
42  char* * outbuf, size_t *outbytesleft);
43  int portable_iconv_close (void *cd);
44 }
45 
46 #endif
47 
static QCString name
Definition: declinfo.cpp:673
char portable_pathListSeparator()
Definition: portable.cpp:364
FILE * portable_fopen(const char *fileName, const char *mode)
Definition: portable.cpp:344
int portable_system(const char *command, const char *args, bool commandHasConsole=TRUE)
Definition: portable.cpp:33
off_t portable_off_t
Definition: portable.h:11
const char * portable_commandExtension()
Definition: portable.cpp:382
int command
portable_off_t portable_ftell(FILE *f)
Definition: portable.cpp:333
size_t portable_iconv(void *cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
Definition: portable_c.c:24
static QCString args
Definition: declinfo.cpp:674
uint portable_pid()
Definition: portable.cpp:186
static constexpr double ms
Definition: Units.h:96
int portable_iconv_close(void *cd)
Definition: portable_c.c:30
fileName
Definition: dumpTree.py:9
void portable_setenv(const char *variable, const char *value)
Definition: portable.cpp:202
void * portable_iconv_open(const char *tocode, const char *fromcode)
Definition: portable_c.c:19
int portable_pclose(FILE *stream)
Definition: portable.cpp:405
bool portable_isAbsolutePath(const char *fileName)
Definition: portable.cpp:434
portable_off_t portable_fseek(FILE *f, portable_off_t offset, int whence)
Definition: portable.cpp:322
double portable_getSysElapsedTime()
Definition: portable.cpp:420
const char * portable_getenv(const char *variable)
Definition: portable.cpp:317
void portable_sysTimerStop()
Definition: portable.cpp:415
void portable_sysTimerStart()
Definition: portable.cpp:410
void portable_unsetenv(const char *variable)
Definition: portable.cpp:283
void portable_sleep(int ms)
Definition: portable.cpp:425
FILE * portable_popen(const char *name, const char *type)
Definition: portable.cpp:400
char portable_pathSeparator()
Definition: portable.cpp:355
unsigned uint
Definition: qglobal.h:351
bool portable_fileSystemIsCaseSensitive()
Definition: portable.cpp:391
const bool TRUE
Definition: qglobal.h:371
const char * portable_ghostScriptCommand()
Definition: portable.cpp:373