X-Git-Url: http://www.andromeda.nl/gitweb/?a=blobdiff_plain;f=account.cpp;fp=account.cpp;h=171caaaeba65dbdcf67cf41418dea886cc80910b;hb=bf570fc52a567a6715e48324da8631f86e6786a0;hp=1ccb4f86ac703129c2e3cbc14041ba75df742631;hpb=d456985f41a3a84e1f16341b1ff12c50b28e9bee;p=account.git diff --git a/account.cpp b/account.cpp index 1ccb4f8..171caaa 100644 --- a/account.cpp +++ b/account.cpp @@ -58,7 +58,6 @@ std::ostream &operator<<(std::ostream &s, amount a) s << " "; else { - //s << form("%8d.%02d",a / 100, a % 100); s << std::setw(8) << std::setfill(' ') << a / 100 << "."; s << std::setw(2) << std::setfill('0') << a % 100; s << std::setw(0) << std::setfill(' '); @@ -91,11 +90,7 @@ std::ostream &operator<<(std::ostream &s, balance b) std::istream &operator>>(std::istream &s, Booking &b) { - char cmnt[128]; - s >> b.Bnumber >> b.booked; - //s.get(cmnt, 128); - //b.comment = cmnt; s >> b.comment; return s; @@ -103,8 +98,6 @@ std::istream &operator>>(std::istream &s, Booking &b) std::ostream &operator<<(std::ostream &s, Booking &b) { - //s << form("#%03d ",b.Bnumber) << b.booked << " " << b.comment; - //s << form("%.*s", 58 - ~b.comment, " "); s << "#" << std::setw(4) << std::setfill('0') << b.Bnumber; s << std::setw(0) << std::setfill(' '); s << " " << b.booked << " "; @@ -118,7 +111,6 @@ std::istream &operator>>(std::istream &s, Mutation &m) { int nr_blanks = 0; char c; - char buf[128]; while (s.get(c), c == ' ') nr_blanks++; @@ -127,10 +119,6 @@ std::istream &operator>>(std::istream &s, Mutation &m) s >> m.account; amount a; - //s.get(buf, 128); - - //std::istringstream amnt(buf+strlen(buf)-10); - //amnt >> a; String amnt; int p; @@ -171,7 +159,7 @@ std::ostream &operator<<(std::ostream &s, Mutation &m) std::istream &operator>>(std::istream &s, Account &acc) { - char kind, name[128]; + char kind; s >> acc.Anumber >> kind >> std::ws; if (kind == 'B') @@ -179,9 +167,6 @@ std::istream &operator>>(std::istream &s, Account &acc) else acc.kind = COST; - //s.get(name, 128); - //acc.name = name; - s >> acc.name; return s; @@ -191,7 +176,6 @@ std::ostream &operator<<(std::ostream &s, Account &acc) { s << acc.Anumber << " " << std::setw(44) << std::left << acc.name; s << std::setw(0) << std::right << " "; - //s << form("%.*s", 45 - ~acc.name, " "); s << acc.Bal; return s; @@ -516,23 +500,11 @@ void Account::Postscript_sheet(PostScript &ps) y -= 10; row++; - //s << b[B] << "|" << balance(m[M]) << " |\n"; } } /* Print the footer with the totals */ -#if 0 - s << " SALDO "; - s << " |" << -~total << " |\n"; - s << "----------------------------------------------------------------"; - s << "-----------+-------------+-----------+\n"; - total += -~total; - s << " TOTAAL "; - s << " |" << total << " |\n"; - s << "----------------------------------------------------------------"; - s << "-----------+-------------+-----------+\n"; -#endif if (page_started) {