head	1.2;
access;
symbols
	RELENG_4_11_0_RELEASE:1.1.1.1
	RELENG_4_11:1.1.1.1.0.28
	RELENG_4_11_BP:1.1.1.1
	RELENG_4_10_0_RELEASE:1.1.1.1
	RELENG_4_10:1.1.1.1.0.26
	RELENG_4_10_BP:1.1.1.1
	RELENG_4_9_0_RELEASE:1.1.1.1
	RELENG_4_9:1.1.1.1.0.24
	RELENG_4_9_BP:1.1.1.1
	RELENG_4_8_0_RELEASE:1.1.1.1
	RELENG_4_8:1.1.1.1.0.22
	RELENG_4_8_BP:1.1.1.1
	RELENG_4_7_0_RELEASE:1.1.1.1
	RELENG_4_7:1.1.1.1.0.20
	RELENG_4_7_BP:1.1.1.1
	RELENG_4_6_2_RELEASE:1.1.1.1
	RELENG_4_6_1_RELEASE:1.1.1.1
	RELENG_4_6_0_RELEASE:1.1.1.1
	RELENG_4_6:1.1.1.1.0.18
	RELENG_4_6_BP:1.1.1.1
	BEFORE_3_1_0_snap:1.1.1.1
	RELENG_4_5_0_RELEASE:1.1.1.1
	RELENG_4_5:1.1.1.1.0.16
	RELENG_4_5_BP:1.1.1.1
	gcc_2_95_3_with_sjlj_fix:1.1.1.1
	GCC_2_95_3_WITH_FBSD_MODS:1.1.1.1
	gcc_2_95_3:1.1.1.1
	gcc_2_95_3_test3:1.1.1.1
	gcc_2_95_3_test1:1.1.1.1
	REPOCOPY:1.1.1.1
	RELENG_4_4_0_RELEASE:1.1.1.1
	RELENG_4_4:1.1.1.1.0.14
	RELENG_4_4_BP:1.1.1.1
	RELENG_4_3_0_RELEASE:1.1.1.1
	RELENG_4_3:1.1.1.1.0.12
	RELENG_4_3_BP:1.1.1.1
	BEFORE_GCC_2_95_3:1.1.1.1
	RELENG_4_2_0_RELEASE:1.1.1.1
	RELENG_4_1_1_RELEASE:1.1.1.1
	RELENG_4_1_0_RELEASE:1.1.1.1
	RELENG_3_5_0_RELEASE:1.1.1.1
	BEFORE_GCC_2_96_SNAPSHOT:1.1.1.1
	RELENG_4_0_0_RELEASE:1.1.1.1
	RELENG_4:1.1.1.1.0.10
	RELENG_4_BP:1.1.1.1
	EGCS_11x:1.1.1.1.0.8
	RELENG_3_4_0_RELEASE:1.1.1.1
	gcc_2_95_2:1.1.1.1
	BEFORE_GCC_2_95_1:1.1.1.1
	gcc_2_95_1:1.1.1.1
	RELENG_3_3_0_RELEASE:1.1.1.1
	egcs_1_1_2:1.1.1.1
	BEFORE_EGCS_IMPORT:1.1.1.1
	gcc_2_7_2_3:1.1.1.1
	RELENG_3_2_PAO:1.1.1.1.0.6
	RELENG_3_2_PAO_BP:1.1.1.1
	RELENG_3_2_0_RELEASE:1.1.1.1
	RELENG_3_1_0_RELEASE:1.1.1.1
	RELENG_3:1.1.1.1.0.4
	RELENG_3_BP:1.1.1.1
	RELENG_2_2_8_RELEASE:1.1.1.1
	RELENG_3_0_0_RELEASE:1.1.1.1
	RELENG_2_2_7_RELEASE:1.1.1.1
	RELENG_2_2_6_RELEASE:1.1.1.1
	RELENG_2_2_5_RELEASE:1.1.1.1
	RELENG_2_2_2_RELEASE:1.1.1.1
	RELENG_2_2_1_RELEASE:1.1.1.1
	RELENG_2_2_0_RELEASE:1.1.1.1
	RELENG_2_2:1.1.1.1.0.2
	RELENG_2_2_BP:1.1.1.1
	v2_7_2_1:1.1.1.1
	v2_7_2:1.1.1.1
	FSF:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2002.05.10.05.26.44;	author obrien;	state dead;
