Changeset 2531
- Timestamp:
- 11/19/03 00:23:54 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2529 r2531 42 42 * mreport/MReportFileRead.cc: 43 43 - fixed handling of MTimes 44 45 * mhist/MH.cc: 46 - added some const qualifiers in CutEdges 44 47 45 48 -
trunk/MagicSoft/Mars/mars.cc
r2491 r2531 7 7 8 8 #include "MMars.h" 9 #include "MArgs.h" 9 10 #include "MArray.h" 10 11 #include "MParContainer.h" … … 67 68 gLog << all << endl; 68 69 gLog << "Sorry the usage is:" << endl; 69 gLog << " mars [-v#]" << endl << endl; 70 gLog << " -v0: verbosity level: as less as possible" << endl; 71 gLog << " -v1: errors only" << endl; 72 gLog << " -v2: errors and warnings <default>" << endl; 73 gLog << " -v3: errors, warnings and infos" << endl; 70 gLog << " mars [-h] [-?] [-a0] [-vn]" << endl << endl; 71 gLog << " -a0: Do not use Ansii codes." << endl; 72 gLog << " -vn: Verbosity level n [default=2]" << endl; 73 gLog << " -?/-h: This help" << endl << endl; 74 74 } 75 75 … … 79 79 80 80 // 81 // check for the right usage of the program81 // Evaluate arguments 82 82 // 83 if (argc<1 || argc>2) 83 MArgs arg(argc, argv); 84 85 if (arg.HasOption("-?") || arg.HasOption("-h")) 84 86 { 85 87 Usage(); … … 87 89 } 88 90 89 if (argc==2) 90 { 91 if (argv[1][0]!='-' || argv[1][1]!='v') 92 { 93 Usage(); 94 return -1; 95 } 91 // 92 // Set verbosity to highest level. 93 // 94 gLog.SetDebugLevel(arg.HasOption("-v") ? arg.GetIntAndRemove("-v") : 2); 96 95 97 switch (argv[1][2]) 98 { 99 case '0': 100 gLog.SetDebugLevel(0); 101 break; 102 case '1': 103 gLog.SetDebugLevel(1); 104 break; 105 case '2': 106 gLog.SetDebugLevel(2); 107 break; 108 case '3': 109 gLog.SetDebugLevel(3); 110 break; 111 default: 112 Usage(); 113 return -1; 114 } 115 } 116 else 117 gLog.SetDebugLevel(2); 96 if (arg.HasOption("-a") && arg.GetIntAndRemove("-a")==0) 97 gLog.SetNoColors(); 118 98 119 99 #ifdef HAVE_XPM -
trunk/MagicSoft/Mars/merpp.cc
r2521 r2531 64 64 } 65 65 66 int main(const int argc, c onst char **argv)66 int main(const int argc, char **argv) 67 67 { 68 68 StartUpMessage(); … … 79 79 } 80 80 81 //82 // Set verbosity to highest level.83 //84 gLog.SetDebugLevel(arg.HasOption("-v") ? arg.GetIntAndRemove("-v") : 2);85 86 81 if (arg.HasOption("-a") && arg.GetIntAndRemove("-a")==0) 87 82 gLog.SetNoColors(); 88 83 89 84 const int kComprlvl = arg.HasOption("-c") ? arg.GetIntAndRemove("-c") : 1; 85 86 gLog.SetDebugLevel(arg.HasOption("-v") ? arg.GetIntAndRemove("-v") : 2); 90 87 91 88 // -
trunk/MagicSoft/Mars/mona.cc
r2521 r2531 355 355 // Evaluate arguments 356 356 // 357 MArgs arg(argc, (const char**)argv);357 MArgs arg(argc, argv); 358 358 359 359 if (arg.HasOption("-?") || arg.HasOption("-h")) -
trunk/MagicSoft/Mars/readraw.cc
r2521 r2531 69 69 } 70 70 71 int main(int argc, c onst char **argv)71 int main(int argc, char **argv) 72 72 { 73 73 StartUpMessage(); -
trunk/MagicSoft/Mars/star.cc
r2470 r2531 65 65 } 66 66 67 int main(const int argc, c onst char **argv)67 int main(const int argc, char **argv) 68 68 { 69 69 StartUpMessage();
Note:
See TracChangeset
for help on using the changeset viewer.