summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/macro.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-08 00:25:58 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-08 00:25:58 +0000
commitd0650b984a9d22727429bceb1d51a3dfb8aa84ef (patch)
treefc2affc4477918b9935d69433c8a822fcfd5c3c6 /crawl-ref/source/macro.cc
parent12c06e3c2402f48325bf48d31e588af5ccab1c08 (diff)
downloadcrawl-ref-d0650b984a9d22727429bceb1d51a3dfb8aa84ef.tar.gz
crawl-ref-d0650b984a9d22727429bceb1d51a3dfb8aa84ef.zip
Save macro.txt and wininit.txt in the settings folder, both using the
macro_dir option. We might want to rename said option. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6447 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/macro.cc')
-rw-r--r--crawl-ref/source/macro.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/crawl-ref/source/macro.cc b/crawl-ref/source/macro.cc
index 5f2542bf39..712cd8c39d 100644
--- a/crawl-ref/source/macro.cc
+++ b/crawl-ref/source/macro.cc
@@ -158,7 +158,7 @@ static int userfunc_getindex(const std::string &fname)
return (i);
}
- // Pass 2 to hunt for gaps
+ // Pass 2 to hunt for gaps.
for (int i = 0, count = userfunctions.size(); i < count; ++i)
{
if (userfunctions[i].empty())
@@ -172,14 +172,11 @@ static int userfunc_getindex(const std::string &fname)
return (userfunctions.size() - 1);
}
-/*
- * Returns the name of the file that contains macros.
- */
+// Returns the name of the file that contains macros.
static std::string get_macro_file()
{
- std::string dir =
- !Options.macro_dir.empty()? Options.macro_dir :
- !SysEnv.crawl_dir.empty()? SysEnv.crawl_dir : "";
+ std::string dir = !Options.macro_dir.empty() ? Options.macro_dir :
+ !SysEnv.crawl_dir.empty() ? SysEnv.crawl_dir : "";
if (!dir.empty())
{