X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tools%2Fif-1.cpp;h=8ed8ecf30df5c58bf35daa68e0dd6827de4b55d0;hb=f6ae4b01689de559227ef1782115b1c5a79d9f45;hp=a069219b312faab46535104ce81e62c4715ef191;hpb=1fd4f7cc977b9f1499716de10d15656bd50f4816;p=ctsim.git diff --git a/tools/if-1.cpp b/tools/if-1.cpp index a069219..8ed8ecf 100644 --- a/tools/if-1.cpp +++ b/tools/if-1.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: if-1.cpp,v 1.1 2000/07/13 07:01:35 kevin Exp $ +** $Id: if-1.cpp,v 1.5 2000/12/17 23:30:48 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -46,20 +46,22 @@ static struct option my_options[] = {0, 0, 0, 0} }; +static const char* g_szIdStr = "$Id: if-1.cpp,v 1.5 2000/12/17 23:30:48 kevin Exp $"; + void if1_usage (const char *program) { - cout << "usage: " << fileBasename(program) << " infile outfile [OPTIONS]" << endl; - cout << "Generate a IF file from a IF file" << endl; - cout << endl; - cout << " --invert Invert image" << endl; - cout << " --log Natural logrithm of image" << endl; - cout << " --exp Natural exponential of image" << endl; - cout << " --sqr Square of image" << endl; - cout << " --sqrt Square root of image" << endl; - cout << " --verbose Verbose modem" << endl; - cout << " --version Print version" << endl; - cout << " --help Print this help message" << endl; + std::cout << "usage: " << fileBasename(program) << " infile outfile [OPTIONS]" << std::endl; + std::cout << "Generate a IF file from a IF file" << std::endl; + std::cout << std::endl; + std::cout << " --invert Invert image" << std::endl; + std::cout << " --log Natural logrithm of image" << std::endl; + std::cout << " --exp Natural exponential of image" << std::endl; + std::cout << " --sqr Square of image" << std::endl; + std::cout << " --sqrt Square root of image" << std::endl; + std::cout << " --verbose Verbose modem" << std::endl; + std::cout << " --version Print version" << std::endl; + std::cout << " --help Print this help message" << std::endl; } int @@ -105,9 +107,9 @@ if1_main (int argc, char *const argv[]) break; case O_VERSION: #ifdef VERSION - cout << "Version " << VERSION << endl; + std::cout << "Version " << VERSION << std::endl << g_szIdStr << std::endl; #else - cout << "Unknown version number" << endl; + std::cout << "Unknown version number" << std::endl; #endif return (0); case O_HELP: @@ -130,7 +132,7 @@ if1_main (int argc, char *const argv[]) out_file = argv[optind + 1]; - string histString; + std::string histString; if (opt_invert || opt_log || opt_exp || opt_sqr || opt_sqrt) { int ix, iy; @@ -192,9 +194,9 @@ main (int argc, char *const argv[]) try { retval = if1_main(argc, argv); } catch (exception e) { - cerr << "Exception: " << e.what() << endl; + std::cerr << "Exception: " << e.what() << std::endl; } catch (...) { - cerr << "Unknown exception" << endl; + std::cerr << "Unknown exception" << std::endl; } return (retval);