summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2015-04-29 16:59:02 -0400
committerJoe George <joe@zeroc.com>2015-04-29 16:59:02 -0400
commit2c0f9d2fb8557f2debe80c8614ec6991d8d1fa8c (patch)
treefc425736aa2f558925c46c896244039753445972 /cpp/src
parentClean up .gitattributes (diff)
downloadice-2c0f9d2fb8557f2debe80c8614ec6991d8d1fa8c.tar.bz2
ice-2c0f9d2fb8557f2debe80c8614ec6991d8d1fa8c.tar.xz
ice-2c0f9d2fb8557f2debe80c8614ec6991d8d1fa8c.zip
Improve usage message for slice compilers
* --ice Allow reserved Ice prefix in Slice identifiers. * --underscore Allow underscores in Slice identifiers.
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/slice2confluence/Main.cpp14
-rw-r--r--cpp/src/slice2cpp/Main.cpp12
-rw-r--r--cpp/src/slice2cs/Main.cpp14
-rw-r--r--cpp/src/slice2freeze/Main.cpp22
-rw-r--r--cpp/src/slice2freezej/Main.cpp4
-rw-r--r--cpp/src/slice2html/Main.cpp4
-rw-r--r--cpp/src/slice2java/Main.cpp4
-rw-r--r--cpp/src/slice2js/Main.cpp4
-rw-r--r--cpp/src/slice2objc/Main.cpp16
-rw-r--r--cpp/src/slice2php/Main.cpp6
10 files changed, 50 insertions, 50 deletions
diff --git a/cpp/src/slice2confluence/Main.cpp b/cpp/src/slice2confluence/Main.cpp
index beaf6e7fc84..a8a1b83e7fd 100644
--- a/cpp/src/slice2confluence/Main.cpp
+++ b/cpp/src/slice2confluence/Main.cpp
@@ -54,18 +54,18 @@ splitCommas(string& str)
size_t oldPos = 0;
size_t commaPos = str.find(",");
string token;
-
+
while (commaPos != string::npos)
{
token = str.substr(oldPos, commaPos-oldPos);
strings.push_back(token);
-
+
oldPos = commaPos+1;
commaPos = str.find(",", oldPos);
}
token = str.substr(oldPos);
strings.push_back(token);
-
+
return strings;
}
@@ -102,8 +102,8 @@ usage(const char* n)
"--index NUM Generate subindex if it has at least NUM entries (0 for no index, default=1).\n"
"--summary NUM Print a warning if a summary sentence exceeds NUM characters.\n"
"-d, --debug Print debug messages.\n"
- "--ice Permit `Ice' prefix (for building Ice source code only).\n"
- "--ice Permit underscores in Slice identifiers.\n"
+ "--ice Allowed reserved Ice prefix in Slice identifiers.\n"
+ "--underscore Allow underscores in Slice identifiers.\n"
;
}
@@ -177,9 +177,9 @@ compile(int argc, char* argv[])
}
bool preprocess = opts.isSet("E");
-
+
string output = opts.optArg("output-dir");
-
+
string sortorderstring = opts.optArg("sort-order");
vector<string> sort_order = splitCommas(sortorderstring);
diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp
index 63a727ad6e0..6d201168fac 100644
--- a/cpp/src/slice2cpp/Main.cpp
+++ b/cpp/src/slice2cpp/Main.cpp
@@ -57,7 +57,7 @@ void
usage(const char* n)
{
getErrorStream() << "Usage: " << n << " [options] slice-files...\n";
- getErrorStream() <<
+ getErrorStream() <<
"Options:\n"
"-h, --help Show this message.\n"
"-v, --version Display the Ice version.\n"
@@ -77,8 +77,8 @@ usage(const char* n)
"--depend-xml Generate dependencies in XML format.\n"
"--depend-file FILE Write dependencies to FILE instead of standard output.\n"
"-d, --debug Print debug messages.\n"
- "--ice Permit `Ice' prefix (for building Ice source code only).\n"
- "--underscore Permit underscores in Slice identifiers.\n"
+ "--ice Allowed reserved Ice prefix in Slice identifiers.\n"
+ "--underscore Allow underscores in Slice identifiers.\n"
"--checksum Generate checksums for Slice definitions.\n"
"--stream Generate marshaling support for public stream API.\n"
;
@@ -136,7 +136,7 @@ compile(int argc, char* argv[])
string headerExtension = opts.optArg("header-ext");
string sourceExtension = opts.optArg("source-ext");
-
+
vector<string> extraHeaders = opts.argVec("add-header");
vector<string> cppArgs;
@@ -231,7 +231,7 @@ compile(int argc, char* argv[])
out.cleanup();
return EXIT_FAILURE;
}
-
+
UnitPtr u = Unit::createUnit(false, false, ice, underscore);
int parseStatus = u->parse(*i, cppHandle, debug);
u->destroy();
@@ -284,7 +284,7 @@ compile(int argc, char* argv[])
{
UnitPtr u = Unit::createUnit(false, false, ice, underscore);
int parseStatus = u->parse(*i, cppHandle, debug);
-
+
if(!icecpp->close())
{
u->destroy();
diff --git a/cpp/src/slice2cs/Main.cpp b/cpp/src/slice2cs/Main.cpp
index cf0365fdeca..fa0217f23e2 100644
--- a/cpp/src/slice2cs/Main.cpp
+++ b/cpp/src/slice2cs/Main.cpp
@@ -57,7 +57,7 @@ void
usage(const char* n)
{
getErrorStream() << "Usage: " << n << " [options] slice-files...\n";
- getErrorStream() <<
+ getErrorStream() <<
"Options:\n"
"-h, --help Show this message.\n"
"-v, --version Display the Ice version.\n"
@@ -74,8 +74,8 @@ usage(const char* n)
"--depend-xml Generate dependencies in XML format.\n"
"--depend-file FILE Write dependencies to FILE instead of standard output.\n"
"-d, --debug Print debug messages.\n"
- "--ice Permit `Ice' prefix (for building Ice source code only).\n"
- "--underscore Permit underscores in Slice identifiers.\n"
+ "--ice Allowed reserved Ice prefix in Slice identifiers.\n"
+ "--underscore Allow underscores in Slice identifiers.\n"
"--checksum Generate checksums for Slice definitions.\n"
"--stream Generate marshaling support for public stream API.\n"
;
@@ -237,7 +237,7 @@ compile(int argc, char* argv[])
return EXIT_FAILURE;
}
- if(!icecpp->printMakefileDependencies(out.os(), depend ? Preprocessor::CSharp : Preprocessor::SliceXML, includePaths,
+ if(!icecpp->printMakefileDependencies(out.os(), depend ? Preprocessor::CSharp : Preprocessor::SliceXML, includePaths,
"-D__SLICE2CS__"))
{
out.cleanup();
@@ -272,7 +272,7 @@ compile(int argc, char* argv[])
if(!icecpp->close())
{
return EXIT_FAILURE;
- }
+ }
}
else
{
@@ -283,8 +283,8 @@ compile(int argc, char* argv[])
{
p->destroy();
return EXIT_FAILURE;
- }
-
+ }
+
if(parseStatus == EXIT_FAILURE)
{
status = EXIT_FAILURE;
diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp
index d1431895510..e003d5d7b4d 100644
--- a/cpp/src/slice2freeze/Main.cpp
+++ b/cpp/src/slice2freeze/Main.cpp
@@ -244,8 +244,8 @@ usage(const char* n)
"--depend-xml Generate dependencies in XML format.\n"
"--depend-file FILE Write dependencies to FILE instead of standard output.\n"
"-d, --debug Print debug messages.\n"
- "--ice Permit `Ice' prefix (for building Ice source code only).\n"
- "--underscore Permit underscores in Slice identifiers.\n"
+ "--ice Allowed reserved Ice prefix in Slice identifiers.\n"
+ "--underscore Allow underscores in Slice identifiers.\n"
;
}
@@ -1389,7 +1389,7 @@ gen(const string& name, const UnitPtr& u, const vector<string>& includePaths, co
H << "\n#include <" << changeInclude(*p, includePaths) << "." + headerExtension + ">";
}
-
+
CPP << "\n#include <IceUtil/PushDisableWarnings.h>";
CPP << "\n#include <Ice/BasicStream.h>";
CPP << "\n#include <IceUtil/StringUtil.h>";
@@ -1925,21 +1925,21 @@ compile(int argc, char* argv[])
else
{
PreprocessorPtr icecpp = Preprocessor::create(argv[0], args[idx], cppArgs);
-
+
//
// Add an include file for each Slice file. Note that the .h extension
// is replaced with headerExtension later.
//
includes.push_back(icecpp->getBaseName() + ".h");
-
+
FILE* cppHandle = icecpp->preprocess(false, "-D__SLICE2FREEZE__");
-
+
if(cppHandle == 0)
{
u->destroy();
return EXIT_FAILURE;
}
-
+
if(preprocess)
{
char buf[4096];
@@ -1955,21 +1955,21 @@ compile(int argc, char* argv[])
else
{
status = u->parse(args[idx], cppHandle, debug);
-
+
MetaDataVisitor visitor;
u->visit(&visitor, false);
}
-
+
if(!icecpp->close())
{
u->destroy();
return EXIT_FAILURE;
}
}
-
+
{
IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(globalMutex);
-
+
if(interrupted)
{
return EXIT_FAILURE;
diff --git a/cpp/src/slice2freezej/Main.cpp b/cpp/src/slice2freezej/Main.cpp
index 454c24f1db3..aa6431470b0 100644
--- a/cpp/src/slice2freezej/Main.cpp
+++ b/cpp/src/slice2freezej/Main.cpp
@@ -1447,8 +1447,8 @@ usage(const char* n)
"--depend-xml Generate dependencies in XML format.\n"
"--depend-file FILE Write dependencies to FILE instead of standard output.\n"
"-d, --debug Print debug messages.\n"
- "--ice Permit `Ice' prefix (for building Ice source code only).\n"
- "--underscore Permit underscores in Slice identifiers.\n"
+ "--ice Allowed reserved Ice prefix in Slice identifiers.\n"
+ "--underscore Allow underscores in Slice identifiers.\n"
"--meta META Define global metadata directive META.\n"
;
}
diff --git a/cpp/src/slice2html/Main.cpp b/cpp/src/slice2html/Main.cpp
index 842761b9f0c..661170b35ae 100644
--- a/cpp/src/slice2html/Main.cpp
+++ b/cpp/src/slice2html/Main.cpp
@@ -79,8 +79,8 @@ usage(const char* n)
"--index NUM Generate subindex if it has at least NUM entries (0 for no index, default=1).\n"
"--summary NUM Print a warning if a summary sentence exceeds NUM characters.\n"
"-d, --debug Print debug messages.\n"
- "--ice Permit `Ice' prefix (for building Ice source code only).\n"
- "--ice Permit underscores in Slice identifiers.\n"
+ "--ice Allowed reserved Ice prefix in Slice identifiers.\n"
+ "--underscore Allow underscores in Slice identifiers.\n"
;
}
diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp
index fe93c7d59a3..58120b60fae 100644
--- a/cpp/src/slice2java/Main.cpp
+++ b/cpp/src/slice2java/Main.cpp
@@ -76,8 +76,8 @@ usage(const char* n)
"--depend-file FILE Write dependencies to FILE instead of standard output.\n"
"--list-generated Emit list of generated files in XML format.\n"
"-d, --debug Print debug messages.\n"
- "--ice Permit `Ice' prefix (for building Ice source code only).\n"
- "--underscore Permit underscores in Slice identifiers.\n"
+ "--ice Allowed reserved Ice prefix in Slice identifiers.\n"
+ "--underscore Allow underscores in Slice identifiers.\n"
"--checksum CLASS Generate checksums for Slice definitions into CLASS.\n"
"--stream Generate marshaling support for public stream API.\n"
"--meta META Define global metadata directive META.\n"
diff --git a/cpp/src/slice2js/Main.cpp b/cpp/src/slice2js/Main.cpp
index b751dd295bf..5ee3ab21d64 100644
--- a/cpp/src/slice2js/Main.cpp
+++ b/cpp/src/slice2js/Main.cpp
@@ -73,8 +73,8 @@ usage(const char* n)
"--depend-xml Generate dependencies in XML format.\n"
"--depend-file FILE Write dependencies to FILE instead of standard output.\n"
"-d, --debug Print debug messages.\n"
- "--ice Permit `Ice' prefix (for building Ice source code only).\n"
- "--underscore Permit underscores in Slice identifiers.\n"
+ "--ice Allowed reserved Ice prefix in Slice identifiers.\n"
+ "--underscore Allow underscores in Slice identifiers.\n"
;
}
diff --git a/cpp/src/slice2objc/Main.cpp b/cpp/src/slice2objc/Main.cpp
index 92da5f2a617..2a0be27ae93 100644
--- a/cpp/src/slice2objc/Main.cpp
+++ b/cpp/src/slice2objc/Main.cpp
@@ -56,7 +56,7 @@ void
usage(const char* n)
{
cerr << "Usage: " << n << " [options] slice-files...\n";
- cerr <<
+ cerr <<
"Options:\n"
"-h, --help Show this message.\n"
"-v, --version Display the Ice version.\n"
@@ -72,8 +72,8 @@ usage(const char* n)
"--depend-xml Generate dependencies in XML format.\n"
"--depend-file FILE Write dependencies to FILE instead of standard output.\n"
"-d, --debug Print debug messages.\n"
- "--ice Permit `Ice' prefix (for building Ice source code only)\n"
- "--underscore Permit underscores in Slice identifiers.\n"
+ "--ice Allowed reserved Ice prefix in Slice identifiers.\n"
+ "--underscore Allow underscores in Slice identifiers.\n"
;
// Note: --case-sensitive is intentionally not shown here!
}
@@ -198,7 +198,7 @@ main(int argc, char* argv[])
out.cleanup();
return EXIT_FAILURE;
}
-
+
UnitPtr u = Unit::createUnit(false, false, ice, underscore);
int parseStatus = u->parse(*i, cppHandle, debug);
u->destroy();
@@ -209,7 +209,7 @@ main(int argc, char* argv[])
return EXIT_FAILURE;
}
- if(!icecpp->printMakefileDependencies(out.os(), depend ? Preprocessor::ObjC : Preprocessor::SliceXML,
+ if(!icecpp->printMakefileDependencies(out.os(), depend ? Preprocessor::ObjC : Preprocessor::SliceXML,
includePaths, "-D__SLICE2OBJC__"))
{
out.cleanup();
@@ -245,7 +245,7 @@ main(int argc, char* argv[])
if(!icecpp->close())
{
return EXIT_FAILURE;
- }
+ }
}
else
{
@@ -256,8 +256,8 @@ main(int argc, char* argv[])
{
u->destroy();
return EXIT_FAILURE;
- }
-
+ }
+
if(parseStatus == EXIT_FAILURE)
{
status = EXIT_FAILURE;
diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp
index 39f5ecceedc..caccc51b71c 100644
--- a/cpp/src/slice2php/Main.cpp
+++ b/cpp/src/slice2php/Main.cpp
@@ -1587,8 +1587,8 @@ usage(const char* n)
"--depend-xml Generate dependencies in XML format.\n"
"--depend-file FILE Write dependencies to FILE instead of standard output.\n"
"-d, --debug Print debug messages.\n"
- "--ice Permit `Ice' prefix (for building Ice source code only).\n"
- "--underscore Permit underscores in Slice identifiers.\n"
+ "--ice Allowed reserved Ice prefix in Slice identifiers.\n"
+ "--underscore Allow underscores in Slice identifiers.\n"
"--all Generate code for Slice definitions in included files.\n"
"--checksum Generate checksums for Slice definitions.\n"
"-n, --namespace Use PHP namespaces (requires PHP 5.3 or later).\n"
@@ -1860,7 +1860,7 @@ compile(int argc, char* argv[])
{
out.os() << "</dependencies>\n";
}
-
+
return status;
}