[Lemon-commits] Janos Tapolcai: Compilation bug fixed in graph_t...
Lemon HG
hg at lemon.cs.elte.hu
Wed Feb 11 08:04:39 CET 2009
details: http://lemon.cs.elte.hu/hg/lemon/rev/70aa52d30f13
changeset: 511:70aa52d30f13
user: Janos Tapolcai <tapolcai [at] tmit.bme.hu>
date: Tue Feb 10 15:43:39 2009 +0100
description:
Compilation bug fixed in graph_to_eps.h with VS2005 (#214)
diffstat:
1 file changed, 17 insertions(+), 5 deletions(-)
lemon/graph_to_eps.h | 22 +++++++++++++++++-----
diffs (39 lines):
diff --git a/lemon/graph_to_eps.h b/lemon/graph_to_eps.h
--- a/lemon/graph_to_eps.h
+++ b/lemon/graph_to_eps.h
@@ -688,18 +688,30 @@
os << "%%CreationDate: " << cbuf;
#else
SYSTEMTIME time;
- char buf1[11], buf2[9], buf3[5];
-
GetSystemTime(&time);
+#if defined(_MSC_VER) && (_MSC_VER < 1500)
+ LPWSTR buf1, buf2, buf3;
if (GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
- "ddd MMM dd", buf1, 11) &&
+ L"ddd MMM dd", buf1, 11) &&
GetTimeFormat(LOCALE_USER_DEFAULT, 0, &time,
- "HH':'mm':'ss", buf2, 9) &&
+ L"HH':'mm':'ss", buf2, 9) &&
GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
- "yyyy", buf3, 5)) {
+ L"yyyy", buf3, 5)) {
os << "%%CreationDate: " << buf1 << ' '
<< buf2 << ' ' << buf3 << std::endl;
}
+#else
+ char buf1[11], buf2[9], buf3[5];
+ if (GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
+ "ddd MMM dd", buf1, 11) &&
+ GetTimeFormat(LOCALE_USER_DEFAULT, 0, &time,
+ "HH':'mm':'ss", buf2, 9) &&
+ GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
+ "yyyy", buf3, 5)) {
+ os << "%%CreationDate: " << buf1 << ' '
+ << buf2 << ' ' << buf3 << std::endl;
+ }
+#endif
#endif
}
More information about the Lemon-commits
mailing list