# Copyright (C) 2001 Bruce Korb # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # Originally written by Bruce Korb # Modified by Lorenzo Bettini #! /bin/sh sdir=`cd 1ドル ; pwd` if [ ! -d "${sdir}" ] || [ $# -eq 0 ] || [ $# -gt 2 ] then echo "USAGE: 0ドル [ ]">&2 echo " defaults to .html">&2 exit 1 fi if [ $# -eq 2 ] then ddir=2ドル else ddir=${sdir}.html fi if [ -d ${ddir} ] then ( rd=".XX$$" mkdir ${rd} mv ${ddir} ${rd} chmod -R u+w ${rd} rm -rf ${rd} & ) fi mkdir ${ddir} ( cd ${sdir} find . -type d ) | \ ( cd ${ddir} while read f ; do mkdir -p $f ; done ) 2> /dev/null ( cd ${sdir} find . -type f ) | \ egrep '\.(c|h|C|H|cc|hh|cpp|hpp)$' | \ while read f do cmd="cpp2html -d -t4 --input=${sdir}/${f} --output=${ddir}/${f}.html" echo $f eval $cmd done cd ${ddir} find * -name '*.html' | sort> .LIST exec 4> index.html cat>&4 <<_eof_ `pwd`

`pwd`

_EOF_
d=""
while read f
do
 dir=`dirname $f`
 if [ X"$dir" = X"$d" ] ; then :
 else
	echo "

Directory $dir">&4 d=$dir fi f=${f%.html} echo " ${f}">&4 done < .LIST rm -f .LIST echo "

AltStyle によって変換されたページ (->オリジナル) /

">&4 exec 4>&-