diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-23 18:23:31 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-23 18:23:31 -0400 |
commit | 73e2abd1b2e2bacbd353999a7b3edd95a04112c4 (patch) | |
tree | 4ae4a6a5355913345877b593bcc530f001660b26 /main.cc | |
parent | 632a37034a4d3a3cc2ad2bb786709c2497c5c97f (diff) | |
download | fork-ledger-73e2abd1b2e2bacbd353999a7b3edd95a04112c4.tar.gz fork-ledger-73e2abd1b2e2bacbd353999a7b3edd95a04112c4.tar.bz2 fork-ledger-73e2abd1b2e2bacbd353999a7b3edd95a04112c4.zip |
a little cleanup; reversed the meaning of -z and -p (to be more mnemonic)
Diffstat (limited to 'main.cc')
-rw-r--r-- | main.cc | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -500,8 +500,9 @@ int main(int argc, char * argv[], char * envp[]) // filter_transactions will only pass through transactions // matching the `display_predicate'. - formatter.reset(new filter_transactions(formatter.release(), - config->display_predicate)); + if (! config->display_predicate.empty()) + formatter.reset(new filter_transactions(formatter.release(), + config->display_predicate)); // calc_transactions computes the running total. When this // appears will determine, for example, whether filtered @@ -560,8 +561,9 @@ int main(int argc, char * argv[], char * envp[]) // This filter_transactions will only pass through transactions // matching the `predicate'. - formatter.reset(new filter_transactions(formatter.release(), - config->predicate)); + if (! config->predicate.empty()) + formatter.reset(new filter_transactions(formatter.release(), + config->predicate)); // Once the filters are chained, walk `journal's entries and start // feeding each transaction that matches `predicate' to the chain. |