1.1 --- a/lemon/graph_to_eps.h Tue Feb 10 17:21:26 2009 +0000
1.2 +++ b/lemon/graph_to_eps.h Mon Feb 16 15:03:32 2009 +0000
1.3 @@ -29,13 +29,7 @@
1.4 #include<sys/time.h>
1.5 #include<ctime>
1.6 #else
1.7 -#ifndef WIN32_LEAN_AND_MEAN
1.8 -#define WIN32_LEAN_AND_MEAN
1.9 -#endif
1.10 -#ifndef NOMINMAX
1.11 -#define NOMINMAX
1.12 -#endif
1.13 -#include<windows.h>
1.14 +#include<lemon/bits/windows.h>
1.15 #endif
1.16
1.17 #include<lemon/math.h>
1.18 @@ -683,41 +677,19 @@
1.19 os << "%%Creator: LEMON, graphToEps()\n";
1.20
1.21 {
1.22 + os << "%%CreationDate: ";
1.23 #ifndef WIN32
1.24 timeval tv;
1.25 gettimeofday(&tv, 0);
1.26
1.27 char cbuf[26];
1.28 ctime_r(&tv.tv_sec,cbuf);
1.29 - os << "%%CreationDate: " << cbuf;
1.30 + os << cbuf;
1.31 #else
1.32 - SYSTEMTIME time;
1.33 - GetSystemTime(&time);
1.34 -#if defined(_MSC_VER) && (_MSC_VER < 1500)
1.35 - LPWSTR buf1, buf2, buf3;
1.36 - if (GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
1.37 - L"ddd MMM dd", buf1, 11) &&
1.38 - GetTimeFormat(LOCALE_USER_DEFAULT, 0, &time,
1.39 - L"HH':'mm':'ss", buf2, 9) &&
1.40 - GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
1.41 - L"yyyy", buf3, 5)) {
1.42 - os << "%%CreationDate: " << buf1 << ' '
1.43 - << buf2 << ' ' << buf3 << std::endl;
1.44 - }
1.45 -#else
1.46 - char buf1[11], buf2[9], buf3[5];
1.47 - if (GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
1.48 - "ddd MMM dd", buf1, 11) &&
1.49 - GetTimeFormat(LOCALE_USER_DEFAULT, 0, &time,
1.50 - "HH':'mm':'ss", buf2, 9) &&
1.51 - GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
1.52 - "yyyy", buf3, 5)) {
1.53 - os << "%%CreationDate: " << buf1 << ' '
1.54 - << buf2 << ' ' << buf3 << std::endl;
1.55 - }
1.56 -#endif
1.57 + os << bits::getWinFormattedDate();
1.58 #endif
1.59 }
1.60 + os << std::endl;
1.61
1.62 if (_autoArcWidthScale) {
1.63 double max_w=0;