summaryrefslogtreecommitdiff
path: root/main.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-18 02:15:31 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-18 02:15:31 -0400
commit8af33274fbb9cf0c9a4a452b77825ab6e519cf8d (patch)
tree20cade7c1ab8986db969a17e823168829b97c3f7 /main.cc
parent9d1bdd0989996318825a458e01b7b0eb5f48397f (diff)
downloadfork-ledger-8af33274fbb9cf0c9a4a452b77825ab6e519cf8d.tar.gz
fork-ledger-8af33274fbb9cf0c9a4a452b77825ab6e519cf8d.tar.bz2
fork-ledger-8af33274fbb9cf0c9a4a452b77825ab6e519cf8d.zip
more time interval support: last month, last feb, next year, etc.
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc58
1 files changed, 29 insertions, 29 deletions
diff --git a/main.cc b/main.cc
index 6e0bb524..82a739c8 100644
--- a/main.cc
+++ b/main.cc
@@ -365,35 +365,6 @@ int main(int argc, char * argv[], char * envp[])
show_all_related = true;
}
- // Compile the format strings
-
- const char * f;
- if (! config->format_string.empty())
- f = config->format_string.c_str();
- else if (command == "b")
- f = bal_fmt.c_str();
- else if (command == "r")
- f = reg_fmt.c_str();
- else if (command == "E")
- f = equity_fmt.c_str();
- else
- f = print_fmt.c_str();
-
- std::string first_line_format;
- std::string next_lines_format;
-
- if (const char * p = std::strstr(f, "%/")) {
- first_line_format = std::string(f, 0, p - f);
- next_lines_format = std::string(p + 2);
- } else {
- first_line_format = next_lines_format = f;
- }
-
- format_t format(first_line_format);
- format_t nformat(next_lines_format);
-
- TIMER_STOP(handle_options);
-
// Setup a few local and global variables, depending on the config
// settings.
@@ -453,6 +424,35 @@ int main(int argc, char * argv[], char * envp[])
"disp-pred: " << config->display_predicate);
#endif
+ // Compile the format strings
+
+ const char * f;
+ if (! config->format_string.empty())
+ f = config->format_string.c_str();
+ else if (command == "b")
+ f = bal_fmt.c_str();
+ else if (command == "r")
+ f = reg_fmt.c_str();
+ else if (command == "E")
+ f = equity_fmt.c_str();
+ else
+ f = print_fmt.c_str();
+
+ std::string first_line_format;
+ std::string next_lines_format;
+
+ if (const char * p = std::strstr(f, "%/")) {
+ first_line_format = std::string(f, 0, p - f);
+ next_lines_format = std::string(p + 2);
+ } else {
+ first_line_format = next_lines_format = f;
+ }
+
+ format_t format(first_line_format);
+ format_t nformat(next_lines_format);
+
+ TIMER_STOP(handle_options);
+
// Walk the entries based on the report type and the options
TIMER_START(report_gen);