rm -f Protocol-A.notab
if grep -n '	' Protocol-A.texi /dev/null ; then echo tabs detected ; exit 1; fi
gawk 'length() > 79 {print FILENAME ":" NR ": too long line"; e=1}\
	END {exit(e)}' Protocol-A.texi
echo no tabs found > Protocol-A.notab
rm -f lyskomd.notab
if grep -n '	' lyskomd.texi /dev/null ; then echo tabs detected ; exit 1; fi
gawk 'length() > 79 {print FILENAME ":" NR ": too long line"; e=1}\
	END {exit(e)}' lyskomd.texi
echo no tabs found > lyskomd.notab
Making info in man
make[1]: Entering directory `/mp/slaskdisk/tmp/xenofarm/lyskom-server/asmodean.lysator.liu.se/buildtmp/dist/lyskom-server-2.0.7/doc/man'
make[1]: Nothing to be done for `info'.
make[1]: Leaving directory `/mp/slaskdisk/tmp/xenofarm/lyskom-server/asmodean.lysator.liu.se/buildtmp/dist/lyskom-server-2.0.7/doc/man'
make[1]: Entering directory `/mp/slaskdisk/tmp/xenofarm/lyskom-server/asmodean.lysator.liu.se/buildtmp/dist/lyskom-server-2.0.7/doc'
make[1]: Nothing to be done for `info-am'.
make[1]: Leaving directory `/mp/slaskdisk/tmp/xenofarm/lyskom-server/asmodean.lysator.liu.se/buildtmp/dist/lyskom-server-2.0.7/doc'
sed -n 's/[0-9][0-9]* : \([^ ]*\) (.*/\1/p' \
../run-support/aux-items.conf \
| tee aux-items.tmp \
| sed 's/.*/@aux{&}/' \
| LANG=C LC_ALL=C LC_COLLATE=C LC_CTYPE=C sort \
> aux-items-@.tmp
sed -n '/^@c BEGIN-EXTRA-AUX$/,/^@c END-EXTRA-AUX$/s/^@item \(.*\) \[[0-9]*\] (.*)$/@aux{\1}/p' \
< ./Protocol-A.texi \
| LANG=C LC_ALL=C LC_COLLATE=C LC_CTYPE=C sort \
> aux-items-extra-@.tmp
python ./filterlines.py aux-items-extra-@.tmp \
< aux-items-@.tmp \
| diff -c aux-items-@.tmp -
python ./filterlines.py aux-items-@.tmp \
< aux-items-extra-@.tmp \
| diff -c aux-items-extra-@.tmp -
sed -e '/^#ifdef/,/^#endif/d' \
    -e '/^#/d' \
    -e '/^$/d' \
< ../src/server/fncdef.txt \
| awk '{print $1, $3}' \
| sed 's/_/-/g' \
| tee requests-numbered.tmp \
| awk '{print $2}' \
| tee requests.tmp \
| sed 's/.*/@req{&}/' \
> requests-@.tmp
sed 's/.*/@reqlink{&}/' \
< requests.tmp >> requests-@.tmp
sed 's/.*/@reqdlink{&}/' \
< requests.tmp >> requests-@.tmp
sed -n -e '/^#if 0/,/^#endif/d' \
       -e '/^#ifdef/,/^#endif/d' \
       -e 's/[ 	]*ay_\([^ ]*\) = \([0-9]*\).*/\2 async_\1/p' \
       ../src/server/async.h \
| sed 's/_/-/g' \
| tee asyncs-numbered.tmp \
| awk '{print $2}' \
| tee asyncs.tmp \
| sed 's/.*/@async{&}/' \
> async-@.tmp
sed 's/.*/@asynclink{&}/' \
< asyncs.tmp >> async-@.tmp
sed 's/.*/@asyncdlink{&}/' \
< asyncs.tmp >> async-@.tmp
cat ../src/include/kom-types.h \
| sed -e '/^enum info_type {/,/};/!d' \
| sed -n -e 's/ *\([^ ]*\)[ 	]*= *\([0-9]*\),.*/\2 \1/p' \
| sed 's/_/-/g' \
| grep -v unknown-info \
| tee miscs-numbered.tmp \
| sed 's/[0-9]* //' \
| tee miscs.tmp \
| sed 's/.*/@misc{&}/' \
> miscs-@.tmp
python ./tac.py < ../src/include/kom-types.h \
| sed -e '/} Conf_type/,/typedef/!d' \
| sed -n -e 's/.*unsigned int[ 	]*\([^ 	:]*\)[ 	]*:.*/\1/p' \
| sed -e 's/_/-/g' \
      -e 's/allow-anon/allow-anonymous/' \
      -e 's/letter-box/letterbox/' \
