summaryrefslogtreecommitdiffstats
path: root/src/skel
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-11-14 15:46:12 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2020-11-17 22:33:45 +0100
commitc6f53d25b020fe8d70bd4831156b787eec1633ae (patch)
treea7f084fa9ca918fa9569c14fc8b771ea455e61ff /src/skel
parentcar AI revision (diff)
downloadre3-c6f53d25b020fe8d70bd4831156b787eec1633ae.tar
re3-c6f53d25b020fe8d70bd4831156b787eec1633ae.tar.gz
re3-c6f53d25b020fe8d70bd4831156b787eec1633ae.tar.bz2
re3-c6f53d25b020fe8d70bd4831156b787eec1633ae.tar.lz
re3-c6f53d25b020fe8d70bd4831156b787eec1633ae.tar.xz
re3-c6f53d25b020fe8d70bd4831156b787eec1633ae.tar.zst
re3-c6f53d25b020fe8d70bd4831156b787eec1633ae.zip
Diffstat (limited to 'src/skel')
-rw-r--r--src/skel/crossplatform.cpp14
-rw-r--r--src/skel/crossplatform.h4
2 files changed, 18 insertions, 0 deletions
diff --git a/src/skel/crossplatform.cpp b/src/skel/crossplatform.cpp
index 4b7d3d9a..37c94cb4 100644
--- a/src/skel/crossplatform.cpp
+++ b/src/skel/crossplatform.cpp
@@ -256,3 +256,17 @@ char* casepath(char const* path, bool checkPathFirst)
return out;
}
#endif
+
+#if !defined(_MSC_VER) && !defined(__CWCC__)
+char *strdate(char *buf) {
+ time_t timestamp;
+ time(&timestamp);
+ tm *localTm = localtime(&timestamp);
+ strftime(buf, 10, "%m/%d/%y", localTm);
+ return buf;
+}
+
+char *_strdate(char *buf) {
+ return strdate(buf);
+}
+#endif
diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h
index 1635781b..fe1f22fd 100644
--- a/src/skel/crossplatform.h
+++ b/src/skel/crossplatform.h
@@ -12,6 +12,10 @@ enum eWinVersion
OS_WINXP,
};
+#if !defined(_MSC_VER) && !defined(__CWCC__)
+char *_strdate(char *buf);
+#endif
+
#ifdef _WIN32
// As long as WITHWINDOWS isn't defined / <Windows.h> isn't included, we only need type definitions so let's include <IntSafe.h>.