#!/bin/sh
# This file is in the public domain.
#
# Instantiates pg_template for a particular function.

for n in $*
do
    NCAPS=`echo $n | tr a-z A-Z`
    if test ! -e $n.c
    then
        cat template.c | sed -e s/template/$n/g -e s/TEMPLATE/$NCAPS/g > $n.c
        cat template.h | sed -e s/template/$n/g -e s/TEMPLATE/$NCAPS/g > ../include/auditor-database/$n.h
    fi
done

