formatting changes

This commit is contained in:
John Wiegley 2005-02-16 20:51:51 +00:00
parent fed917dd8e
commit 48cb87b8bd
3 changed files with 12 additions and 4 deletions

View file

@ -171,7 +171,7 @@ void config_t::process_options(const std::string& command,
// Process remaining command-line arguments
if (command != "e" && command != "w") {
if (command != "e") {
// Treat the remaining command-line arguments as regular
// expressions, used for refining report results.

10
main.cc
View file

@ -323,6 +323,13 @@ int parse_and_report(int argc, char * argv[], char * envp[])
// 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());
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
const std::string * format;
if (! config.format_string.empty())
format = &config.format_string;
else if (command == "b")
@ -450,7 +458,7 @@ def vmax(d, val):\n\
formatter = new format_transactions(*out, *format);
if (command == "w") {
write_textual_journal(*journal, *arg, *formatter, *out);
write_textual_journal(*journal, first_arg, *formatter, *out);
} else {
formatter = chain_xact_handlers(command, formatter, journal.get(),
journal->master, formatter_ptrs);

View file

@ -646,8 +646,8 @@ void write_textual_journal(journal_t& journal, std::string path,
throw error(std::string("Journal does not refer to file '") +
found + "'");
entries_list::iterator el = journal.entries.begin();
auto_entries_list::iterator al = journal.auto_entries.begin();
entries_list::iterator el = journal.entries.begin();
auto_entries_list::iterator al = journal.auto_entries.begin();
period_entries_list::iterator pl = journal.period_entries.begin();
istream_pos_type pos = 0;