|
Packit |
1c1d7e |
#ifndef PORTABLE_H
|
|
Packit |
1c1d7e |
#define PORTABLE_H
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#include <sys/types.h>
|
|
Packit |
1c1d7e |
#include <stdio.h>
|
|
Packit |
1c1d7e |
#include <qglobal.h>
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#if defined(_WIN32)
|
|
Packit |
1c1d7e |
typedef __int64 portable_off_t;
|
|
Packit |
1c1d7e |
#else
|
|
Packit |
1c1d7e |
typedef off_t portable_off_t;
|
|
Packit |
1c1d7e |
#endif
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** @file
|
|
Packit |
1c1d7e |
* @brief Portable versions of functions that are platform dependent.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
int portable_system(const char *command,const char *args,bool commandHasConsole=TRUE);
|
|
Packit |
1c1d7e |
uint portable_pid();
|
|
Packit |
1c1d7e |
const char * portable_getenv(const char *variable);
|
|
Packit |
1c1d7e |
void portable_setenv(const char *variable,const char *value);
|
|
Packit |
1c1d7e |
void portable_unsetenv(const char *variable);
|
|
Packit |
1c1d7e |
portable_off_t portable_fseek(FILE *f,portable_off_t offset, int whence);
|
|
Packit |
1c1d7e |
portable_off_t portable_ftell(FILE *f);
|
|
Packit |
1c1d7e |
FILE * portable_fopen(const char *fileName,const char *mode);
|
|
Packit |
1c1d7e |
char portable_pathSeparator();
|
|
Packit |
1c1d7e |
char portable_pathListSeparator();
|
|
Packit |
1c1d7e |
const char * portable_ghostScriptCommand();
|
|
Packit |
1c1d7e |
const char * portable_commandExtension();
|
|
Packit |
1c1d7e |
bool portable_fileSystemIsCaseSensitive();
|
|
Packit |
1c1d7e |
FILE * portable_popen(const char *name,const char *type);
|
|
Packit |
1c1d7e |
int portable_pclose(FILE *stream);
|
|
Packit |
1c1d7e |
void portable_sysTimerStart();
|
|
Packit |
1c1d7e |
void portable_sysTimerStop();
|
|
Packit |
1c1d7e |
double portable_getSysElapsedTime();
|
|
Packit |
1c1d7e |
void portable_sleep(int ms);
|
|
Packit |
1c1d7e |
bool portable_isAbsolutePath(const char *fileName);
|
|
Packit |
1c1d7e |
void portable_correct_path(void);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
extern "C" {
|
|
Packit |
1c1d7e |
void * portable_iconv_open(const char* tocode, const char* fromcode);
|
|
Packit |
1c1d7e |
size_t portable_iconv (void *cd, char** inbuf, size_t *inbytesleft,
|
|
Packit |
1c1d7e |
char* * outbuf, size_t *outbytesleft);
|
|
Packit |
1c1d7e |
int portable_iconv_close (void *cd);
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#endif
|
|
Packit |
1c1d7e |
|