formatting changes
This commit is contained in:
parent
fed917dd8e
commit
48cb87b8bd
3 changed files with 12 additions and 4 deletions
|
|
@ -171,7 +171,7 @@ void config_t::process_options(const std::string& command,
|
||||||
|
|
||||||
// Process remaining command-line arguments
|
// Process remaining command-line arguments
|
||||||
|
|
||||||
if (command != "e" && command != "w") {
|
if (command != "e") {
|
||||||
// Treat the remaining command-line arguments as regular
|
// Treat the remaining command-line arguments as regular
|
||||||
// expressions, used for refining report results.
|
// expressions, used for refining report results.
|
||||||
|
|
||||||
|
|
|
||||||
10
main.cc
10
main.cc
|
|
@ -323,6 +323,13 @@ int parse_and_report(int argc, char * argv[], char * envp[])
|
||||||
|
|
||||||
// process the command word and its following arguments
|
// process the command word and its following arguments
|
||||||
|
|
||||||
|
std::string first_arg;
|
||||||
|
if (command == "w") {
|
||||||
|
if (arg == args.end())
|
||||||
|
throw error("The 'output' command requires a file argument");
|
||||||
|
first_arg = *arg++;
|
||||||
|
}
|
||||||
|
|
||||||
config.process_options(command, arg, args.end());
|
config.process_options(command, arg, args.end());
|
||||||
|
|
||||||
std::auto_ptr<entry_t> new_entry;
|
std::auto_ptr<entry_t> new_entry;
|
||||||
|
|
@ -389,6 +396,7 @@ int parse_and_report(int argc, char * argv[], char * envp[])
|
||||||
// Compile the format strings
|
// Compile the format strings
|
||||||
|
|
||||||
const std::string * format;
|
const std::string * format;
|
||||||
|
|
||||||
if (! config.format_string.empty())
|
if (! config.format_string.empty())
|
||||||
format = &config.format_string;
|
format = &config.format_string;
|
||||||
else if (command == "b")
|
else if (command == "b")
|
||||||
|
|
@ -450,7 +458,7 @@ def vmax(d, val):\n\
|
||||||
formatter = new format_transactions(*out, *format);
|
formatter = new format_transactions(*out, *format);
|
||||||
|
|
||||||
if (command == "w") {
|
if (command == "w") {
|
||||||
write_textual_journal(*journal, *arg, *formatter, *out);
|
write_textual_journal(*journal, first_arg, *formatter, *out);
|
||||||
} else {
|
} else {
|
||||||
formatter = chain_xact_handlers(command, formatter, journal.get(),
|
formatter = chain_xact_handlers(command, formatter, journal.get(),
|
||||||
journal->master, formatter_ptrs);
|
journal->master, formatter_ptrs);
|
||||||
|
|
|
||||||
|
|
@ -646,8 +646,8 @@ void write_textual_journal(journal_t& journal, std::string path,
|
||||||
throw error(std::string("Journal does not refer to file '") +
|
throw error(std::string("Journal does not refer to file '") +
|
||||||
found + "'");
|
found + "'");
|
||||||
|
|
||||||
entries_list::iterator el = journal.entries.begin();
|
entries_list::iterator el = journal.entries.begin();
|
||||||
auto_entries_list::iterator al = journal.auto_entries.begin();
|
auto_entries_list::iterator al = journal.auto_entries.begin();
|
||||||
period_entries_list::iterator pl = journal.period_entries.begin();
|
period_entries_list::iterator pl = journal.period_entries.begin();
|
||||||
|
|
||||||
istream_pos_type pos = 0;
|
istream_pos_type pos = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue