diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-06 08:31:27 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-06 08:33:00 +0100 |
commit | b86a0edcfcf1e7d33694d745d35209901d2a5926 (patch) | |
tree | 395db5484f220f0c9a82b9fc29c36f38ba63b696 | |
parent | 4e225eea73f87fc01251691390a65436c30baf22 (diff) | |
download | crawl-ref-b86a0edcfcf1e7d33694d745d35209901d2a5926.tar.gz crawl-ref-b86a0edcfcf1e7d33694d745d35209901d2a5926.zip |
Make timestamp in crash dumps readable.
-rw-r--r-- | crawl-ref/source/crash-u.cc | 5 | ||||
-rw-r--r-- | crawl-ref/source/debug.cc | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/crash-u.cc b/crawl-ref/source/crash-u.cc index 2e74fc2f31..a0bcb67771 100644 --- a/crawl-ref/source/crash-u.cc +++ b/crawl-ref/source/crash-u.cc @@ -53,6 +53,7 @@ template <typename TO, typename FROM> TO nasty_cast(FROM f) { #include "externs.h" #include "options.h" #include "state.h" +#include "stuff.h" #include "initfile.h" ///////////////////////////////////////////////////////////////////////////// @@ -81,8 +82,8 @@ static void _crash_signal_handler(int sig_num) char name[180]; - sprintf(name, "%scrash-recursive-%s-%d.txt", dir.c_str(), - you.your_name.c_str(), (int) time(NULL)); + sprintf(name, "%scrash-recursive-%s-%s.txt", dir.c_str(), + you.your_name.c_str(), make_file_time(time(NULL)).c_str()); FILE* file = fopen(name, "w"); diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index 90ae37f211..7d8b879ad3 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -6475,8 +6475,8 @@ void do_crash_dump() char name[180]; - sprintf(name, "%scrash-%s-%d.txt", dir.c_str(), - you.your_name.c_str(), (int) time(NULL)); + sprintf(name, "%scrash-%s-%s.txt", dir.c_str(), + you.your_name.c_str(), make_file_time(time(NULL)).c_str()); fprintf(stderr, EOL "Writing crash info to %s" EOL, name); errno = 0; |