From b697424b440d72fa3bf6b5533eb814f9f02bf452 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 14 Jan 2005 23:19:55 +0000 Subject: (parse): Added "D" directive to ledger files, which allows the user to specify which commodity is used for the default when none is specified or calculated by the "entry" command. --- textual.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'textual.cc') diff --git a/textual.cc b/textual.cc index 33b7971b..c15b7701 100644 --- a/textual.cc +++ b/textual.cc @@ -389,6 +389,11 @@ unsigned int textual_parser_t::parse(std::istream& in, break; #endif // TIMELOG_SUPPORT + case 'D': // a default commodity for "entry" + commodity_t::default_commodity = + commodity_t::find_commodity(skip_ws(line + 1), true); + break; + case 'C': // a set of conversions if (char * p = std::strchr(line + 1, '=')) { *p++ = '\0'; -- cgit v1.2.3