summaryrefslogtreecommitdiff
path: root/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-26 10:10:16 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-26 10:10:16 -0400
commit00ca034e737c4ae7d2cd3e4df5e61e492e288e46 (patch)
tree37506da4ff612439a809334cf1c9a210a550f91f /textual.cc
parent910f16509699ec6afd51d228d2689aabe8fc1256 (diff)
parent37cf3c6f6e54de338a5d16e0ff7a62754533fe22 (diff)
downloadfork-ledger-00ca034e737c4ae7d2cd3e4df5e61e492e288e46.tar.gz
fork-ledger-00ca034e737c4ae7d2cd3e4df5e61e492e288e46.tar.bz2
fork-ledger-00ca034e737c4ae7d2cd3e4df5e61e492e288e46.zip
Merge branch git://github.com/levindu/ledger.git 'master' into v2.6.1b
Conflicts: Makefile.am
Diffstat (limited to 'textual.cc')
-rw-r--r--textual.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/textual.cc b/textual.cc
index 4e011189..4e2d857a 100644
--- a/textual.cc
+++ b/textual.cc
@@ -432,7 +432,7 @@ entry_t * parse_entry(std::istream& in, char * line, account_t * master,
TIMER_START(entry_xacts);
unsigned long end_pos;
- unsigned long beg_line = linenum;
+ unsigned long beg_line;
while (! in.eof() && (in.peek() == ' ' || in.peek() == '\t')) {
unsigned long beg_pos = (unsigned long)in.tellg();
@@ -447,6 +447,7 @@ entry_t * parse_entry(std::istream& in, char * line, account_t * master,
line[--len] = '\0';
end_pos = beg_pos + len + 1;
+ beg_line = linenum;
linenum++;
if (line[0] == ' ' || line[0] == '\t') {
@@ -621,7 +622,7 @@ unsigned int textual_parser_t::parse(std::istream& in,
unsigned long beg_pos = in.tellg();
unsigned long end_pos;
- unsigned long beg_line = linenum;
+ unsigned long beg_line;
while (in.good() && ! in.eof()) {
try {
@@ -634,6 +635,7 @@ unsigned int textual_parser_t::parse(std::istream& in,
line[--len] = '\0';
end_pos = beg_pos + len + 1;
+ beg_line = linenum;
linenum++;
switch (line[0]) {
@@ -874,7 +876,6 @@ unsigned int textual_parser_t::parse(std::istream& in,
}
default: {
- unsigned int first_line = linenum;
unsigned long pos = beg_pos;
if (entry_t * entry =
parse_entry(in, line, account_stack.front(), *this, pos)) {