Added -macro option to specify location of macro file. Morgue files are named morgue-<cname>-<time>.txt, provided Crawl is compiled without SHORT_FILE_NAMES.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@637 c06c8d41-db1a-0410-9941-cceddc491573
GSQ72ULBSL6WBJZUB3GJKAPQDXZIQV7B2TDBA5OP2WVGHVJMCQFQC
static std::string morgue_name()
{
#ifdef SHORT_FILE_NAMES
return "morgue";
#else // !SHORT_FILE_NAMES
std::string name = "morgue-" + std::string(you.your_name);
time_t when_crawl_got_even = time(NULL);
if (tm *loc = localtime(&when_crawl_got_even))
{
char buf[25];
snprintf(buf, sizeof buf, "-%04d%02d%02d-%02d%02d",
loc->tm_year + 1900,
loc->tm_mon + 1,
loc->tm_mday,
loc->tm_hour,
loc->tm_min);
name += buf;
}
return (name);
#endif // SHORT_FILE_NAMES
}