summaryrefslogtreecommitdiff
path: root/cpp/src/slice2html
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2html')
-rw-r--r--cpp/src/slice2html/.depend4
-rw-r--r--cpp/src/slice2html/Gen.cpp20
-rw-r--r--cpp/src/slice2html/Main.cpp20
-rw-r--r--cpp/src/slice2html/Makefile.mak4
4 files changed, 27 insertions, 21 deletions
diff --git a/cpp/src/slice2html/.depend b/cpp/src/slice2html/.depend
index 19c08cbf59a..316c84669a8 100644
--- a/cpp/src/slice2html/.depend
+++ b/cpp/src/slice2html/.depend
@@ -1,2 +1,2 @@
-Gen$(OBJEXT): Gen.cpp $(includedir)/IceUtil/DisableWarnings.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Config.h ./Gen.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/OutputUtil.h
-Main$(OBJEXT): Main.cpp $(includedir)/IceUtil/Options.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/Slice/Preprocessor.h ./Gen.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/OutputUtil.h
+Gen$(OBJEXT): Gen.cpp $(includedir)/IceUtil/DisableWarnings.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Config.h $(includedir)/Slice/FileTracker.h $(includedir)/IceUtil/Shared.h $(includedir)/Slice/Parser.h ./Gen.h $(includedir)/IceUtil/OutputUtil.h
+Main$(OBJEXT): Main.cpp $(includedir)/IceUtil/Options.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/StaticMutex.h $(includedir)/Slice/Preprocessor.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/Parser.h $(includedir)/Slice/Util.h ./Gen.h $(includedir)/IceUtil/OutputUtil.h
diff --git a/cpp/src/slice2html/Gen.cpp b/cpp/src/slice2html/Gen.cpp
index 65149c2581c..4680c57a2ae 100644
--- a/cpp/src/slice2html/Gen.cpp
+++ b/cpp/src/slice2html/Gen.cpp
@@ -1119,8 +1119,8 @@ Slice::GeneratorBase::getComment(const ContainedPtr& contained, const ContainerP
if(summary && _warnSummary && summarySize > _warnSummary)
{
- cerr << contained->definitionContext()->filename() << ": summary size (" << summarySize << ") exceeds "
- << _warnSummary << " characters: `" << comment << "'" << endl;
+ cerr << contained->file() << ": summary size (" << summarySize << ") exceeds " << _warnSummary
+ << " characters: `" << comment << "'" << endl;
}
return comment;
@@ -1713,53 +1713,53 @@ Slice::FileVisitor::visitUnitStart(const UnitPtr& u)
bool
Slice::FileVisitor::visitModuleStart(const ModulePtr& m)
{
- _files.insert(m->definitionContext()->filename());
+ _files.insert(m->file());
return true;
}
bool
Slice::FileVisitor::visitExceptionStart(const ExceptionPtr& e)
{
- _files.insert(e->definitionContext()->filename());
+ _files.insert(e->file());
return false;
}
bool
Slice::FileVisitor::visitClassDefStart(const ClassDefPtr& c)
{
- _files.insert(c->definitionContext()->filename());
+ _files.insert(c->file());
return false;
}
void
Slice::FileVisitor::visitClassDecl(const ClassDeclPtr& c)
{
- _files.insert(c->definitionContext()->filename());
+ _files.insert(c->file());
}
bool
Slice::FileVisitor::visitStructStart(const StructPtr& s)
{
- _files.insert(s->definitionContext()->filename());
+ _files.insert(s->file());
return false;
}
void
Slice::FileVisitor::visitSequence(const SequencePtr& s)
{
- _files.insert(s->definitionContext()->filename());
+ _files.insert(s->file());
}
void
Slice::FileVisitor::visitDictionary(const DictionaryPtr& d)
{
- _files.insert(d->definitionContext()->filename());
+ _files.insert(d->file());
}
void
Slice::FileVisitor::visitEnum(const EnumPtr& e)
{
- _files.insert(e->definitionContext()->filename());
+ _files.insert(e->file());
}
Slice::StartPageVisitor::StartPageVisitor(const Files& files)
diff --git a/cpp/src/slice2html/Main.cpp b/cpp/src/slice2html/Main.cpp
index dad5663fdba..a939d6c8b67 100644
--- a/cpp/src/slice2html/Main.cpp
+++ b/cpp/src/slice2html/Main.cpp
@@ -12,6 +12,7 @@
#include <IceUtil/StaticMutex.h>
#include <Slice/Preprocessor.h>
#include <Slice/FileTracker.h>
+#include <Slice/Util.h>
#include <Gen.h>
#include <stdlib.h>
@@ -84,11 +85,14 @@ main(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const char**)argv);
}
catch(const IceUtilInternal::BadOptException& e)
{
- cerr << argv[0] << ": " << e.reason << endl;
+ cerr << argv[0] << ": error: " << e.reason << endl;
usage(argv[0]);
return EXIT_FAILURE;
}
@@ -145,7 +149,8 @@ main(int argc, char* argv[])
s >> indexCount;
if(!s)
{
- cerr << argv[0] << ": the --index operation requires a positive integer argument" << endl;
+ getErrorStream() << argv[0] << ": error: the --index operation requires a positive integer argument"
+ << endl;
usage(argv[0]);
return EXIT_FAILURE;
}
@@ -165,7 +170,8 @@ main(int argc, char* argv[])
s >> summaryCount;
if(!s)
{
- cerr << argv[0] << ": the --summary operation requires a positive integer argument" << endl;
+ getErrorStream() << argv[0] << ": error: the --summary operation requires a positive integer argument"
+ << endl;
usage(argv[0]);
return EXIT_FAILURE;
}
@@ -177,7 +183,7 @@ main(int argc, char* argv[])
if(args.empty())
{
- cerr << argv[0] << ": no input file" << endl;
+ getErrorStream() << argv[0] << ": error: no input file" << endl;
usage(argv[0]);
return EXIT_FAILURE;
}
@@ -245,19 +251,19 @@ main(int argc, char* argv[])
// created files.
FileTracker::instance()->cleanup();
p->destroy();
- cerr << argv[0] << ": " << ex.reason() << endl;
+ getErrorStream() << argv[0] << ": error: " << ex.reason() << endl;
return EXIT_FAILURE;
}
catch(const string& err)
{
FileTracker::instance()->cleanup();
- cerr << argv[0] << ": " << err << endl;
+ getErrorStream() << argv[0] << ": error: " << err << endl;
status = EXIT_FAILURE;
}
catch(const char* err)
{
FileTracker::instance()->cleanup();
- cerr << argv[0] << ": " << err << endl;
+ getErrorStream() << argv[0] << ": error: " << err << endl;
status = EXIT_FAILURE;
}
}
diff --git a/cpp/src/slice2html/Makefile.mak b/cpp/src/slice2html/Makefile.mak
index 4b5e9383392..15272b3edd9 100644
--- a/cpp/src/slice2html/Makefile.mak
+++ b/cpp/src/slice2html/Makefile.mak
@@ -26,7 +26,7 @@ CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
!endif
-!if "$(CPP_COMPILER)" == "BCC2007"
+!if "$(BCPLUSPLUS)" == "yes"
RES_FILE = ,, Slice2Html.res
!else
RES_FILE = Slice2Html.res
@@ -46,7 +46,7 @@ install:: all
copy $(NAME) $(install_bindir)
-!if "$(CPP_COMPILER)" == "BCC2007" && "$(OPTIMIZE)" != "yes"
+!if "$(BCPLUSPLUS)" == "yes" && "$(OPTIMIZE)" != "yes"
install:: all
copy $(NAME:.exe=.tds) $(install_bindir)