gcc/libstdc++-v3/doc/doxygen/stdheader.cc
Benjamin Kosnik 4312e020f1 [multiple changes]
2008-01-18  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/*: To...
	* doc/*: ...here.
	* testsuite/Makefile.am: Move doc-performance to...
	* Makefile.am: Add doc to SUBDIRS, move doxygen-* rules to...
	* doc/Makefile.am: Consolidate documentation creation here.
	(doc-doxygen-html): New.
	(doc-doxygen-man): New.
	(doc-performance): New.
	* doc/Makefile.in: New.
	* acinclude.m4 (glibcxx_SUBDIRS): Add doc directory.
	* doc/doxygen/guide.html: Edit for unified html configuration.
	* doc/doxygen/mainpage.html: Same.
	* doc/doxygen/run_doxygen: Same, more namespace fixups for man
	generation.
	* doc/doxygen/user.cfg.in: Update for doxygen 1.5.4.
	
	* include/tr1_impl/random: Remove maint from doxygen markup.
	* include/tr1_impl/functional: Same.
	* include/std/tuple: Same.
	* include/std/streambuf: Same.
	* include/std/bitset: Same.
	* include/std/limits: Same.
	* include/std/fstream: Same.
	* include/std/istream: Same.
	* include/std/sstream: Same.
	* include/ext/pool_allocator.h: Same.
	* include/ext/rc_string_base.h: Same.
	* include/bits/basic_ios.h: Same.
	* include/bits/stl_list.h: Same.
	* include/bits/stl_map.h: Same.
	* include/bits/locale_classes.h: Same.
	* include/bits/stl_set.h: Same.
	* include/bits/stl_iterator_base_types.h: Same.
	* include/bits/basic_string.h: Same.
	* include/bits/stl_multimap.h: Same.
	* include/bits/stl_vector.h: Same.
	* include/bits/ios_base.h: Same.
	* include/bits/stl_deque.h: Same.
	* include/bits/postypes.h: Same.
	* include/bits/stl_multiset.h: Same.
	* include/bits/stl_algo.h: Same.
	* include/bits/stl_iterator.h: Same.
	* include/bits/stl_tempbuf.h: Same.
	* include/bits/stl_construct.h: Same.
	* include/bits/stl_relops.h: Same.
	* include/tr1/tuple: Same.
	* include/backward/auto_ptr.h: Same.

	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
	Fixups for line number changes.	
	* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Same.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_1_neg.cc: Same.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_2_neg.cc: Same.
	* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Same.
	* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Same.
	* testsuite/23_containers/deque/requirements/dr438/
	constructor_1_neg.cc: Same.
	* testsuite/23_containers/deque/requirements/dr438/
	constructor_2_neg.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_1_neg.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_2_neg.cc: Same.
	* testsuite/20_util/auto_ptr/assign_neg.cc: Same.

	* aclocal.m4: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* libmath/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	* scripts/make_graphs.py: Correct paths for new layout.
	
2008-01-17  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (AC_LC_MESSAGES): Remove serial.
	* linkage.m4 (AC_REPLACE_MATHFUNCS): Same.
	* configure: Regenerate.
	* aclocal.m4: Regenerate.

From-SVN: r131625
2008-01-18 08:16:51 +00:00

171 lines
6.6 KiB
C++

// This is a slow larval-stage kludge to help massage the generated man
// pages. It's used like this:
const char* const usage =
"\nTakes on stdin, whitespace-separated words of the form\n"
"\n"
" [bits/]stl_foo.h\n"
" [bits/]std_foo.h\n"
"\n"
"and writes on stdout the nearest matching standard header name.\n"
"\n"
"Takes no command-line arguments.\n"
"\n";
#include <string>
#include <map>
#include <iostream>
typedef std::map<std::string, std::string> Map;
Map headers;
void init_map()
{
// Enter the glamourous world of data entry!! Maintain these!
headers["algo.h"] = "algorithm";
headers["algobase.h"] = "algorithm";
headers["algorithm.h"] = "algorithm";
headers["heap.h"] = "algorithm";
headers["bitset.h"] = "bitset";
headers["complex.h"] = "complex";
//headers["construct.h"] stl_construct.h entirely internal
headers["deque.h"] = "deque";
headers["deque.tcc"] = "deque";
headers["fstream.h"] = "fstream";
headers["fstream.tcc"] = "fstream";
headers["function.h"] = "functional";
headers["functional.h"] = "functional";
headers["iomanip.h"] = "iomanip";
headers["basic_ios.h"] = "ios";
headers["basic_ios.tcc"] = "ios";
headers["ios.h"] = "ios";
headers["iosfwd.h"] = "iosfwd";
headers["iostream.h"] = "iostream";
headers["istream.h"] = "istream";
headers["istream.tcc"] = "istream";
headers["iterator.h"] = "iterator";
headers["iterator_base_funcs.h"] = "iterator";
headers["iterator_base_types.h"] = "iterator";
headers["stream_iterator.h"] = "iterator";
headers["streambuf_iterator.h"] = "iterator";
headers["limits.h"] = "limits";
headers["list.h"] = "list";
headers["list.tcc"] = "list";
headers["codecvt.h"] = "locale";
headers["locale.h"] = "locale";
headers["localefwd.h"] = "locale";
headers["locale_classes.h"] = "locale";
headers["locale_facets.h"] = "locale";
headers["locale_facets.tcc"] = "locale";
headers["map.h"] = "map";
headers["multimap.h"] = "map";
headers["memory.h"] = "memory";
headers["allocator.h"] = "memory";
headers["raw_storage_iter.h"] = "memory";
headers["tempbuf.h"] = "memory";
headers["uninitialized.h"] = "memory";
headers["numeric.h"] = "numeric";
headers["ostream.h"] = "ostream";
headers["ostream.tcc"] = "ostream";
headers["queue.h"] = "queue";
headers["set.h"] = "set";
headers["multiset.h"] = "set";
headers["sstream.h"] = "sstream";
headers["sstream.tcc"] = "sstream";
headers["stack.h"] = "stack";
headers["functexcept.h"] = "stdexcept";
headers["stdexcept.h"] = "stdexcept";
headers["streambuf.h"] = "streambuf";
headers["streambuf.tcc"] = "streambuf";
headers["string.h"] = "string";
headers["char_traits.h"] = "string";
headers["postypes.h"] = "string";
headers["basic_string.h"] = "string";
headers["basic_string.tcc"] = "string";
headers["tree.h"] = "backward/tree.h";
headers["pair.h"] = "utility";
headers["utility.h"] = "utility";
headers["relops.h"] = "utility";
headers["gslice.h"] = "valarray";
headers["gslice_array.h"] = "valarray";
headers["indirect_array.h"] = "valarray";
headers["mask_array.h"] = "valarray";
headers["slice_array.h"] = "valarray";
headers["valarray.h"] = "valarray";
headers["valarray_after.h"] = "valarray";
headers["valarray_before.h"] = "valarray";
headers["valarray_array.h"] = "valarray";
headers["valarray_array.tcc"] = "valarray";
headers["valarray_meta.h"] = "valarray";
headers["bvector.h"] = "vector";
headers["vector.h"] = "vector";
headers["vector.tcc"] = "vector";
//headers["concurrence.h"] who knows
//headers["atomicity.h"] who knows
// C wrappers -- probably was an easier way to do these, but oh well
headers["cassert.h"] = "cassert";
headers["cctype.h"] = "cctype";
headers["cerrno.h"] = "cerrno";
headers["cfloat.h"] = "cfloat";
headers["climits.h"] = "climits";
headers["clocale.h"] = "clocale";
headers["cmath.h"] = "cmath";
headers["csetjmp.h"] = "csetjmp";
headers["csignal.h"] = "csignal";
headers["cstdarg.h"] = "cstdarg";
headers["cstddef.h"] = "cstddef";
headers["cstdio.h"] = "cstdio";
headers["cstdlib.h"] = "cstdlib";
headers["cstring.h"] = "cstring";
headers["ctime.h"] = "ctime";
headers["cwchar.h"] = "cwchar";
headers["cwctype.h"] = "cwctype";
}
void do_word (std::string const& longheader)
{
std::string::size_type start = 0;
// if it doesn't contain a "." then it's already a std header
if (longheader.find(".") == std::string::npos)
{
std::cout << longheader << '\n';
return;
}
if (longheader.substr(start,5) == "bits/") start += 5;
if ((longheader.substr(start,4) == "stl_") ||
(longheader.substr(start,4) == "std_"))
{
start += 4;
}
// come on, gdb, find `p' already...
const char* p = longheader.substr(start).c_str();
Map::iterator word = headers.find(p);
if (word != headers.end())
std::cout << word->second << '\n';
else std::cout << "MAYBE_AN_ERROR_MESSAGE_HERE\n";
}
int main (int argc, char**)
{
if (argc > 1)
{
std::cerr << usage;
exit(0);
}
init_map();
std::string w;
while (std::cin >> w)
do_word (w);
}