This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[libstdc++] Tweak man page fixups
- From: Phil Edwards <phil at jaj dot com>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 21 Nov 2002 03:17:28 -0500
- Subject: [libstdc++] Tweak man page fixups
Okay, I lied. One more patch.
While spinning new source documentation tarballs, the man page fixer-upper
failed. Turns out that example code in the doxygen markup that happens
to have "#include" really confused it. Fixed thusly, committed to trunk.
And there will be new doxygen output online in a few minutes.
2002-11-21 Phil Edwards <pme@gcc.gnu.org>
* docs/doxygen/run_doxygen: Tighter search expression for sed.
* docs/doxygen/stdheader.cc: Handle the case of good headers.
Index: docs/doxygen/run_doxygen
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/docs/doxygen/run_doxygen,v
retrieving revision 1.18
diff -u -3 -p -r1.18 run_doxygen
--- docs/doxygen/run_doxygen 14 Sep 2002 00:35:18 -0000 1.18
+++ docs/doxygen/run_doxygen 21 Nov 2002 08:15:43 -0000
@@ -208,7 +208,7 @@ g++ ${srcdir}/docs/doxygen/stdheader.cc
problematic=`egrep -l '#include <.*_.*>' [a-z]*.3`
for f in $problematic; do
# this is also slow, but safe and easy to debug
- oldh=`sed -n '/#include </s/.*<\(.*\)>.*/\1/p' $f`
+ oldh=`sed -n '/fC#include </s/.*<\(.*\)>.*/\1/p' $f`
newh=`echo $oldh | ./stdheader`
sed "s=${oldh}=${newh}=" $f > TEMP
mv TEMP $f
Index: docs/doxygen/stdheader.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/docs/doxygen/stdheader.cc,v
retrieving revision 1.1
diff -u -3 -p -r1.1 stdheader.cc
--- docs/doxygen/stdheader.cc 27 Sep 2001 22:44:24 -0000 1.1
+++ docs/doxygen/stdheader.cc 21 Nov 2002 08:15:43 -0000
@@ -111,6 +111,13 @@ void do_word (std::string const& longhea
{
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_"))