summaryrefslogtreecommitdiff
path: root/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc37
1 files changed, 1 insertions, 36 deletions
diff --git a/main.cc b/main.cc
index 69efce73..9ce6fa0d 100644
--- a/main.cc
+++ b/main.cc
@@ -1,22 +1,5 @@
-#include "journal.h"
-#include "parser.h"
-#include "textual.h"
-#include "binary.h"
-#include "qif.h"
+#include <ledger.h>
#include "acconf.h"
-#ifdef READ_GNUCASH
-#include "gnucash.h"
-#endif
-#include "valexpr.h"
-#include "format.h"
-#include "walk.h"
-#include "quotes.h"
-#include "derive.h"
-#include "option.h"
-#include "config.h"
-#include "debug.h"
-#include "timing.h"
-#include "error.h"
using namespace ledger;
@@ -31,12 +14,6 @@ using namespace ledger;
#include <cstring>
#include <ctime>
-namespace {
- TIMER_DEF(write_cache, "writing cache file");
- TIMER_DEF(report_gen, "generation of final report");
- TIMER_DEF(process_opts, "processing args and environment");
-}
-
#if !defined(DEBUG_LEVEL) || DEBUG_LEVEL <= RELEASE
#define auto_ptr bogus_auto_ptr
@@ -166,8 +143,6 @@ int parse_and_report(int argc, char * argv[], char * envp[])
// Parse command-line arguments, and those set in the environment
- TIMER_START(process_opts);
-
std::list<std::string> args;
process_arguments(config_options, argc - 1, argv + 1, false, args);
@@ -195,8 +170,6 @@ int parse_and_report(int argc, char * argv[], char * envp[])
if (config.data_file == config.cache_file)
config.use_cache = false;
- TIMER_STOP(process_opts);
-
// Read the command word, canonicalize it to its one letter form,
// then configure the system based on the kind of report to be
// generated
@@ -247,8 +220,6 @@ int parse_and_report(int argc, char * argv[], char * envp[])
// Configure the output stream
- TIMER_START(report_gen);
-
std::ostream * out = &std::cout;
if (! config.output_file.empty()) {
if (access(config.output_file.c_str(), W_OK) == -1)
@@ -330,12 +301,8 @@ int parse_and_report(int argc, char * argv[], char * envp[])
delete *i;
#endif
- TIMER_STOP(report_gen);
-
// Write out the binary cache, if need be
- TIMER_START(write_cache);
-
if (config.use_cache && config.cache_dirty &&
! config.cache_file.empty()) {
if (access(config.cache_file.c_str(), W_OK) == -1) {
@@ -347,8 +314,6 @@ int parse_and_report(int argc, char * argv[], char * envp[])
}
}
- TIMER_STOP(write_cache);
-
return 0;
}