From 487dd39e3483217cccb80f46e7a65674c7f6c05a Mon Sep 17 00:00:00 2001 From: Mark Spruiell Date: Mon, 24 May 2010 09:51:55 -0700 Subject: bug 4752 - allow underscores in Slice identifiers --- cpp/src/FreezeScript/DumpDB.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cpp/src/FreezeScript/DumpDB.cpp') diff --git a/cpp/src/FreezeScript/DumpDB.cpp b/cpp/src/FreezeScript/DumpDB.cpp index f5ab1653de3..fca6163b4a3 100755 --- a/cpp/src/FreezeScript/DumpDB.cpp +++ b/cpp/src/FreezeScript/DumpDB.cpp @@ -93,7 +93,8 @@ usage(const string& n) "-UNAME Remove any definition for NAME.\n" "-IDIR Put DIR in the include file search path.\n" "-d, --debug Print debug messages.\n" - "--ice Permit `Ice' prefix (for building Ice source code only)\n" + "--ice Permit `Ice' prefix (for building Ice source code only).\n" + "--underscore Permit underscores in Slice identifiers.\n" "-o FILE Output sample descriptors into the file FILE.\n" "-f FILE Execute the descriptors in the file FILE.\n" "--load SLICE Load Slice definitions from the file SLICE.\n" @@ -128,6 +129,7 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator vector cppArgs; bool debug; bool ice = true; // Needs to be true in order to create default definitions. + bool underscore; string outputFile; string inputFile; vector slice; @@ -145,6 +147,7 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator opts.addOpt("I", "", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); opts.addOpt("d", "debug"); opts.addOpt("", "ice"); + opts.addOpt("", "underscore"); opts.addOpt("o", "", IceUtilInternal::Options::NeedArg); opts.addOpt("f", "", IceUtilInternal::Options::NeedArg); opts.addOpt("", "load", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat); @@ -258,6 +261,8 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator // No need to set --ice option here -- it is always true. + underscore = opts.isSet("underscore"); + if(opts.isSet("o")) { outputFile = opts.optArg("o"); @@ -314,7 +319,7 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator return EXIT_FAILURE; } - Slice::UnitPtr unit = Slice::Unit::createUnit(true, true, ice); + Slice::UnitPtr unit = Slice::Unit::createUnit(true, true, ice, underscore); FreezeScript::Destroyer unitD(unit); if(!FreezeScript::parseSlice(appName, unit, slice, cppArgs, debug)) { -- cgit v1.2.3