Mercurial > hg > octave-avbm
changeset 4177:34ef135b29fa
[project @ 2002-11-13 04:09:53 by jwe]
author | jwe |
---|---|
date | Wed, 13 Nov 2002 04:09:53 +0000 |
parents | b8ec44432831 |
children | b75f74a76941 |
files | doc/ChangeLog doc/interpreter/munge-texi.cc |
diffstat | 2 files changed, 29 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2002-11-12 John W. Eaton <jwe@bevo.che.wisc.edu> + + * 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 <edd@debian.org> * interpreter/Makefile.in (MAN_BASE, MAN_SRC): New variables, use
--- a/doc/interpreter/munge-texi.cc +++ b/doc/interpreter/munge-texi.cc @@ -20,19 +20,33 @@ */ +#include <cctype> #include <iostream> #include <fstream> #include <string> -#include <cctype> - -// 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 <map> + +static map<std::string, std::string> help_text + = map<std::string, std::string> (); + +#else + +#include "Map.h" + static CHMap<std::string> help_text = CHMap<std::string> (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