# HG changeset patch # User jwe # Date 1037160593 0 # Node ID 34ef135b29faf1644de310a7e897ba43933e1b6b # Parent b8ec44432831ebe221880f177259b3b91d8fe51d [project @ 2002-11-13 04:09:53 by jwe] diff -r b8ec44432831 -r 34ef135b29fa doc/ChangeLog --- a/doc/ChangeLog Wed Nov 13 02:49:14 2002 +0000 +++ b/doc/ChangeLog Wed Nov 13 04:09:53 2002 +0000 @@ -1,3 +1,9 @@ +2002-11-12 John W. Eaton + + * interpreter/munge-texi.cc: Use STL map class by default, but + make it easy to revert back to libg++-based Map class if that + fails to work on some systems. + 2002-11-01 Dirk Eddelbuettel * interpreter/Makefile.in (MAN_BASE, MAN_SRC): New variables, use diff -r b8ec44432831 -r 34ef135b29fa doc/interpreter/munge-texi.cc --- a/doc/interpreter/munge-texi.cc Wed Nov 13 02:49:14 2002 +0000 +++ b/doc/interpreter/munge-texi.cc Wed Nov 13 04:09:53 2002 +0000 @@ -20,19 +20,33 @@ */ +#include #include #include #include -#include - -// Someday, I hope that standard template library stuff will just -// work. Until then... -#include "Map.h" static const char doc_delim = ''; +// If this fails to compile and link for you, delete the following +// define to use old non-standard GNU libg++ Map class. + +#define USE_STL + +#if defined (USE_STL) + +#include + +static map help_text + = map (); + +#else + +#include "Map.h" + static CHMap help_text = CHMap (std::string ()); +#endif + static void fatal (const std::string& msg) { @@ -91,7 +105,11 @@ { std::string doc_string = extract_docstring (infile); +#if defined (USE_STL) + if (help_text.find (symbol_name) != help_text.end ()) +#else if (help_text.contains (symbol_name)) +#endif std::cerr << "ignoring duplicate entry for " << symbol_name << "\n"; else