From 6d8138b94df9fdf017b9607e044d08941933dab9 Mon Sep 17 00:00:00 2001 From: erg Date: Tue, 15 Apr 2008 17:20:25 +0000 Subject: [PATCH] Add source for info pages to CVS --- doc/infosrc/mkshhtml.sh | 42 ++++++++++++++++++++++++++++ doc/infosrc/mktypes.sh | 61 +++++++++++++++++++++++++++++++++++++++++ doc/infosrc/mrecord.dot | 3 ++ 3 files changed, 106 insertions(+) create mode 100755 doc/infosrc/mkshhtml.sh create mode 100755 doc/infosrc/mktypes.sh create mode 100644 doc/infosrc/mrecord.dot diff --git a/doc/infosrc/mkshhtml.sh b/doc/infosrc/mkshhtml.sh new file mode 100755 index 000000000..e94a91b21 --- /dev/null +++ b/doc/infosrc/mkshhtml.sh @@ -0,0 +1,42 @@ +#! /bin/ksh +typeset -i N_PER_ROW=4 +typeset -i cnt=0 +list= + +function doLine { + echo " " + for s in $@ + do + echo " " + done + echo " " + + echo " " + for s in $@ + do + echo " $s" + done + echo " " +} + +# Use the shapes name in shape list to create the +# contents of an HTML array. + +for s in $(cat shapelist) +do + list=$list" $s" + cnt=$(( $cnt + 1 )) + if [[ $cnt = $N_PER_ROW ]] + then + doLine $list + list= + cnt=0 + fi +done + +if [[ -n "$list" ]] +then + doLine $list +fi + +exit 0 diff --git a/doc/infosrc/mktypes.sh b/doc/infosrc/mktypes.sh new file mode 100755 index 000000000..856260259 --- /dev/null +++ b/doc/infosrc/mktypes.sh @@ -0,0 +1,61 @@ +#! /bin/ksh +typeset -A desc +name= + +# Read in each type description. Store the descriptions +# in the desc array, indexed by the typename. + +OLDIFS="$IFS" +IFS= +while read line +do + c=${line:0:1} + if [[ $c == '#' ]] + then continue + elif [[ $c == ':' ]] + then + if [[ -n "$name" ]] + then + desc[$name]=$txt + txt="" + fi + name=${line#:} + else + if [[ -z "$txt" ]] + then + txt="${line}\n" + else + txt="$txt ${line}\n" + fi + fi +done +IFS="$OLDIFS" + +if [[ -n "$name" ]] +then + desc[$name]=$txt + txt="" +fi + +#print ${!desc[@]} +#print ${desc[@]} +#exit + +# Output type descriptions as an HTML list + +print "

Attribute Type Descriptions

" +print "The following list gives the legal strings corresponding to values of" +print "the given types." +print "
" + +set -s ${!desc[@]} +for i +do + printf "
%s\n" $i $i + print "
${desc[$i]}" +done + +print "
" +print "\n" + +exit 0 diff --git a/doc/infosrc/mrecord.dot b/doc/infosrc/mrecord.dot new file mode 100644 index 000000000..aa0066fb6 --- /dev/null +++ b/doc/infosrc/mrecord.dot @@ -0,0 +1,3 @@ +digraph structs { + struct1 [shape=Mrecord,label=" left| mid\ dle| right"]; +} -- 2.40.0