1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +00:00

Renamed win32.* -> mingw.*

This commit is contained in:
Marc Sanfacon 2014-01-15 08:29:46 -05:00
parent 94ddd697a6
commit f0c260d6a0
6 changed files with 23 additions and 19 deletions

View File

@ -206,8 +206,8 @@ set(PDF2HTMLEX_SRC ${PDF2HTMLEX_SRC}
src/util/path.cc src/util/path.cc
src/util/unicode.h src/util/unicode.h
src/util/unicode.cc src/util/unicode.cc
src/util/win32.h src/util/mingw.h
src/util/win32.cc src/util/mingw.cc
src/ArgParser.h src/ArgParser.h
src/ArgParser.cc src/ArgParser.cc
src/Base64Stream.h src/Base64Stream.h

View File

@ -14,7 +14,10 @@
#include "TmpFiles.h" #include "TmpFiles.h"
#include "Param.h" #include "Param.h"
#include "util/win32.h"
#ifdef __MINGW32__
#include "util/mingw.h"
#endif
using namespace std; using namespace std;

View File

@ -35,7 +35,10 @@
#include "util/path.h" #include "util/path.h"
#include "util/ffw.h" #include "util/ffw.h"
#include "util/win32.h"
#ifdef __MINGW32__
#include "util/mingw.h"
#endif
using namespace std; using namespace std;
using namespace pdf2htmlEX; using namespace pdf2htmlEX;
@ -343,12 +346,12 @@ void check_param()
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
// We need to adjust these directories before parsing the options. // We need to adjust these directories before parsing the options.
#ifndef __MINGW32__ #if defined(__MINGW32__)
param.tmp_dir = "/tmp";
param.data_dir = PDF2HTMLEX_DATA_PATH;
#else
param.data_dir = get_exec_dir(argv[0]); param.data_dir = get_exec_dir(argv[0]);
param.tmp_dir = get_tmp_dir(); param.tmp_dir = get_tmp_dir();
#else
param.tmp_dir = "/tmp";
param.data_dir = PDF2HTMLEX_DATA_PATH;
#endif #endif
parse_options(argc, argv); parse_options(argc, argv);

View File

@ -14,7 +14,7 @@
#include <limits.h> #include <limits.h>
#include <libgen.h> #include <libgen.h>
#include "win32.h" #include "mingw.h"
using namespace std; using namespace std;
@ -55,12 +55,7 @@ string get_tmp_dir()
tmp = getenv("TEMP"); tmp = getenv("TEMP");
} }
if (tmp == nullptr) { return tmp != nullptr ? string(tmp) + "/" : "/";
cerr << "Error: Cannot find temporary directory. Export TMP/TEMP variable.";
exit(EXIT_FAILURE);
}
return std::string(tmp) + "/";
} }
} // namespace pdf2htmlEX; } // namespace pdf2htmlEX;

View File

@ -5,8 +5,8 @@
* 2014.01.13 * 2014.01.13
*/ */
#ifndef WIN32_H__ #ifndef MINGW_H__
#define WIN32_H__ #define MINGW_H__
#ifdef __MINGW32__ #ifdef __MINGW32__
@ -24,5 +24,5 @@ namespace pdf2htmlEX {
#endif //__MINGW32__ #endif //__MINGW32__
#endif //WIN32_H__ #endif //MINGW_H__

View File

@ -11,7 +11,10 @@
#include <cstring> #include <cstring>
#include "path.h" #include "path.h"
#include "win32.h"
#ifdef __MINGW32__
#include "util/mingw.h"
#endif
using std::string; using std::string;