summaryrefslogtreecommitdiff
path: root/main.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2003-09-30 03:22:38 +0000
committerJohn Wiegley <johnw@newartisans.com>2003-09-30 03:22:38 +0000
commitef6161fefb09253b9de6d228c92ce41b3a0063dc (patch)
tree513811f9b3aad8617d8795b4715c8448fb26afab /main.cc
parent7bf86bc48a564ffffa46461c15ae2ab34b258fe8 (diff)
downloadfork-ledger-ef6161fefb09253b9de6d228c92ce41b3a0063dc.tar.gz
fork-ledger-ef6161fefb09253b9de6d228c92ce41b3a0063dc.tar.bz2
fork-ledger-ef6161fefb09253b9de6d228c92ce41b3a0063dc.zip
*** empty log message ***
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/main.cc b/main.cc
index 29fdcaa2..00d900d2 100644
--- a/main.cc
+++ b/main.cc
@@ -13,7 +13,7 @@ namespace ledger {
extern bool parse_ledger(std::istream& in);
extern bool parse_gnucash(std::istream& in);
- extern void report_balances(int argc, char *argv[], std::ostream& out);
+ extern void report_balances(int argc, char **argv, std::ostream& out);
extern void print_ledger(int argc, char *argv[], std::ostream& out);
}
@@ -35,15 +35,16 @@ int main(int argc, char *argv[])
{
// Global defaults
- commodity_usd = new commodity("$", true, false, 2);
- commodities.insert(commodities_entry("USD", commodity_usd));
+ commodity * usd = new commodity("$", true, false, true, false, 2);
+ commodities.insert(commodities_entry("USD", usd));
// Parse the command-line options
int c;
- while (-1 != (c = getopt(argc, argv, "+h"))) {
+ while (-1 != (c = getopt(argc, argv, "+hw"))) {
switch (char(c)) {
case 'h': show_help(std::cout); break;
+ case 'w': use_warnings = true; break;
}
}