summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/macro.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-15 11:26:00 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-15 11:26:00 +0000
commitdd6871b0fbac350ea175d88e5b2bc340a5fb6e30 (patch)
treea5d03236d042f9c52c095304f74a323452d82778 /crawl-ref/source/macro.cc
parent80ff6b26122857839ec18211fae01b734618fd34 (diff)
downloadcrawl-ref-dd6871b0fbac350ea175d88e5b2bc340a5fb6e30.tar.gz
crawl-ref-dd6871b0fbac350ea175d88e5b2bc340a5fb6e30.zip
Added -morgue option to specify where morgues are saved.
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
Diffstat (limited to 'crawl-ref/source/macro.cc')
-rw-r--r--crawl-ref/source/macro.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/crawl-ref/source/macro.cc b/crawl-ref/source/macro.cc
index ed03525f9f..9a80fe032a 100644
--- a/crawl-ref/source/macro.cc
+++ b/crawl-ref/source/macro.cc
@@ -170,11 +170,10 @@ static int userfunc_getindex(const std::string &fname)
*/
static std::string get_macro_file()
{
- std::string s;
-
- if (SysEnv.crawl_dir)
- s = SysEnv.crawl_dir;
+ if (SysEnv.macro_file.length())
+ return (SysEnv.macro_file);
+ std::string s = SysEnv.crawl_dir? SysEnv.crawl_dir : "";
return (s + "macro.txt");
}