summaryrefslogtreecommitdiff
path: root/src/global.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-07 04:26:30 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-07 04:26:30 -0400
commiteb98e0da8b095634ae779b5b1f3c234d24cccde2 (patch)
tree0ae0bc269b90f47f0e74432c6363dd84baf41d50 /src/global.cc
parent17c7037da9ee345c02ad8db89d976fb6c122a7d7 (diff)
downloadfork-ledger-eb98e0da8b095634ae779b5b1f3c234d24cccde2.tar.gz
fork-ledger-eb98e0da8b095634ae779b5b1f3c234d24cccde2.tar.bz2
fork-ledger-eb98e0da8b095634ae779b5b1f3c234d24cccde2.zip
More revision to the way options are handled; reworked CSV command.
Diffstat (limited to 'src/global.cc')
-rw-r--r--src/global.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/global.cc b/src/global.cc
index 14fb3c29..497dc397 100644
--- a/src/global.cc
+++ b/src/global.cc
@@ -102,8 +102,8 @@ void global_scope_t::read_journal_files()
INFO_START(journal, "Read journal file");
string master_account;
- if (report().HANDLED(account_))
- master_account = report().HANDLER(account_).str();
+ if (session().HANDLED(account_))
+ master_account = session().HANDLER(account_).str();
std::size_t count = session().read_data(*session().create_journal(),
master_account);
@@ -269,8 +269,10 @@ expr_t::ptr_op_t global_scope_t::lookup(const string& name)
if (WANT_PRECMD()) { p += PRECMD_PREFIX_LEN;
switch (*p) {
case 'p':
- M_COMMAND(global_scope_t, push);
- else M_COMMAND(global_scope_t, pop);
+ if (is_eq(p, "push"))
+ MAKE_FUNCTOR(global_scope_t::push_command);
+ else if (is_eq(p, "pop"))
+ MAKE_FUNCTOR(global_scope_t::pop_command);
break;
}
}
@@ -279,7 +281,7 @@ expr_t::ptr_op_t global_scope_t::lookup(const string& name)
// If you're wondering how symbols from report() will be found, it's
// because of the bind_scope_t object in execute_command() below.
- return expr_t::ptr_op_t();
+ return NULL;
}
void global_scope_t::read_environment_settings(char * envp[])