X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=tools%2Fviewgar.cpp;h=e16ff0f056be04befdd75c1f1b0534f67017ed55;hb=452e51c8a3b84c368ae3ba2e60dacbc1985e7b5c;hp=e90f20690e2edd2c715f4b10a55f1db6d3e22e0a;hpb=383d5eb3b0f0506810d9105a268f939125bfc347;p=ginac.git diff --git a/tools/viewgar.cpp b/tools/viewgar.cpp index e90f2069..e16ff0f0 100644 --- a/tools/viewgar.cpp +++ b/tools/viewgar.cpp @@ -3,7 +3,7 @@ * GiNaC archive file viewer. */ /* - * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2019 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 @@ -17,24 +17,22 @@ * * 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 -#include -#include -#include - #include "ginac.h" - -#ifndef NO_NAMESPACE_GINAC using namespace GiNaC; -#endif // ndef NO_NAMESPACE_GINAC + +#include +#include +#include +#include +using namespace std; 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; @@ -47,7 +45,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) {