#!/bin/sh
# $Id: ccgs,v 1.1.1.2 1999/02/22 03:04:16 scottc Exp $
# Pre-process ANSI C files with ansi2knr before compiling.
# Usage: ccgs "cc switches..." ...switches... -c inputfile ... -o outputfile

CFILE=""
OFILE=""
CMD=$1
while [ $# -gt 1 ]
do
	shift
	case "$1" in
	-c) CFILE=$2; shift;;
	-o) OFILE=$2; shift;;
	*) CMD="$CMD $1";;
	esac
done
./ansi2knr $CFILE _temp_$$.c
$CMD -c _temp_$$.c -o $OFILE
rm -f _temp_$$.c
