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 <fstream>
9 
10 #include "qcstring.h"
11 
12 class Buf;
13 
18 namespace Portable
19 {
20  int system(const QCString &command,const QCString &args,bool commandHasConsole=true);
21  uint32_t pid();
22  QCString getenv(const QCString &variable);
23  void setenv(const QCString &variable,const QCString &value);
24  void unsetenv(const QCString &variable);
25  FILE * fopen(const QCString &fileName,const QCString &mode);
26  int fclose(FILE *f);
27  void unlink(const QCString &fileName);
28  QCString pathSeparator();
29  QCString pathListSeparator();
30  const char * ghostScriptCommand();
31  const char * commandExtension();
32  bool fileSystemIsCaseSensitive();
33  FILE * popen(const QCString &name,const QCString &type);
34  int pclose(FILE *stream);
35  double getSysElapsedTime();
36  bool isAbsolutePath(const QCString &fileName);
37  void correct_path();
38  void setShortDir();
39  const char * strnstr(const char *haystack, const char *needle, size_t haystack_len);
40  const char * devNull();
41  bool checkForExecutable(const QCString &fileName);
42  size_t recodeUtf8StringToW(const QCString &inputStr,uint16_t **buf);
43  std::ofstream openOutputStream(const QCString &name,bool append=false);
44  std::ifstream openInputStream(const QCString &name,bool binary=false,bool openAtEnd=false);
45 }
46 
47 
48 extern "C" {
49  void * portable_iconv_open(const char *tocode, const char *fromcode);
50  size_t portable_iconv (void *cd, const char** inbuf, size_t *inbytesleft,
51  char* * outbuf, size_t *outbytesleft);
52  int portable_iconv_close (void *cd);
53 }
54 
55 #endif
56 
Definition: portable.h:18
void correct_path()
Correct a possible wrong PATH variable.
Definition: portable.cpp:524
int system(const QCString &command, const QCString &args, bool commandHasConsole=true)
Definition: portable.cpp:106
Definition: core.h:1240
This is an alternative implementation of QCString.
Definition: qcstring.h:93