#!/bin/sh # MFOUR="m4 -B 8192" MFOUR="m4" (cat << 'END' undefine(`eval') undefine(`index') undefine(`format') undefine(`include') undefine(`substr') undefine(`paste') define(KEYWORD,`') define(COMMENT,`') define(TITLE,` $2 [ top | up ]

$2

') define(USAGE,`

Syntax

$1
') define(ALIAS,`dnl') define(BEGIN_ARGUMENTS,`

`Arguments'

') define(END_ARGUMENTS,`
') define(ARGUMENTS,`

`Arguments'

$1
') define(ARG,``$1 $2'') define(ITEM,`$1 $2>') define(DESCRIPTION,`

`Description'

$1 ') define(NOTE,`

`Note'

$1 ') define(VALUE,`

`Value'

$1 ') define(SECTION,`

$1

$2') define(VALUES,`

`Values'

$1
$2
') define(REFERENCES,`

`References'

$1 ') define(SEEALSO,`

See Also

$1 ') define(LINK,`$1') define(EXAMPLES,`

`Examples'

$1 ') define(CTRL,`^$1') define(LANG,`$1')dnl define(ITALIC,`$1')dnl define(BOLD,`$1')dnl define(PARA,`

')dnl define(LDOTS,`...') define(EQUALS,`=') define(LT,``<'') define(GT,``>'') define(LE,``<='') define(GE,``>='') define(OVER,`$1 / $2') define(SUP,`{$1}^{$2}^') define(SUB,`{{$1}_{$2}_}') define(CHOOSE,`{\left(\begin{array}{c} $1 \\ $2 \end{array} \right)}') define(PAREN,`{\left( $1 \right)}') define(SP,`') define(greekAlpha,`Α') define(greekGamma,`Γ') define(greekalpha,`α') define(greekpi,`π') define(greekmu,`μ') define(greeksigma,`σ') define(greeklambda,`λ') define(boldgreekbeta,`\bold{β}') define(boldgreekepsilon,`\bold{ε}') define(LOG,`\log') define(SQRT,`\sqrt{$1}') define(EQBOLD,`\bold{$1}') define(EQN,`$1') define(DEQN,`

$2

((Equations will(?) come with HTML 3.x ))
') define(DEQTEX,`') define(DEQHTML,`

$1

') END # Fix up the input to protect things that m4 is sensitive about. sed ' /^ALIAS/,/^EXAMPLES/s/^ *// /^ARGUMENTS/,/^EXAMPLES/s/^ *// /^DESCRIPTION/,/^EXAMPLES/s/^ *// s/unix/M4_unix/g s/#/M4_HASH/g s/\\(/M4_LP/g s/\\(/M4_LP/g s/\\)/M4_RP/g s/`/M4_LQ/g s/'\''/M4_RQ/g s/,/M4_COMMA/g s/ @@ /,/g s/@@/,/g s/ifelse/M4_IFELSE/g ' $*) | $MFOUR |sed ' /^$/d s/^BLANK$// s/DOTS/\.\.\./g s/M4_unix/unix/g s/M4_HASH/#/g s/M4_LP/(/g s/M4_RP/)/g s/M4_LQ/`/g s/M4_RQ/'\''/g s/M4_COMMA/,/g s/M4_IFELSE/ifelse/g ' echo ''