From 5cb84ec742fd33f78c8022863fadaa8d0d93e176 Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Sat, 25 Apr 2026 15:32:58 -0400 Subject: feat: Added NetBSD man pages --- static/netbsd/tools/pgcnt | 92 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100755 static/netbsd/tools/pgcnt (limited to 'static/netbsd/tools/pgcnt') diff --git a/static/netbsd/tools/pgcnt b/static/netbsd/tools/pgcnt new file mode 100755 index 00000000..6a7d4f01 --- /dev/null +++ b/static/netbsd/tools/pgcnt @@ -0,0 +1,92 @@ +set x $* +. ./.param + +PATH=$PATH:$MANDIR/tools + +sm= +if test "$PFLAG" -eq 1 +then + sm="-rs1" +fi + +for dir in $DIRLST +do + cd $MANDIR/man$dir + date > $TMPDIR/pages$dir + echo >> $TMPDIR/pages$dir + for file in $FILLST + do + prep="cat $file |" + + first=`line < $file` + case "$first" in + .so*) continue + ;; + \'\\\"*) + option=`expr "$first" : '.* \(.*\)'` + case "$option" in + c) + prep="${prep} cw |" + ;; + e) + prep="${prep} eqn |" + ;; + t) + prep="${prep} tbl |" + ;; + ce | ec) + prep="${prep} cw | eqn" + ;; + ct | tc) + prep="${prep} cw | tbl |" + ;; + et | te) + prep="${prep} tbl | eqn |" + ;; + cet | cte | ect | etc | tce | tec) + prep="${prep} cw | tbl | eqn |" + ;; + esac + ;; + *) + ;; + esac + + numb=`eval ${prep} troff -man $sm -s -f -t | pages` + echo "$file $numb" >> $TMPDIR/pages$dir + done +done + +tsum=0 +cd $TMPDIR +date > totalpgs +echo >> totalpgs + +for dir in $DIRLST +do + ed - pages$dir < tmp.$$ + done < tmp1.$$ + sumt=`line < tmp.$$` + echo "total pages Section $dir -- $sumt" >> totalpgs + tsum=`expr $tsum + $sumt` +done + +echo >> totalpgs +echo >> totalpgs +echo "total pages -- $tsum" >> totalpgs +rm tmp.$$ tmp1.$$ -- cgit v1.2.3