branches;
next	1.1;

1.1
date	96.09.18.05.35.15;	author peter;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.09.18.05.35.15;	author peter;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2002.05.12.21.50.37;	author obrien;	state dead;
branches;
next	;


desc
@@


1.2
log
@Remove files not part of GCC 3.1.
@
text
@#!/bin/sh
#
# NAME:
#	fixcpp - fix CPP errors
#
# SYNOPSIS:
#	fixcpp [-c][-p patch_file][-b bak_dir][-n new_dir] files(s)
#
# DESCRIPTION:
#	For each named file, use sed(1) to fixup any descriptive
#	text after #else or #endif or that is not properly
#	commented as this causes ANSI compilers to generate
#	unnecessary warnings.
#
#	Naturally this script is not guaranteed to be bullet
#	proof, use of -n or -b is advisable!
#
#	-c causes fixcpp to make sure that only files that
#	needed changing are affected by returning the original
#	file to its original location if no changes were needed.
#
#	-p causes fixcpp to append to a patch file the context
#	diffs of the changes wrought.
#
# SEE ALSO:
#	sed(1)
#
# AMENDED:
#	90/08/08 22:46:32 (sjg)
#
# RELEASED:
#	90/08/08 22:46:34 v1.4
#
# SCCSID:
#	@@(#)fixcpp.sh 1.4 90/08/08 22:46:32 (sjg)
#
#	@@(#)Copyright (c) 1990 Simon J. Gerraty
#
#       This is free software.  It comes with NO WARRANTY.
#       Everyone is granted permission to copy, modify and
#       redistribute this source code provided that all
#       recipients are given similar rights, and that the above
#       copyright notice and this notice are preserved in all
#       copies. 

TMPF=/tmp/fixcpp.$$
NEWDIR=
BAKDIR=
PATCHF=
CHECK=

set -- `getopt "cp:b:n:" $*`
if [ $? != 0 ]; then
	echo "$0 [-c][-p patch_file][-b bakup_dir][-n new_dir] file [file ...]" >&2
	exit 1
fi
for i in $*
do
	case $i in
	-c)	CHECK=yes; shift;;
	-p)	PATCHF=$2; shift 2;;
	-b)	BAKDIR=$2; shift 2;;
	-n)	NEWDIR=$2; shift 2;;
	--)	shift; break;;
	esac
done
NEWDIR=${NEWDIR:-.}
if [ $BAKDIR ]; then
	if [ ! -d $BAKDIR ]; then
		echo "$0: no such directory -- $BAKDIR" >&2
		exit 1
	fi
fi



for i in $*
do
	if [ $BAKDIR ]; then
		mv $i $BAKDIR
		infile=$BAKDIR/$i
	else
		if [ "$NEWDIR" = "." ]; then
			mv $i ${TMPF}
			infile=${TMPF}
		else
			infile=$i
		fi
	fi	
	sed -e 's;^#\([ 	]*e[nl][^ 	]*[ 	][ 	]*\)\([^/ 	][^\*].*\);#\1/* \2 */;' -e 's;^#\([ 	]*e[nl][^ 	]*[ 	][ 	]*\)\([^/ 	]\)$;#\1/* \2 */;' $infile >${NEWDIR}/$i
	if [ "${CHECK}" = "yes" -o ${PATCHF} ]; then
		if cmp -s $infile ${NEWDIR}/$i ; then
			if [ "${CHECK}" = "yes" ]; then
				if [ $BAKDIR ]; then
					mv $infile ${NEWDIR}/$i
				else
					rm ${NEWDIR}/$i
				fi
			fi
		else
			if [ $PATCHF ]; then
				diff -c $infile ${NEWDIR}/$i >> ${PATCHF}
			fi
		fi
	fi

done

rm -f ${TMPF}
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import of unmodified (but trimmed) gcc-2.7.2.  The bigger parts of the
non-i386, non-unix, and generatable files have been trimmed, but can easily
be added in later if needed.

gcc-2.7.2.1 will follow shortly, it's a very small delta to this and it's
handy to have both available for reference for such little cost.

The freebsd-specific changes will then be committed, and once the dust has
settled, the bmakefiles will be committed to use this code.
@
text
@@


1.1.1.2
log
@Remove files not part of GCC 3.1.
@
text
@@

