Update of /cvsroot/compbench/CompBenchmarks++
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27975
Modified Files:
cloptions.cpp
Log Message:
a option supported with -qc (show option descriptions).
Index: cloptions.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/cloptions.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** cloptions.cpp 19 Feb 2007 18:42:14 -0000 1.22
--- cloptions.cpp 20 Mar 2007 20:29:31 -0000 1.23
***************
*** 11,14 ****
--- 11,16 ----
#include <Benchmark/Benchmark.h>
#include <Compiler/Compiler.h>
+ #include <Compiler/Compiler-Option-Description.h>
+
#include <System/System.h>
#include <UI/UI.h>
***************
*** 172,175 ****
--- 174,193 ----
}
+ void cbmShowOptionDescriptions(CBM::Compiler *C)
+ {
+ CBM::CompilerOptionDescriptions *DES = C->OptionDescriptions();
+ int i;
+ int n = DES->DescriptionNumber();
+ CBM::CompilerOptionDescription *D;
+
+ for(i=0; i<n; i++) {
+ D=DES->Description(i);
+ std::cout << "Option ID : " << D->Id() << std::endl
+ << " Description : " << D->ShortDescription() << std::endl << std::endl
+ << " " << D->EditorDescription() << std::endl
+ << std::endl;
+ }
+ }
+
int cbmOptionsParse(int argc, char *argv[])
{
***************
*** 442,447 ****
break;
}
! if ((!filter.all) && (!filter.installed)) {
! if (filter.host) {
std::cout << "Architecture : " << cbmSystem->arch() << std::endl
<< "Host ID : " << cbmSystem->hostid() << std::endl
--- 460,465 ----
break;
}
! if (!filter.installed) {
! if ((!filter.all) && (filter.host)) {
std::cout << "Architecture : " << cbmSystem->arch() << std::endl
<< "Host ID : " << cbmSystem->hostid() << std::endl
***************
*** 466,469 ****
--- 484,491 ----
<< "Language : " << C->Language() << std::endl
<< "Binary : " << C->Binary() << std::endl;
+
+ if (filter.all) {
+ cbmShowOptionDescriptions(C);
+ }
parseExitValue=0;
break;
|