r97: Converted Scanner and Projections to C++
[ctsim.git] / src / ifinfo.cpp
index 7c771f75d9fd2f85a944c7282fdbe33614a040e3..a054f2a989d6d397e47fa31df246bbff2dab7629 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ifinfo.cpp,v 1.6 2000/06/13 16:20:31 kevin Exp $
+**  $Id: ifinfo.cpp,v 1.7 2000/06/17 20:12:15 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
 **
 **  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
@@ -142,17 +142,16 @@ ifinfo_main (int argc, char *const argv[])
            Array2dFileLabel label;
            im->labelRead (label, i);
 
            Array2dFileLabel label;
            im->labelRead (label, i);
 
-           string str;
-           label.getDateString (str);
-
            if (label.getLabelType() == Array2dFileLabel::L_HISTORY) {
            if (label.getLabelType() == Array2dFileLabel::L_HISTORY) {
-             cout << "History: " << label.getLabelString() << endl;
+             cout << "History: " << endl;
+             cout << "  " << label.getLabelString() << endl;
              cout << "  calc time = " << label.getCalcTime() << " secs" << endl;
              cout << "  calc time = " << label.getCalcTime() << " secs" << endl;
-             cout << "  Timestamp = " << str << endl;
+             cout << "  Timestamp = " << label.getDateString() << endl;
            } else if (label.getLabelType() == Array2dFileLabel::L_USER) {
              cout << "Note: " <<  label.getLabelString() << endl;
            } else if (label.getLabelType() == Array2dFileLabel::L_USER) {
              cout << "Note: " <<  label.getLabelString() << endl;
-             cout << "  Timestamp = %s" << str << endl;
-         }
+             cout << "  Timestamp = %s" << label.getDateString() << endl;
+           }
+           cout << endl;
        }
     }
 
        }
     }
 
@@ -221,13 +220,13 @@ ifinfo_main (int argc, char *const argv[])
            }
        }
       stddev = sqrt(stddev / (nx * ny));
            }
        }
       stddev = sqrt(stddev / (nx * ny));
-      cout << "nx=" << nx << endl;
-      cout << "nx=" << ny << endl;
-      cout << "min=" << minfound << endl;
-      cout << "max=" << maxfound << endl;
-      cout << "mean=" << mean << endl;
-      cout << "mode=" << mode << endl;
-      cout << "stddef=" << stddev << endl;
+      cout << "    nx: " << nx << endl;
+      cout << "    nx: " << ny << endl;
+      cout << "   min: " << minfound << endl;
+      cout << "   max: " << maxfound << endl;
+      cout << "  mean: " << mean << endl;
+      cout << "  mode: " << mode << endl;
+      cout << "stddef" << stddev << endl;
     }
   
   return (0);
     }
   
   return (0);