(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.
This commit is contained in:
John Wiegley 2005-01-14 23:19:55 +00:00
parent fdac1f14e9
commit b697424b44

View file

@ -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';