| tee conftypes.tmp \
| sed 's/.*/@conftype{&}/' \
> conftypes-@.tmp
sed -n 's/@tindex //p' < ./Protocol-A.texi \
| tee types.tmp \
| sed 's/.*/@type{&}/' \
> types-@.tmp
cat ../src/include/kom-errno.h \
| sed -n -e '/enum kom_err/,/};/!d' \
         -e 's/ *KOM_\([A-Z_]*\) *= *\([0-9]*\),.*/\2 \1/p' \
| tr '[A-Z]' '[a-z]' \
| sed -e 's/_/-/g' \
      -e 's/ not-impl$/ not-implemented/' \
      -e 's/ obsolete$/ obsolete-call/' \
      -e 's/ pwd$/ invalid-password/' \
      -e 's/ long-str$/ string-too-long/' \
      -e 's/ login$/ login-first/' \
      -e 's/ conf-zero$/ conference-zero/' \
      -e 's/ undef-conf$/ undefined-conference/' \
      -e 's/ undef-pers$/ undefined-person/' \
      -e 's/ access$/ access-denied/' \
      -e 's/ perm$/ permission-denied/' \
      -e 's/ conf-exists$/ conference-exists/' \
      -e 's/ pers-exists$/ person-exists/' \
      -e 's/ letter-box$/ letterbox/' \
      -e 's/ ldb-err$/ ldb-error/' \
      -e 's/ ill-misc$/ illegal-misc/' \
      -e 's/ comm-limit$/ comment-limit/' \
      -e 's/ foot-limit$/ footnote-limit/' \
      -e 's/ undef-session$/ undefined-session/' \
      -e 's/ tempfail$/ temporary-failure/' \
      -e 's/ anon-rejected$/ anonymous-rejected/' \
      -e 's/ ill-aux$/ illegal-aux-item/' \
      -e 's/ aux-perm$/ aux-item-permission/' \
| tee errorcodes-numbered.tmp \
| sed 's/[0-9]* //' \
| tee errorcodes.tmp \
| sed 's/.*/@errorcode{&}/' \
> errorcodes-@.tmp
python ./tac.py < ../src/include/kom-types.h \
| sed -n -e '/} Priv_bits;/,/typedef[ 	]struct/!d' \
         -e 's/_/-/g' \
         -e 's/.* int[ 	]\([---a-z0-9]*\)[ 	]*:.*/\1/p' \
| tee privbits.tmp \
| sed 's/.*/@priv{&}/' \
> privbits-@.tmp
sed -e '/@bye/,$d' \
    -e '/^@c /d' \
    -e '/^@c$/d' \
    -e '/^@comment /d' \
    -e '/^@macro /,/@end macro/d' \
    -e 's/@{//g' \
    -e 's/@}//g' \
    -e "`echo s/@/\\\\  ;echo @/g`" \
    ./Protocol-A.texi \
| sed -n 's/\(@[^{}]*{[^}]*}\).*/\1/p' \
| grep -v '^@holl{' \
| grep -v '^@badspell{' \
| LANG=C LC_ALL=C LC_COLLATE=C LC_CTYPE=C sort \
| LANG=C LC_ALL=C LC_COLLATE=C LC_CTYPE=C uniq \
> constructs.tmp
cat constructs.tmp \
| grep -v '@rarg{' \
| grep -v '@aarg{' \
| grep -v '@ref{' \
| grep -v '@xref{' \
| grep -v '@pxref{' \
| grep -v '@t{' \
| grep -v '@footnote{' \
| grep -v '@field{' \
| grep -v '@anchor{' \
| grep -v '@lt{' \
| python ./filterlines.py \
    aux-items-@.tmp \
    aux-items-extra-@.tmp \
    requests-@.tmp \
    types-@.tmp \
    async-@.tmp \
    miscs-@.tmp \
    conftypes-@.tmp \
    errorcodes-@.tmp \
    privbits-@.tmp \
> constructs-@.tmp
diff -c ./constructs.expected constructs-@.tmp
python ./checkargs.py ./Protocol-A.texi