]> www.ginac.de Git - ginac.git/blobdiff - tools/viewgar.cpp
parser: change order of the constructor optional arguments.
[ginac.git] / tools / viewgar.cpp
index 19f27df149762da615bcf25a5743feca05015f1e..c2d484ca9daf32ad3c9528ccf46fb51bf438a57f 100644 (file)
@@ -3,7 +3,7 @@
  *  GiNaC archive file viewer. */
 
 /*
- *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdlib>
+#include <iostream>
 #include <fstream>
 #include <stdexcept>
 
 #include "ginac.h"
 
+using namespace std;
 using namespace GiNaC;
 
 int main(int argc, char **argv)
 {
        if (argc < 2) {
-               fprintf(stderr, "Usage: %s [-d] file...\n", argv[0]);
+               cerr << "Usage: " << argv[0] << " [-d] file..." << endl;
                exit(1);
        }
        --argc; ++argv;
@@ -45,7 +46,7 @@ int main(int argc, char **argv)
                                dump_mode = true;
                                --argc; ++argv;
                        }
-                       std::ifstream f(*argv);
+                       std::ifstream f(*argv, std::ios_base::binary);
                        archive ar;
                        f >> ar;
                        if (dump_mode) {