#! /bin/csh -f

# This C shell script will strip code from .c files, leaving enough for lint to
# process.

#   Copyright (C) 1993  Richard Gooch
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#   Richard Gooch may be reached by email at  karma-request@atnf.csiro.au
#   The postal address is:
#     Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.


# Written by		Richard Gooch	2-JUN-1993

# Last updated by	Richard Gooch	29-SEP-1993


# Usage:	make_lint

rm -f *~ lint/* >& /dev/null

cd master
foreach i (*.c)
    set prefix = `get_prefix $i`
    if ("$status" == "0") then
	echo $i
	echo "#include <karma_${prefix}.h>" > ../lint/$i
	c2lint $i | /usr/lib/cpp | grep -v '^$' >> ../lint/$i
    endif
end
