includes="$includes
#include \"$file_name.h\""
;;
+ SN:)
+ section_name="$value"
esac
done
if test -z "$header_comment" -o -z "$c_file_comment" \
dump_man()
{
- echo "NAME"
- printf "\t$name_txt - $desc_txt\n"
- echo "SYNOPSIS"
- printf "\t$syn_txt\n"
- echo "DESCRIPTION"
+ echo ".SS \"$name_txt\""
+ echo "$desc_txt"
+ echo
+ echo "\\fBusage: \\fP$syn_txt"
+ echo
echo "$help_txt"
+ echo
if test -n "$perms_txt"; then
- echo "PERMISSIONS"
+ echo -n "\\fBpermissions:\\fP "
if test "$perms_txt" = "0"; then
- printf "\t(none)\n"
+ echo "(none)"
else
- printf "\t$perms_txt\n"
+ echo "$perms_txt"
fi
fi
-
+ echo
}
com_man()
{
- local cn="$(grep ^codename Makefile.in)"
- local ver="$(grep ^AC_INIT configure.ac \
- | cut -f 2 -d ',')"
- cn=${cn#*=}
- ver=${ver# *[}
- ver=${ver%]}
- echo "r=paraslash-$ver (cn: $cn)"
local n
- local txtdir=txt
- local mandir=man/man1
- local htmldir=html
- local pfx="$1"
- mkdir -p $txtdir $mandir $htmldir || exit 1
+ echo "[$section_name]"
+ echo
while : ; do
read_one_command
if test $ret -lt 0; then
if test $ret -eq 0; then
break
fi
- n=$pfx-$name_txt
- echo "pfx: $pfx, name: $n"
- dump_man > $txtdir/$n.txt
- txt2man -t "$n" -r "$r" < $txtdir/$n.txt \
- | sed -e 1d > $mandir/$n.1
- man2html $mandir/$n.1 > $htmldir/$n.html
+ dump_man #> $txtdir/$n.txt
+# txt2man -t "$n" -r "$r" < $txtdir/$n.txt \
+# | sed -e 1d > $mandir/$n.1
+# man2html $mandir/$n.1 > $htmldir/$n.html
done
}