summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2009-01-14 09:59:23 -0330
committerMatthew Newhook <matthew@zeroc.com>2009-01-14 09:59:23 -0330
commitf8a2a5c47bcc31192d618de6833e9663c9feb5ac (patch)
tree53e877985e264c38f958d0165a8f6970cbcc11e7 /cpp
parenthttp://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=3640 - If slice2java error... (diff)
downloadice-f8a2a5c47bcc31192d618de6833e9663c9feb5ac.tar.bz2
ice-f8a2a5c47bcc31192d618de6833e9663c9feb5ac.tar.xz
ice-f8a2a5c47bcc31192d618de6833e9663c9feb5ac.zip
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=3517 ; translator stdout/stderr.
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/Slice/CsUtil.cpp8
-rw-r--r--cpp/src/Slice/JavaUtil.cpp12
-rw-r--r--cpp/src/Slice/Parser.cpp14
-rw-r--r--cpp/src/Slice/PythonUtil.cpp6
-rw-r--r--cpp/src/slice2cpp/Gen.cpp8
-rw-r--r--cpp/src/slice2cpp/Main.cpp2
-rw-r--r--cpp/src/slice2cs/Main.cpp2
-rw-r--r--cpp/src/slice2docbook/Main.cpp2
-rw-r--r--cpp/src/slice2freeze/Main.cpp2
-rw-r--r--cpp/src/slice2freezej/Main.cpp2
-rw-r--r--cpp/src/slice2html/Main.cpp2
-rw-r--r--cpp/src/slice2java/Main.cpp2
-rw-r--r--cpp/src/slice2py/Main.cpp2
-rw-r--r--cpp/src/slice2rb/Main.cpp2
14 files changed, 33 insertions, 33 deletions
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp
index a5d5c78a7e4..ae8c6e667cc 100644
--- a/cpp/src/Slice/CsUtil.cpp
+++ b/cpp/src/Slice/CsUtil.cpp
@@ -1528,7 +1528,7 @@ Slice::CsGenerator::MetaDataVisitor::visitModuleStart(const ModulePtr& p)
static const string attributePrefix = "cs:attribute:";
if(s.find(attributePrefix) != 0 || s.size() == attributePrefix.size())
{
- cout << file << ": warning: ignoring invalid global metadata `" << s << "'" << endl;
+ cerr << file << ": warning: ignoring invalid global metadata `" << s << "'" << endl;
}
}
_history.insert(s);
@@ -1595,7 +1595,7 @@ Slice::CsGenerator::MetaDataVisitor::visitOperation(const OperationPtr& p)
ClassDefPtr cl = ClassDefPtr::dynamicCast(p->container());
if(!cl->isLocal())
{
- cout << p->definitionContext()->filename() << ":" << p->line()
+ cerr << p->definitionContext()->filename() << ":" << p->line()
<< ": warning: metdata directive `UserException' applies only to local operations "
<< "but enclosing " << (cl->isInterface() ? "interface" : "class") << "`" << cl->name()
<< "' is not local" << endl;
@@ -1720,7 +1720,7 @@ Slice::CsGenerator::MetaDataVisitor::validate(const ContainedPtr& cont)
}
}
}
- cout << file << ":" << cont->line() << ": warning: " << msg << " `" << s << "'" << endl;
+ cerr << file << ":" << cont->line() << ": warning: " << msg << " `" << s << "'" << endl;
}
_history.insert(s);
}
@@ -1734,7 +1734,7 @@ Slice::CsGenerator::MetaDataVisitor::validate(const ContainedPtr& cont)
{
continue;
}
- cout << file << ":" << cont->line() << ": warning: " << msg << " `" << s << "'" << endl;
+ cerr << file << ":" << cont->line() << ": warning: " << msg << " `" << s << "'" << endl;
}
_history.insert(s);
}
diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp
index 7c73227bc55..b67f36055a4 100644
--- a/cpp/src/Slice/JavaUtil.cpp
+++ b/cpp/src/Slice/JavaUtil.cpp
@@ -3426,7 +3426,7 @@ Slice::JavaGenerator::MetaDataVisitor::visitModuleStart(const ModulePtr& p)
if(!ok)
{
- cout << file << ": warning: ignoring invalid global metadata `" << s << "'" << endl;
+ cerr << file << ": warning: ignoring invalid global metadata `" << s << "'" << endl;
}
}
_history.insert(s);
@@ -3482,7 +3482,7 @@ Slice::JavaGenerator::MetaDataVisitor::visitOperation(const OperationPtr& p)
ClassDefPtr cl = ClassDefPtr::dynamicCast(p->container());
if(!cl->isLocal())
{
- cout << p->definitionContext()->filename() << ":" << p->line()
+ cerr << p->definitionContext()->filename() << ":" << p->line()
<< ": warning: metadata directive `UserException' applies only to local operations "
<< "but enclosing " << (cl->isInterface() ? "interface" : "class") << "`" << cl->name()
<< "' is not local" << endl;
@@ -3498,7 +3498,7 @@ Slice::JavaGenerator::MetaDataVisitor::visitOperation(const OperationPtr& p)
{
if(q->find("java:type:", 0) == 0)
{
- cout << p->definitionContext()->filename() << ":" << p->line()
+ cerr << p->definitionContext()->filename() << ":" << p->line()
<< ": warning: invalid metadata for operation" << endl;
break;
}
@@ -3597,7 +3597,7 @@ Slice::JavaGenerator::MetaDataVisitor::getMetaData(const ContainedPtr& cont)
continue;
}
- cout << file << ":" << cont->line() << ": warning: ignoring invalid metadata `" << s << "'" << endl;
+ cerr << file << ":" << cont->line() << ": warning: ignoring invalid metadata `" << s << "'" << endl;
}
_history.insert(s);
@@ -3630,7 +3630,7 @@ Slice::JavaGenerator::MetaDataVisitor::validateType(const SyntaxTreeBasePtr& p,
assert(b);
str = b->typeId();
}
- cout << file << ":" << line << ": warning: invalid metadata for " << str << endl;
+ cerr << file << ":" << line << ": warning: invalid metadata for " << str << endl;
}
}
}
@@ -3660,7 +3660,7 @@ Slice::JavaGenerator::MetaDataVisitor::validateGetSet(const SyntaxTreeBasePtr& p
assert(b);
str = b->typeId();
}
- cout << file << ":" << line << ": warning: invalid metadata for " << str << endl;
+ cerr << file << ":" << line << ": warning: invalid metadata for " << str << endl;
}
}
}
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index 866a580373a..5d682503ec3 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -4714,7 +4714,7 @@ Slice::Operation::attributes() const
}
if(i == 2)
{
- cout << definitionContext()->filename() << ":" << line()
+ cerr << definitionContext()->filename() << ":" << line()
<< ": warning: invalid freeze metadata for operation" << endl;
}
else
@@ -4736,7 +4736,7 @@ Slice::Operation::attributes() const
{
if(result != 0 && (i == int(Supports) || i == int(Never)))
{
- cout << definitionContext()->filename() << ":" << line()
+ cerr << definitionContext()->filename() << ":" << line()
<< ": warning: invalid freeze metadata for operation" << endl;
}
else
@@ -4751,7 +4751,7 @@ Slice::Operation::attributes() const
if(i == 4)
{
- cout << definitionContext()->filename() << ":" << line()
+ cerr << definitionContext()->filename() << ":" << line()
<< ": warning: invalid freeze metadata for operation" << endl;
//
@@ -5170,9 +5170,9 @@ Slice::Unit::error(const char* s)
string file = currentFile();
if(!file.empty())
{
- cout << file << ':' << _currentLine << ": ";
+ cerr << file << ':' << _currentLine << ": ";
}
- cout << s << endl;
+ cerr << s << endl;
_errors++;
}
@@ -5188,9 +5188,9 @@ Slice::Unit::warning(const char* s) const
string file = currentFile();
if(!file.empty())
{
- cout << file << ':' << _currentLine << ": ";
+ cerr << file << ':' << _currentLine << ": ";
}
- cout << "warning: " << s << endl;
+ cerr << "warning: " << s << endl;
}
void
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index 648b7af94df..cb9e024717a 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -2035,7 +2035,7 @@ Slice::Python::MetaDataVisitor::validateGlobal(const DefinitionContextPtr& dc)
static const string packagePrefix = "python:package:";
if(s.find(packagePrefix) != 0 || s.size() == packagePrefix.size())
{
- cout << dc->filename() << ": warning: ignoring invalid global metadata `" << s << "'" << endl;
+ cerr << dc->filename() << ": warning: ignoring invalid global metadata `" << s << "'" << endl;
}
}
_history.insert(s);
@@ -2067,7 +2067,7 @@ Slice::Python::MetaDataVisitor::validateSequence(const DefinitionContextPtr& dc,
}
}
}
- cout << dc->filename() << ":" << line << ": warning: ignoring metadata `" << s << "'" << endl;
+ cerr << dc->filename() << ":" << line << ": warning: ignoring metadata `" << s << "'" << endl;
}
}
}
@@ -2085,7 +2085,7 @@ Slice::Python::MetaDataVisitor::reject(const ContainedPtr& cont)
{
DefinitionContextPtr dc = cont->definitionContext();
assert(dc);
- cout << dc->filename() << ":" << cont->line() << ": warning: ignoring metadata `" << *p << "'" << endl;
+ cerr << dc->filename() << ":" << cont->line() << ": warning: ignoring metadata `" << *p << "'" << endl;
}
}
}
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index c593e3dcd21..0c1731b684f 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -5651,7 +5651,7 @@ Slice::Gen::MetaDataVisitor::visitModuleStart(const ModulePtr& p)
{
continue;
}
- cout << file << ": warning: ignoring invalid global metadata `" << s << "'" << endl;
+ cerr << file << ": warning: ignoring invalid global metadata `" << s << "'" << endl;
}
_history.insert(s);
}
@@ -5722,7 +5722,7 @@ Slice::Gen::MetaDataVisitor::visitOperation(const OperationPtr& p)
{
if(!cl->isLocal())
{
- cout << p->definitionContext()->filename() << ":" << p->line()
+ cerr << p->definitionContext()->filename() << ":" << p->line()
<< ": warning: metadata directive `UserException' applies only to local operations "
<< "but enclosing " << (cl->isInterface() ? "interface" : "class") << "`" << cl->name()
<< "' is not local" << endl;
@@ -5741,7 +5741,7 @@ Slice::Gen::MetaDataVisitor::visitOperation(const OperationPtr& p)
{
if(q->find("cpp:type:", 0) == 0 || q->find("cpp:array", 0) == 0 || q->find("cpp:range", 0) == 0)
{
- cout << p->definitionContext()->filename() << ":" << p->line()
+ cerr << p->definitionContext()->filename() << ":" << p->line()
<< ": warning: invalid metadata for operation" << endl;
break;
}
@@ -5834,7 +5834,7 @@ Slice::Gen::MetaDataVisitor::validate(const SyntaxTreeBasePtr& cont, const Strin
continue;
}
- cout << file << ":" << line << ": warning: ignoring invalid metadata `" << s << "'" << endl;
+ cerr << file << ":" << line << ": warning: ignoring invalid metadata `" << s << "'" << endl;
}
_history.insert(s);
}
diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp
index 4ca202872c7..7e2ff8b58b1 100644
--- a/cpp/src/slice2cpp/Main.cpp
+++ b/cpp/src/slice2cpp/Main.cpp
@@ -101,7 +101,7 @@ main(int argc, char* argv[])
if(opts.isSet("version"))
{
- cout << ICE_STRING_VERSION << endl;
+ cerr << ICE_STRING_VERSION << endl;
return EXIT_SUCCESS;
}
diff --git a/cpp/src/slice2cs/Main.cpp b/cpp/src/slice2cs/Main.cpp
index abdc24c23db..595dfe75dc9 100644
--- a/cpp/src/slice2cs/Main.cpp
+++ b/cpp/src/slice2cs/Main.cpp
@@ -95,7 +95,7 @@ main(int argc, char* argv[])
if(opts.isSet("version"))
{
- cout << ICE_STRING_VERSION << endl;
+ cerr << ICE_STRING_VERSION << endl;
return EXIT_SUCCESS;
}
diff --git a/cpp/src/slice2docbook/Main.cpp b/cpp/src/slice2docbook/Main.cpp
index 25bd52137ac..b5616743174 100644
--- a/cpp/src/slice2docbook/Main.cpp
+++ b/cpp/src/slice2docbook/Main.cpp
@@ -92,7 +92,7 @@ main(int argc, char* argv[])
if(opts.isSet("version"))
{
- cout << ICE_STRING_VERSION << endl;
+ cerr << ICE_STRING_VERSION << endl;
return EXIT_SUCCESS;
}
diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp
index 84f98ac7c27..cbffb460a3f 100644
--- a/cpp/src/slice2freeze/Main.cpp
+++ b/cpp/src/slice2freeze/Main.cpp
@@ -1523,7 +1523,7 @@ main(int argc, char* argv[])
if(opts.isSet("version"))
{
- cout << ICE_STRING_VERSION << endl;
+ cerr << ICE_STRING_VERSION << endl;
return EXIT_SUCCESS;
}
diff --git a/cpp/src/slice2freezej/Main.cpp b/cpp/src/slice2freezej/Main.cpp
index 2b89feb5cfc..2ab8c36f86f 100644
--- a/cpp/src/slice2freezej/Main.cpp
+++ b/cpp/src/slice2freezej/Main.cpp
@@ -1183,7 +1183,7 @@ main(int argc, char* argv[])
if(opts.isSet("version"))
{
- cout << ICE_STRING_VERSION << endl;
+ cerr << ICE_STRING_VERSION << endl;
return EXIT_SUCCESS;
}
diff --git a/cpp/src/slice2html/Main.cpp b/cpp/src/slice2html/Main.cpp
index 068287ed632..dad5663fdba 100644
--- a/cpp/src/slice2html/Main.cpp
+++ b/cpp/src/slice2html/Main.cpp
@@ -101,7 +101,7 @@ main(int argc, char* argv[])
if(opts.isSet("version"))
{
- cout << ICE_STRING_VERSION << endl;
+ cerr << ICE_STRING_VERSION << endl;
return EXIT_SUCCESS;
}
diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp
index bc555d403bb..7439180b8f2 100644
--- a/cpp/src/slice2java/Main.cpp
+++ b/cpp/src/slice2java/Main.cpp
@@ -101,7 +101,7 @@ main(int argc, char* argv[])
if(opts.isSet("version"))
{
- cout << ICE_STRING_VERSION << endl;
+ cerr << ICE_STRING_VERSION << endl;
return EXIT_SUCCESS;
}
diff --git a/cpp/src/slice2py/Main.cpp b/cpp/src/slice2py/Main.cpp
index 4b522bf9a98..7343ea9f812 100644
--- a/cpp/src/slice2py/Main.cpp
+++ b/cpp/src/slice2py/Main.cpp
@@ -420,7 +420,7 @@ main(int argc, char* argv[])
if(opts.isSet("version"))
{
- cout << ICE_STRING_VERSION << endl;
+ cerr << ICE_STRING_VERSION << endl;
return EXIT_SUCCESS;
}
diff --git a/cpp/src/slice2rb/Main.cpp b/cpp/src/slice2rb/Main.cpp
index 092c16f8a35..d5f21dc3037 100644
--- a/cpp/src/slice2rb/Main.cpp
+++ b/cpp/src/slice2rb/Main.cpp
@@ -102,7 +102,7 @@ main(int argc, char* argv[])
if(opts.isSet("version"))
{
- cout << ICE_STRING_VERSION << endl;
+ cerr << ICE_STRING_VERSION << endl;
return EXIT_SUCCESS;
}