Code cleanup
[account.git] / account.cpp
index 1ccb4f8..171caaa 100644 (file)
@@ -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)
    {