doxygen
portable.h
Go to the documentation of this file.
1 #ifndef PORTABLE_H
2 #define PORTABLE_H
3 
4 #include <stdio.h>
5 #include <sys/types.h>
6 #include <stdint.h>
7 
8 #include "qcstring.h"
9 
10 class Buf;
11 
12 #if defined(_WIN32)
13 typedef __int64 portable_off_t;
14 #else
15 typedef off_t portable_off_t;
16 #endif
17 
22 namespace Portable
23 {
24  int system(const QCString &command,const QCString &args,bool commandHasConsole=true);
25  unsigned int pid();
26  QCString getenv(const QCString &variable);
27  void setenv(const QCString &variable,const QCString &value);
28  void unsetenv(const QCString &variable);
29  portable_off_t fseek(FILE *f,portable_off_t offset, int whence);
30  portable_off_t ftell(FILE *f);
31  FILE * fopen(const QCString &fileName,const QCString &mode);
32  int fclose(FILE *f);
33  void unlink(const QCString &fileName);
34  QCString pathSeparator();
35  QCString pathListSeparator();
36  const char * ghostScriptCommand();
37  const char * commandExtension();
38  bool fileSystemIsCaseSensitive();
39  FILE * popen(const QCString &name,const QCString &type);
40  int pclose(FILE *stream);
41  void sysTimerStart();
42  void sysTimerStop();
43  double getSysElapsedTime();
44  void sleep(int ms);
45  bool isAbsolutePath(const QCString &fileName);
46  void correct_path();
47  void setShortDir();
48  const char * strnstr(const char *haystack, const char *needle, size_t haystack_len);
49  const char * devNull();
50  bool checkForExecutable(const QCString &fileName);
51  size_t recodeUtf8StringToW(const QCString &inputStr,uint16_t **buf);
52 }
53 
54 
55 extern "C" {
56  void * portable_iconv_open(const char *tocode, const char *fromcode);
57  size_t portable_iconv (void *cd, const char** inbuf, size_t *inbytesleft,
58  char* * outbuf, size_t *outbytesleft);
59  int portable_iconv_close (void *cd);
60 }
61 
62 #endif
63 
Definition: portable.h:22
void correct_path()
Correct a possible wrong PATH variable.
Definition: portable.cpp:515
int system(const QCString &command, const QCString &args, bool commandHasConsole=true)
Definition: portable.cpp:42
This is an alternative implementation of QCString.
Definition: qcstring.h:108