#! /bin/sh -e

dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
    dir="$3/"
elif [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch)
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
        ;;
    *)
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1
esac
exit 0


# DP: link local libstdc++ documentation to local source-level documentation 

--- libstdc++-v3/docs/html/documentation.html~	2003-06-26 00:13:33.000000000 +0200
+++ libstdc++-v3/docs/html/documentation.html	2003-06-26 00:15:27.000000000 +0200
@@ -67,15 +68,9 @@
    the library classes, finding out what is in a particular include
    file, looking at inheritance diagrams, etc.
 </p>
-<p>The source-level documentation for the most recent releases can
-   be viewed online:
+<p>The Source-Level documentation can be viewed online
+   <a href="../html_user/index.html">here</a>.
 </p>
-<ul>
- <li><a href="libstdc++-html-USERS-3.3/index.html">for the 3.3 release</a></li>
- <li><a href="latest-doxygen/index.html">&quot;the latest collection&quot;</a>
-   (for the main development tree; see the date on the first page)
- </li>
-</ul>
 <p>This generated HTML collection, as above, is also available for download in
    the libstdc++ snapshots directory at
    <code>&lt;URL:ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/&gt;</code>.
