[Compbench-devel] CompBenchmarks++ cloptions.cpp,1.12,1.13
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-01-21 21:42:20
|
Update of /cvsroot/compbench/CompBenchmarks++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8219 Modified Files: cloptions.cpp Log Message: CBM namespace. Index: cloptions.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/cloptions.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** cloptions.cpp 10 Jan 2007 20:31:44 -0000 1.12 --- cloptions.cpp 21 Jan 2007 21:42:17 -0000 1.13 *************** *** 14,48 **** #include <getopt.h> extern int optind, opterr, optopt; int parseExitValue = -1; - void cbmOptionsDisplayBenchmarks(CBMPackage *P) - { - CBMBenchmark *B; - int i; - int n = P->benchmarkNumber(); - - for(i=0; i<n; i++) { - B=P->Benchmark(i); - B->display(); - } - } - - void cbmOptionsDisplayAllBenchmarks(void) - { - CBMPackage *P; - int i; - int n = cbmSystem->packageNumber(); - - printf("n=%d\n", n); - for(i=0; i<n; i++) { - P=cbmSystem->Package(i); - printf("%d => %x\n", i, P); - P->display(); - cbmOptionsDisplayBenchmarks(P); - } - } - void cbmOptionsHelp(void) { --- 14,23 ---- #include <getopt.h> + using namespace CBM; + extern int optind, opterr, optopt; int parseExitValue = -1; void cbmOptionsHelp(void) { *************** *** 89,95 **** } ! CBMBenchmark *cbmOptionsExpectBenchmark(char *optarg) { ! CBMBenchmark *B = 0; std::string bench; --- 64,70 ---- } ! CBM::Benchmark *cbmOptionsExpectBenchmark(char *optarg) { ! CBM::Benchmark *B = 0; std::string bench; *************** *** 111,117 **** ! CBMPackage *cbmOptionsExpectPackage(char *optarg) { ! CBMPackage *P = 0; std::string pack; --- 86,92 ---- ! CBM::Package *cbmOptionsExpectPackage(char *optarg) { ! CBM::Package *P = 0; std::string pack; *************** *** 136,147 **** int c; int context; ! CBMPackage::Status status; ! CBMPackage *P = 0; ! CBMBenchmark *B = 0; ! CBMCompilerSelector SC(cbmSystem); ! CBMCompiler *C = 0; ! CBMCompilerOptions *O; std::string bench; --- 111,122 ---- int c; int context; ! CBM::Package::Status status; ! CBM::Package *P = 0; ! CBM::Benchmark *B = 0; ! CBM::CompilerSelector SC(cbmSystem); ! CBM::Compiler *C = 0; ! CBM::CompilerOptions *O; std::string bench; *************** *** 205,209 **** break; case 'L': ! cbmOptionsDisplayAllBenchmarks(); parseExitValue=0; break; --- 180,184 ---- break; case 'L': ! cbmSystem->displayAllBenchmarks(); parseExitValue=0; break; *************** *** 255,259 **** parseExitValue=!P->Download(); } else { ! UI->Fatal("Package is not known to be hosted anymore on the Internet. Use --fetch option"); } } --- 230,234 ---- parseExitValue=!P->Download(); } else { ! CBM::cbmUI->Fatal("Package is not known to be hosted anymore on the Internet. Use --fetch option"); } } *************** *** 278,282 **** if (P) { if (!UO_enableTestSuite) { ! UI->Fatal("Incompatible options : --test and --disable-testsuite"); } } --- 253,257 ---- if (P) { if (!UO_enableTestSuite) { ! CBM::cbmUI->Fatal("Incompatible options : --test and --disable-testsuite"); } } *************** *** 314,321 **** options=""; } ! O=new CBMCompilerOptions(C, ! (char*) options.c_str()); P=B->Package(); ! if (P->getStatus()<CBMPackage::Preconfigured) { std::cerr << "Package not properly installed" << std::endl; parseExitValue=1; --- 289,296 ---- options=""; } ! O=new CBM::CompilerOptions(C, ! (char*) options.c_str()); P=B->Package(); ! if (P->getStatus()<CBM::Package::Preconfigured) { std::cerr << "Package not properly installed" << std::endl; parseExitValue=1; *************** *** 325,329 **** status=P->getStatus(); ! if ((status>=CBMPackage::Configured) && (!context)) { P->Release(); } --- 300,304 ---- status=P->getStatus(); ! if ((status>=CBM::Package::Configured) && (!context)) { P->Release(); } |