#!/bin/sh
MALLOC_WARN=2
export MALLOC_WARN
set -e

for output in n t l h r
do
    for file in *.[ch]
    do
	echo Processing $file
	../c2man -T$output $file
	echo Processing $file from standard input
	../c2man -T$output < $file
	echo Processing $file with -g
	../c2man -T$output -g $file
    done
    
    # now run 'em all at once
    echo Processing everything
    ../c2man -T$output *.[ch]
    echo Processing everything with -g
    ../c2man -T$output -g -G"test output" *.[ch]
done

echo All OK!
rm -f *.html *.3 *.tex *.texi *.txt core


syntax highlighted by Code2HTML, v. 0.9.1