head	1.6;
access;
symbols
	RELENG_8_4:1.6.0.2
	RELENG_9_1_0_RELEASE:1.5.62.1.4.2
	RELENG_9_1:1.5.62.1.0.4
	RELENG_9_1_BP:1.5.62.1
	RELENG_8_3_0_RELEASE:1.5.56.1.8.1
	RELENG_8_3:1.5.56.1.0.8
	RELENG_8_3_BP:1.5.56.1
	RELENG_9_0_0_RELEASE:1.5.62.1.2.1
	RELENG_9_0:1.5.62.1.0.2
	RELENG_9_0_BP:1.5.62.1
	RELENG_9:1.5.0.62
	RELENG_9_BP:1.5
	RELENG_7_4_0_RELEASE:1.5.60.1
	RELENG_8_2_0_RELEASE:1.5.56.1.6.1
	RELENG_7_4:1.5.0.60
	RELENG_7_4_BP:1.5
	RELENG_8_2:1.5.56.1.0.6
	RELENG_8_2_BP:1.5.56.1
	RELENG_8_1_0_RELEASE:1.5.56.1.4.1
	RELENG_8_1:1.5.56.1.0.4
	RELENG_8_1_BP:1.5.56.1
	RELENG_7_3_0_RELEASE:1.5.58.1
	RELENG_7_3:1.5.0.58
	RELENG_7_3_BP:1.5
	RELENG_8_0_0_RELEASE:1.5.56.1.2.1
	RELENG_8_0:1.5.56.1.0.2
	RELENG_8_0_BP:1.5.56.1
	RELENG_8:1.5.0.56
	RELENG_8_BP:1.5
	RELENG_7_2_0_RELEASE:1.5.54.1
	RELENG_7_2:1.5.0.54
	RELENG_7_2_BP:1.5
	RELENG_7_1_0_RELEASE:1.5.52.1
	RELENG_6_4_0_RELEASE:1.5.50.1
	RELENG_7_1:1.5.0.52
	RELENG_7_1_BP:1.5
	RELENG_6_4:1.5.0.50
	RELENG_6_4_BP:1.5
	RELENG_7_0_0_RELEASE:1.5
	RELENG_6_3_0_RELEASE:1.5
	RELENG_7_0:1.5.0.48
	RELENG_7_0_BP:1.5
	RELENG_6_3:1.5.0.46
	RELENG_6_3_BP:1.5
	RELENG_7:1.5.0.44
	RELENG_7_BP:1.5
	RELENG_6_2_0_RELEASE:1.5
	RELENG_6_2:1.5.0.42
	RELENG_6_2_BP:1.5
	RELENG_5_5_0_RELEASE:1.5
	RELENG_5_5:1.5.0.40
	RELENG_5_5_BP:1.5
	RELENG_6_1_0_RELEASE:1.5
	RELENG_6_1:1.5.0.38
	RELENG_6_1_BP:1.5
	RELENG_6_0_0_RELEASE:1.5
	RELENG_6_0:1.5.0.36
	RELENG_6_0_BP:1.5
	RELENG_6:1.5.0.34
	RELENG_6_BP:1.5
	RELENG_5_4_0_RELEASE:1.5
	RELENG_5_4:1.5.0.32
	RELENG_5_4_BP:1.5
	RELENG_4_11_0_RELEASE:1.5
	RELENG_4_11:1.5.0.30
	RELENG_4_11_BP:1.5
	RELENG_5_3_0_RELEASE:1.5
	RELENG_5_3:1.5.0.28
	RELENG_5_3_BP:1.5
	RELENG_5:1.5.0.26
	RELENG_5_BP:1.5
	RELENG_4_10_0_RELEASE:1.5
	RELENG_4_10:1.5.0.24
	RELENG_4_10_BP:1.5
	RELENG_5_2_1_RELEASE:1.5
	RELENG_5_2_0_RELEASE:1.5
	RELENG_5_2:1.5.0.22
	RELENG_5_2_BP:1.5
	RELENG_4_9_0_RELEASE:1.5
	RELENG_4_9:1.5.0.20
	RELENG_4_9_BP:1.5
	RELENG_5_1_0_RELEASE:1.5
	RELENG_5_1:1.5.0.18
	RELENG_5_1_BP:1.5
	RELENG_4_8_0_RELEASE:1.5
	RELENG_4_8:1.5.0.16
	RELENG_4_8_BP:1.5
	RELENG_5_0_0_RELEASE:1.5
	RELENG_5_0:1.5.0.14
	RELENG_5_0_BP:1.5
	RELENG_4_7_0_RELEASE:1.5
	RELENG_4_7:1.5.0.12
	RELENG_4_7_BP:1.5
	RELENG_4_6_2_RELEASE:1.5
	RELENG_4_6_1_RELEASE:1.5
	RELENG_4_6_0_RELEASE:1.5
	RELENG_4_6:1.5.0.10
	RELENG_4_6_BP:1.5
	RELENG_4_5_0_RELEASE:1.5
	RELENG_4_5:1.5.0.8
	RELENG_4_5_BP:1.5
	RELENG_4_4_0_RELEASE:1.5
	RELENG_4_4:1.5.0.6
	RELENG_4_4_BP:1.5
	RELENG_4_3_0_RELEASE:1.5
	RELENG_4_3:1.5.0.4
	RELENG_4_3_BP:1.5
	RELENG_4_2_0_RELEASE:1.5
	RELENG_4_1_1_RELEASE:1.5
	PRE_SMPNG:1.5
	RELENG_4_1_0_RELEASE:1.5
	RELENG_3_5_0_RELEASE:1.4.2.1
	RELENG_4_0_0_RELEASE:1.5
	RELENG_4:1.5.0.2
	RELENG_4_BP:1.5
	RELENG_3_4_0_RELEASE:1.4.2.1
	RELENG_3_3_0_RELEASE:1.4.2.1
	RELENG_3_2_PAO:1.4.0.4
	RELENG_3_2_PAO_BP:1.4
	RELENG_3_2_0_RELEASE:1.4
	RELENG_3_1_0_RELEASE:1.4
	RELENG_3:1.4.0.2
	RELENG_3_BP:1.4
	RELENG_2_2_8_RELEASE:1.2
	RELENG_3_0_0_RELEASE:1.4
	RELENG_2_2_7_RELEASE:1.2
	RELENG_2_2_6_RELEASE:1.2
	RELENG_2_2_5_RELEASE:1.2
	RELENG_2_2_2_RELEASE:1.2
	RELENG_2_2_1_RELEASE:1.2
	RELENG_2_2_0_RELEASE:1.2
	RELENG_2_1_7_RELEASE:1.1.1.1.8.2
	RELENG_2_1_6_1_RELEASE:1.1.1.1.8.2
	RELENG_2_1_6_RELEASE:1.1.1.1.8.2
	RELENG_2_2:1.2.0.2
	RELENG_2_2_BP:1.2
	RELENG_2_1_5_RELEASE:1.1.1.1.8.2
	RELENG_2_1_0_RELEASE:1.1.1.1
	rcs_5_7:1.1.1.2
	GNU:1.1.1
	chkpt_before_rcs_5_7:1.1.1.1
	RELENG_2_1_0:1.1.1.1.0.8
	RELENG_2_1_0_BP:1.1.1.1
	RELENG_2_0_5_RELEASE:1.1.1.1
	RELENG_2_0_5:1.1.1.1.0.6
	RELENG_2_0_5_BP:1.1.1.1
	RELENG_2_0_5_ALPHA:1.1.1.1
	RELEASE_2_0:1.1.1.1
	BETA_2_0:1.1.1.1
	ALPHA_2_0:1.1.1.1.0.4
	MOVED_NEWCVS:1.1.1.1
	FINAL_1_1_5:1.1.1.1
	ALPHA_1_1_5:1.1.1.1
	FINAL_1_1:1.1.1.1
	GAMMA_1_1:1.1.1.1
	BETA_1_1:1.1.1.1.0.2
	BP_BETA_1_1:1.1.1.1
	FINAL_1_0:1.1.1.1
	EPSILON_1_0:1.1.1.1
	GAMMA_1_0:1.1.1.1
	BETA_1_0:1.1.1.1
	ALPHA_1_0:1.1.1.1
	gnu:1.1.1.1;
locks; strict;
comment	@# @;


1.6
date	2012.11.17.01.49.12;	author svnexp;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	99.08.27.23.36.37;	author peter;	state Exp;
branches
	1.5.2.1
	1.5.34.1
	1.5.44.1
	1.5.50.1
	1.5.52.1
	1.5.54.1
	1.5.56.1
	1.5.58.1
	1.5.60.1
	1.5.62.1;
next	1.4;

1.4
date	97.02.22.15.47.15;	author peter;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	97.01.14.05.58.42;	author jkh;	state Exp;
branches;
next	1.2;

1.2
date	95.10.28.21.49.04;	author peter;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	93.06.18.04.22.09;	author jkh;	state Exp;
branches
	1.1.1.1;
next	;

1.6.2.1
date	2012.11.17.01.49.12;	author svnexp;	state dead;
branches;
next	1.6.2.2;

1.6.2.2
date	2013.03.28.13.02.52;	author svnexp;	state Exp;
branches;
next	;

1.5.2.1
date	2012.11.17.07.23.09;	author svnexp;	state Exp;
branches;
next	;

1.5.34.1
date	2012.11.17.07.39.23;	author svnexp;	state Exp;
branches;
next	;

1.5.44.1
date	2012.11.17.08.01.37;	author svnexp;	state Exp;
branches;
next	;

1.5.50.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.5.52.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.5.54.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.5.56.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.5.56.1.2.1
	1.5.56.1.4.1
	1.5.56.1.6.1
	1.5.56.1.8.1;
next	1.5.56.2;

1.5.56.2
date	2012.11.17.10.35.59;	author svnexp;	state Exp;
branches;
next	;

1.5.56.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.5.56.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.5.56.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.5.56.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.5.56.1.8.2;

1.5.56.1.8.2
date	2012.11.17.08.24.40;	author svnexp;	state Exp;
branches;
next	;

1.5.58.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.5.60.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.5.60.2;

1.5.60.2
date	2012.11.17.08.16.39;	author svnexp;	state Exp;
branches;
next	;

1.5.62.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.5.62.1.2.1
	1.5.62.1.4.1;
next	1.5.62.2;

1.5.62.2
date	2012.11.17.11.36.14;	author svnexp;	state Exp;
branches;
next	;

1.5.62.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.5.62.1.2.2;

1.5.62.1.2.2
date	2012.11.17.08.36.14;	author svnexp;	state Exp;
branches;
next	;

1.5.62.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.5.62.1.4.2;

1.5.62.1.4.2
date	2012.11.17.08.47.04;	author svnexp;	state Exp;
branches;
next	;

1.4.2.1
date	99.08.29.14.34.43;	author peter;	state Exp;
branches;
next	;

1.2.2.1
date	99.09.05.11.07.14;	author peter;	state Exp;
branches;
next	;

1.1.1.1
date	93.06.18.04.22.10;	author jkh;	state Exp;
branches
	1.1.1.1.8.1;
next	1.1.1.2;

1.1.1.2
date	95.10.28.21.04.51;	author peter;	state Exp;
branches;
next	;

1.1.1.1.8.1
date	96.05.29.22.37.04;	author jkh;	state Exp;
branches;
next	1.1.1.1.8.2;

1.1.1.1.8.2
date	96.06.05.02.43.31;	author jkh;	state Exp;
branches;
next	1.1.1.1.8.3;

1.1.1.1.8.3
date	99.09.05.11.11.21;	author peter;	state Exp;
branches;
next	;


desc
@@


1.6
log
@Switching exporter and resync
@
text
@#! /bin/sh

# Test RCS's functions.
# The RCS commands are searched for in the PATH as usual;
# to test the working directory's commands, prepend . to your PATH.

# Test RCS by creating files RCS/a.* and RCS/a.c.
# If all goes well, output nothing, and remove the temporary files.
# Otherwise, send a message to standard output.
# Exit status is 0 if OK, 1 if an RCS bug is found, and 2 if scaffolding fails.
# With the -v option, output more debugging info.

# If diff outputs `No differences encountered' when comparing identical files,
# then rcstest may also output these noise lines; ignore them.

# The current directory and ./RCS must be readable, writable, and searchable.

# $FreeBSD: head/gnu/usr.bin/rcs/rcstest 50472 1999-08-27 23:37:10Z peter $


#    Copyright 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert
#    Distributed under license by the Free Software Foundation, Inc.
#
# This file is part of RCS.
#
# RCS 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, or (at your option)
# any later version.
#
# RCS 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 RCS; see the file COPYING.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Report problems and direct all questions to:
#
#     rcs-bugs@@cs.purdue.edu

# The Makefile overrides the following defaults.
: ${ALL_CFLAGS=-Dhas_conf_h}
: ${CC=cc}
: ${DIFF=diff}
# : ${LDFLAGS=} ${LIBS=} tickles old shell bug

CL="$CC $ALL_CFLAGS $LDFLAGS -o a.out"
L=$LIBS

RCSINIT=-x
export RCSINIT

SLASH=/
RCSfile=RCS${SLASH}a.c
RCS_alt=RCS${SLASH}a.d
lockfile=RCS${SLASH}a._

case $1 in
-v) q=; set -x;;
'') q=-q;;
*) echo >&2 "$0: usage: $0 [-v]"; exit 2
esac

if test -d RCS
then rmdir=:
else rmdir=rmdir; mkdir RCS || exit
fi

rm -f a.* $RCSfile $RCS_alt $lockfile &&
echo 1.1 >a.11 &&
echo 1.1.1.1 >a.3x1 &&
echo 1.2 >a.12 || { echo "#initialization failed"; exit 2; }

case "`$DIFF -c a.11 a.3x1`" in
*!\ 1.1.1.1)
	diff="$DIFF -c";;
*)
	echo "#warning: $DIFF -c does not work, so diagnostics may be cryptic"
	diff=$DIFF
esac

rcs -i -L -ta.11 $q a.c &&
test -r $RCSfile || {
	echo "#rcs -i -L failed; perhaps RCS is not properly installed."
	exit 1
}

rlog a.c >/dev/null || { echo "#rlog failed on empty RCS file"; exit 1; }
rm -f $RCSfile || exit 2

cp a.11 a.c &&
ci -ta.11 -mm $q a.c &&
test -r $RCSfile &&
rcs -L $q a.c || { echo "#ci+rcs -L failed"; exit 1; }
test ! -f a.c || { echo "#ci did not remove working file"; exit 1; }
for l in '' '-l'
do
	co $l $q a.c &&
	test -f a.c || { echo '#co' $l did not create working file; exit 1; }
	$diff a.11 a.c || { echo '#ci' followed by co $l is not a no-op; exit 1; }
done

cp a.12 a.c &&
ci -mm $q a.c &&
co $q a.c &&
$diff a.12 a.c || { echo "#ci+co failed"; exit 1; }

rm -f a.c &&
co -r1.1 $q a.c &&
$diff a.11 a.c || { echo "#can't retrieve first revision"; exit 1; }

rm -f a.c &&
cp a.3x1 a.c &&
ci -r1.1.1 -mm $q a.c &&
co -r1.1.1.1 $q a.c &&
$diff a.3x1 a.c || { echo "#branches failed"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
ci -f -mm $q a.c &&
co -r1.3 $q a.c &&
$diff a.12 a.c || { echo "#(co -l; ci -f) failed"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
echo 1.4 >a.c &&
ci -l -mm $q a.c &&
echo error >a.c &&
ci -mm $q a.c || { echo "#ci -l failed"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
echo 1.5 >a.c &&
ci -u -mm $q a.c &&
test -r a.c || { echo "#ci -u didn't create a working file"; exit 1; }
rm -f a.c &&
echo error >a.c || exit 2
ci -mm $q a.c 2>/dev/null && { echo "#ci -u didn't unlock the file"; exit 1; }

rm -f a.c &&
rcs -l $q a.c &&
co -u $q a.c || { echo "#rcs -l + co -u failed"; exit 1; }
rm -f a.c &&
echo error >a.c || exit 2
ci -mm $q a.c 2>/dev/null && { echo "#co -u didn't unlock the file"; exit 1; }

rm -f a.c &&
cp a.11 a.c &&
co -f $q a.c || { echo "#co -f failed"; exit 1; }
$diff a.11 a.c >/dev/null && { echo "#co -f had no effect"; exit 1; }

co -p1.1 $q a.c >a.t &&
$diff a.11 a.t || { echo "#co -p failed"; exit 1; }

for n in n N
do
	rm -f a.c &&
	co -l $q a.c &&
	echo $n >a.$n &&
	cp a.$n a.c &&
	ci -${n}n -mm $q a.c &&
	co -rn $q a.c &&
	$diff a.$n a.c || { echo "#ci -$n failed"; exit 1; }
done

case $LOGNAME in
?*) me=$LOGNAME;;
*)
	case $USER in
	?*) me=$USER;;
	*)
		me=`who am i` || exit 2
		me=`echo "$me" | sed -e 's/ .*//' -e 's/.*!//'`
		case $me in
		'') echo >&2 "$0: cannot deduce user name"; exit 2
		esac
	esac
esac


# Get the date of the previous revision in UTC.
date=`rlog -r a.c | sed -n '/^date: /{ s///; s/;.*//; p; q; }'` || exit
case $date in
[0-9][0-9][0-9]*[0-9]/[0-1][0-9]/[0-3][0-9]\ [0-2][0-9]:[0-5][0-9]:[0-6][0-9]);;
*) echo >&2 "$0: $date: bad rlog date output"; exit 1
esac
PWD=`pwd` && export PWD &&
rm -f a.c &&
co -l $q a.c &&
sed 's/@@/$/g' >a.kv <<EOF
@@Author: w @@
@@Date: $date @@
@@Header: $PWD$SLASH$RCSfile 2.1 $date w s @@
@@Id: a.c 2.1 $date w s @@
@@Locker:  @@
 * @@Log: a.c @@
 * Revision 2.1  $date  w
 * m
 *
@@Name: Oz @@
@@RCSfile: a.c @@
@@Revision: 2.1 @@
@@Source: $PWD$SLASH$RCSfile @@
@@State: s @@
EOF
test $? = 0 &&
sed 's/:.*\$/$/' a.kv >a.k &&
sed -e 's/w s [$]/w s '"$me"' $/' -e 's/[$]Locker: /&'"$me/" a.kv >a.kvl &&
sed s/Oz//g a.kv >a.e &&
sed s/Oz/N/g a.kv >a.N &&
sed -e '/\$/!d' -e 's/\$$/: old $/' a.k >a.o &&
sed -e 's/\$[^ ]*: //' -e 's/ \$//' a.kv >a.v &&
cp a.o a.c &&
ci -d"$date" -nOz -ss -ww -u2.1 -mm $q a.c &&
$diff a.kv a.c || { echo "#keyword expansion failed"; exit 1; }
co -pOz -ko $q a.c >a.oo &&
$diff a.o a.oo || { echo "#co -p -ko failed"; exit 1; }
cp a.kv a.o && cp a.o a.b || exit 2
rcs -oOz $q a.c &&
rcs -l $q a.c &&
ci -k -u $q a.c &&
$diff a.kv a.c || { echo "#ci -k failed"; exit 1; }
sed -n 's/^[^$]*\$/$/p' a.kv >a.i &&
ident a.c >a.i1 &&
sed -e 1d -e 's/^[	 ]*//' a.i1 >a.i2 &&
$diff a.i a.i2 || { echo "#ident failed"; exit 1; }

rcs -i $q a.c 2>/dev/null && { echo "#rcs -i permitted existing file"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
echo 2.2 >a.c &&
ci -mm $q a.c &&
echo 1.1.1.2 >a.c &&
rcs -l1.1.1 $q a.c &&
ci -r1.1.1.2 -mm $q a.c &&
rcs -b1.1.1 $q a.c &&
test " `co -p $q a.c`" = ' 1.1.1.2' || { echo "#rcs -b1.1.1 failed"; exit 1; }
rcs -b $q a.c &&
test " `co -p $q a.c`" = ' 2.2' || { echo "#rcs -b failed"; exit 1; }

echo 2.3 >a.c || exit 2
rcs -U $q a.c || { echo "#rcs -U failed"; exit 1; }
ci -mm $q a.c || { echo "#rcs -U didn't unset strict locking"; exit 1; }
rcs -L $q a.c || { echo "#rcs -L failed"; exit 1; }
echo error >a.c || exit 2
ci -mm $q a.c 2>/dev/null && { echo "#ci retest failed"; exit 1; }

rm -f a.c &&
log0=`rlog -h a.c` &&
co -l $q a.c &&
ci -mm $q a.c &&
log1=`rlog -h a.c` &&
test " $log0" = " $log1" || { echo "#unchanged ci didn't revert"; exit 1; }

rm -f a.c &&
rcs -nN:1.1 $q a.c &&
co -rN $q a.c &&
$diff a.11 a.c || { echo "#rcs -n failed"; exit 1; }

rm -f a.c &&
rcs -NN:2.1 $q a.c &&
co -rN $q a.c &&
$diff a.N a.c || { echo "#rcs -N failed"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
echo ':::$''Log$' >a.c &&
ci -u -mm $q a.c &&
test " `sed '$!d' a.c`" = ' :::' || { echo "#comment leader failed"; exit 1; }

rm -f a.c &&
rcs -o2.2: $q a.c &&
co $q a.c &&
$diff a.e a.c || { echo "#rcs -o failed"; exit 1; }

rcsdiff -r1.1 -rOz $q a.c >a.0
case $? in
1) ;;
*) echo "#rcsdiff bad status"; exit 1
esac
$DIFF a.11 a.kv >a.1
$diff a.0 a.1 || { echo "#rcsdiff failed"; exit 1; }

rcs -l2.1 $q a.c || { echo "#rcs -l2.1 failed"; exit 1; }
for i in b k kv kvl o v
do
	rm -f a.c &&
	cp a.$i a.c &&
	rcsdiff -k$i -rOz $q a.c || { echo "#rcsdiff -k$i failed"; exit 1; }
done
co -p1.1 -ko $q a.c >a.t &&
$diff a.11 a.t || { echo "#co -p1.1 -ko failed"; exit 1; }
rcs -u2.1 $q a.c || { echo "#rcs -u2.1 failed"; exit 1; }

rm -f a.c &&
rcsclean $q a.c &&
rcsclean -u $q a.c || { echo "#rcsclean botched a nonexistent file"; exit 1; }

rm -f a.c &&
co $q a.c &&
rcsclean -n $q a.c &&
rcsclean -n -u $q a.c &&
test -f a.c || { echo "#rcsclean -n removed a file"; exit 1; }

rm -f a.c &&
co $q a.c &&
rcsclean $q a.c &&
test ! -f a.c || { echo "#rcsclean missed an unlocked file"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
rcsclean $q a.c &&
test -f a.c || { echo "#rcsclean removed a locked file"; exit 1; }
rcsclean -u $q a.c &&
test ! -f a.c || {
	echo "#rcsclean -u missed an unchanged locked file"; exit 1;
}

rm -f a.c &&
co -l $q a.c &&
echo change >>a.c &&
rcsclean $q a.c &&
rcsclean $q -u a.c &&
test -f a.c || { echo "#rcsclean removed a changed file"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
cat >a.c <<'EOF'
2.2
a
b
c
d
EOF
test $? = 0 &&
ci -l -mm $q a.c &&
co -p2.2 $q a.c | sed -e s/2.2/2.3/ -e s/b/b1/ >a.c &&
ci -l -mm $q a.c &&
co -p2.2 $q a.c | sed -e s/2.2/new/ -e s/d/d1/ >a.c || exit 2
cat >a.0 <<'EOF'
2.3
a
b1
c
d1
EOF
cat >a.1 <<'EOF'
<<<<<<< a.c
new
=======
2.3
>>>>>>> 2.3
a
b1
c
d1
EOF
rcsmerge -E -r2.2 -r2.3 $q a.c
case $? in
0)
	if $diff a.0 a.c >/dev/null
	then echo "#warning: diff3 -E does not work, " \
		"so merge and rcsmerge ignore overlaps and suppress overlap lines."
	else
		$diff a.1 a.c || { echo "#rcsmerge failed (status 0)"; exit 1; }
		echo "#warning: The diff3 lib program exit status ignores overlaps," \
			"so rcsmerge does not warn about overlap lines that it generates."
	fi
	;;
1)
	$diff a.1 a.c || { echo "#rcsmerge failed (status 1)"; exit 1; }
	;;
*)
	echo "#rcsmerge bad status"; exit 1
esac

# Avoid `tr' if possible; it's not portable, and it can't handle null bytes.
# Our substitute exclusive-ORs with '\n';
# this ensures null bytes on output, which is even better than `tr',
# since some diffs think a file is binary only if it contains null bytes.
cat >a.c <<'EOF'
#include <stdio.h>
int main() {
	int c;
	while ((c=getchar()) != EOF)
		putchar(c ^ '\n');
	return 0;
}
EOF
tr=tr
if (rm -f a.exe a.out && $CL a.c $L >&2) >/dev/null 2>&1
then
	if test -s a.out
	then tr=./a.out
	elif test -s a.exe
	then tr=./a.exe
	fi
fi
{
	co -p $q a.c | $tr '\012' '\200' >a.24 &&
	cp a.24 a.c &&
	ciOut=`(ci -l -mm $q a.c 2>&1)` &&
	case $ciOut in
	?*) echo >&2 "$ciOut"
	esac &&
	co -p $q a.c | $tr '\200' '\012' >a.c &&
	rcsdiff -r2.3 $q a.c >/dev/null &&

	echo 2.5 >a.c &&
	ci -l -mm $q a.c &&
	cp a.24 a.c &&
	rcsdiff -r2.4 $q a.c >/dev/null
} || echo "#warning: Traditional diff is used, so RCS is limited to text files."

rcs -u -o2.4: $q a.c || { echo "#rcs -u -o failed"; exit 1; }

rcs -i -Aa.c -t- $q a.d || { echo "#rcs -i -A failed"; exit 1; }

rlog -r2.1 a.c >a.t &&
grep '^checked in with -k' a.t >/dev/null &&
sed '/^checked in with -k/d' a.t >a.u &&
$diff - a.u <<EOF

RCS file: $RCSfile
Working file: a.c
head: 2.3
branch:
locks: strict
access list:
symbolic names:
	N: 2.1
	Oz: 2.1
	n: 1.8
keyword substitution: kv
total revisions: 13;	selected revisions: 1
description:
1.1
----------------------------
revision 2.1
date: $date;  author: w;  state: s;  lines: +14 -1
=============================================================================
EOF
test $? = 0 || { echo "#rlog failed"; exit 1; }


test ! -f $lockfile || { echo "#lock file not removed"; exit 1; }

rm -f a.* $RCSfile $RCS_alt
$rmdir RCS
@


1.6.2.1
log
@file rcstest was added on branch RELENG_8_4 on 2013-03-28 13:02:52 +0000
@
text
@d1 454
@


1.6.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 454
#! /bin/sh

# Test RCS's functions.
# The RCS commands are searched for in the PATH as usual;
# to test the working directory's commands, prepend . to your PATH.

# Test RCS by creating files RCS/a.* and RCS/a.c.
# If all goes well, output nothing, and remove the temporary files.
# Otherwise, send a message to standard output.
# Exit status is 0 if OK, 1 if an RCS bug is found, and 2 if scaffolding fails.
# With the -v option, output more debugging info.

# If diff outputs `No differences encountered' when comparing identical files,
# then rcstest may also output these noise lines; ignore them.

# The current directory and ./RCS must be readable, writable, and searchable.

# $FreeBSD: releng/8.4/gnu/usr.bin/rcs/rcstest 50472 1999-08-27 23:37:10Z peter $


#    Copyright 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert
#    Distributed under license by the Free Software Foundation, Inc.
#
# This file is part of RCS.
#
# RCS 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, or (at your option)
# any later version.
#
# RCS 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 RCS; see the file COPYING.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Report problems and direct all questions to:
#
#     rcs-bugs@@cs.purdue.edu

# The Makefile overrides the following defaults.
: ${ALL_CFLAGS=-Dhas_conf_h}
: ${CC=cc}
: ${DIFF=diff}
# : ${LDFLAGS=} ${LIBS=} tickles old shell bug

CL="$CC $ALL_CFLAGS $LDFLAGS -o a.out"
L=$LIBS

RCSINIT=-x
export RCSINIT

SLASH=/
RCSfile=RCS${SLASH}a.c
RCS_alt=RCS${SLASH}a.d
lockfile=RCS${SLASH}a._

case $1 in
-v) q=; set -x;;
'') q=-q;;
*) echo >&2 "$0: usage: $0 [-v]"; exit 2
esac

if test -d RCS
then rmdir=:
else rmdir=rmdir; mkdir RCS || exit
fi

rm -f a.* $RCSfile $RCS_alt $lockfile &&
echo 1.1 >a.11 &&
echo 1.1.1.1 >a.3x1 &&
echo 1.2 >a.12 || { echo "#initialization failed"; exit 2; }

case "`$DIFF -c a.11 a.3x1`" in
*!\ 1.1.1.1)
	diff="$DIFF -c";;
*)
	echo "#warning: $DIFF -c does not work, so diagnostics may be cryptic"
	diff=$DIFF
esac

rcs -i -L -ta.11 $q a.c &&
test -r $RCSfile || {
	echo "#rcs -i -L failed; perhaps RCS is not properly installed."
	exit 1
}

rlog a.c >/dev/null || { echo "#rlog failed on empty RCS file"; exit 1; }
rm -f $RCSfile || exit 2

cp a.11 a.c &&
ci -ta.11 -mm $q a.c &&
test -r $RCSfile &&
rcs -L $q a.c || { echo "#ci+rcs -L failed"; exit 1; }
test ! -f a.c || { echo "#ci did not remove working file"; exit 1; }
for l in '' '-l'
do
	co $l $q a.c &&
	test -f a.c || { echo '#co' $l did not create working file; exit 1; }
	$diff a.11 a.c || { echo '#ci' followed by co $l is not a no-op; exit 1; }
done

cp a.12 a.c &&
ci -mm $q a.c &&
co $q a.c &&
$diff a.12 a.c || { echo "#ci+co failed"; exit 1; }

rm -f a.c &&
co -r1.1 $q a.c &&
$diff a.11 a.c || { echo "#can't retrieve first revision"; exit 1; }

rm -f a.c &&
cp a.3x1 a.c &&
ci -r1.1.1 -mm $q a.c &&
co -r1.1.1.1 $q a.c &&
$diff a.3x1 a.c || { echo "#branches failed"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
ci -f -mm $q a.c &&
co -r1.3 $q a.c &&
$diff a.12 a.c || { echo "#(co -l; ci -f) failed"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
echo 1.4 >a.c &&
ci -l -mm $q a.c &&
echo error >a.c &&
ci -mm $q a.c || { echo "#ci -l failed"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
echo 1.5 >a.c &&
ci -u -mm $q a.c &&
test -r a.c || { echo "#ci -u didn't create a working file"; exit 1; }
rm -f a.c &&
echo error >a.c || exit 2
ci -mm $q a.c 2>/dev/null && { echo "#ci -u didn't unlock the file"; exit 1; }

rm -f a.c &&
rcs -l $q a.c &&
co -u $q a.c || { echo "#rcs -l + co -u failed"; exit 1; }
rm -f a.c &&
echo error >a.c || exit 2
ci -mm $q a.c 2>/dev/null && { echo "#co -u didn't unlock the file"; exit 1; }

rm -f a.c &&
cp a.11 a.c &&
co -f $q a.c || { echo "#co -f failed"; exit 1; }
$diff a.11 a.c >/dev/null && { echo "#co -f had no effect"; exit 1; }

co -p1.1 $q a.c >a.t &&
$diff a.11 a.t || { echo "#co -p failed"; exit 1; }

for n in n N
do
	rm -f a.c &&
	co -l $q a.c &&
	echo $n >a.$n &&
	cp a.$n a.c &&
	ci -${n}n -mm $q a.c &&
	co -rn $q a.c &&
	$diff a.$n a.c || { echo "#ci -$n failed"; exit 1; }
done

case $LOGNAME in
?*) me=$LOGNAME;;
*)
	case $USER in
	?*) me=$USER;;
	*)
		me=`who am i` || exit 2
		me=`echo "$me" | sed -e 's/ .*//' -e 's/.*!//'`
		case $me in
		'') echo >&2 "$0: cannot deduce user name"; exit 2
		esac
	esac
esac


# Get the date of the previous revision in UTC.
date=`rlog -r a.c | sed -n '/^date: /{ s///; s/;.*//; p; q; }'` || exit
case $date in
[0-9][0-9][0-9]*[0-9]/[0-1][0-9]/[0-3][0-9]\ [0-2][0-9]:[0-5][0-9]:[0-6][0-9]);;
*) echo >&2 "$0: $date: bad rlog date output"; exit 1
esac
PWD=`pwd` && export PWD &&
rm -f a.c &&
co -l $q a.c &&
sed 's/@@/$/g' >a.kv <<EOF
@@Author: w @@
@@Date: $date @@
@@Header: $PWD$SLASH$RCSfile 2.1 $date w s @@
@@Id: a.c 2.1 $date w s @@
@@Locker:  @@
 * @@Log: a.c @@
 * Revision 2.1  $date  w
 * m
 *
@@Name: Oz @@
@@RCSfile: a.c @@
@@Revision: 2.1 @@
@@Source: $PWD$SLASH$RCSfile @@
@@State: s @@
EOF
test $? = 0 &&
sed 's/:.*\$/$/' a.kv >a.k &&
sed -e 's/w s [$]/w s '"$me"' $/' -e 's/[$]Locker: /&'"$me/" a.kv >a.kvl &&
sed s/Oz//g a.kv >a.e &&
sed s/Oz/N/g a.kv >a.N &&
sed -e '/\$/!d' -e 's/\$$/: old $/' a.k >a.o &&
sed -e 's/\$[^ ]*: //' -e 's/ \$//' a.kv >a.v &&
cp a.o a.c &&
ci -d"$date" -nOz -ss -ww -u2.1 -mm $q a.c &&
$diff a.kv a.c || { echo "#keyword expansion failed"; exit 1; }
co -pOz -ko $q a.c >a.oo &&
$diff a.o a.oo || { echo "#co -p -ko failed"; exit 1; }
cp a.kv a.o && cp a.o a.b || exit 2
rcs -oOz $q a.c &&
rcs -l $q a.c &&
ci -k -u $q a.c &&
$diff a.kv a.c || { echo "#ci -k failed"; exit 1; }
sed -n 's/^[^$]*\$/$/p' a.kv >a.i &&
ident a.c >a.i1 &&
sed -e 1d -e 's/^[	 ]*//' a.i1 >a.i2 &&
$diff a.i a.i2 || { echo "#ident failed"; exit 1; }

rcs -i $q a.c 2>/dev/null && { echo "#rcs -i permitted existing file"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
echo 2.2 >a.c &&
ci -mm $q a.c &&
echo 1.1.1.2 >a.c &&
rcs -l1.1.1 $q a.c &&
ci -r1.1.1.2 -mm $q a.c &&
rcs -b1.1.1 $q a.c &&
test " `co -p $q a.c`" = ' 1.1.1.2' || { echo "#rcs -b1.1.1 failed"; exit 1; }
rcs -b $q a.c &&
test " `co -p $q a.c`" = ' 2.2' || { echo "#rcs -b failed"; exit 1; }

echo 2.3 >a.c || exit 2
rcs -U $q a.c || { echo "#rcs -U failed"; exit 1; }
ci -mm $q a.c || { echo "#rcs -U didn't unset strict locking"; exit 1; }
rcs -L $q a.c || { echo "#rcs -L failed"; exit 1; }
echo error >a.c || exit 2
ci -mm $q a.c 2>/dev/null && { echo "#ci retest failed"; exit 1; }

rm -f a.c &&
log0=`rlog -h a.c` &&
co -l $q a.c &&
ci -mm $q a.c &&
log1=`rlog -h a.c` &&
test " $log0" = " $log1" || { echo "#unchanged ci didn't revert"; exit 1; }

rm -f a.c &&
rcs -nN:1.1 $q a.c &&
co -rN $q a.c &&
$diff a.11 a.c || { echo "#rcs -n failed"; exit 1; }

rm -f a.c &&
rcs -NN:2.1 $q a.c &&
co -rN $q a.c &&
$diff a.N a.c || { echo "#rcs -N failed"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
echo ':::$''Log$' >a.c &&
ci -u -mm $q a.c &&
test " `sed '$!d' a.c`" = ' :::' || { echo "#comment leader failed"; exit 1; }

rm -f a.c &&
rcs -o2.2: $q a.c &&
co $q a.c &&
$diff a.e a.c || { echo "#rcs -o failed"; exit 1; }

rcsdiff -r1.1 -rOz $q a.c >a.0
case $? in
1) ;;
*) echo "#rcsdiff bad status"; exit 1
esac
$DIFF a.11 a.kv >a.1
$diff a.0 a.1 || { echo "#rcsdiff failed"; exit 1; }

rcs -l2.1 $q a.c || { echo "#rcs -l2.1 failed"; exit 1; }
for i in b k kv kvl o v
do
	rm -f a.c &&
	cp a.$i a.c &&
	rcsdiff -k$i -rOz $q a.c || { echo "#rcsdiff -k$i failed"; exit 1; }
done
co -p1.1 -ko $q a.c >a.t &&
$diff a.11 a.t || { echo "#co -p1.1 -ko failed"; exit 1; }
rcs -u2.1 $q a.c || { echo "#rcs -u2.1 failed"; exit 1; }

rm -f a.c &&
rcsclean $q a.c &&
rcsclean -u $q a.c || { echo "#rcsclean botched a nonexistent file"; exit 1; }

rm -f a.c &&
co $q a.c &&
rcsclean -n $q a.c &&
rcsclean -n -u $q a.c &&
test -f a.c || { echo "#rcsclean -n removed a file"; exit 1; }

rm -f a.c &&
co $q a.c &&
rcsclean $q a.c &&
test ! -f a.c || { echo "#rcsclean missed an unlocked file"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
rcsclean $q a.c &&
test -f a.c || { echo "#rcsclean removed a locked file"; exit 1; }
rcsclean -u $q a.c &&
test ! -f a.c || {
	echo "#rcsclean -u missed an unchanged locked file"; exit 1;
}

rm -f a.c &&
co -l $q a.c &&
echo change >>a.c &&
rcsclean $q a.c &&
rcsclean $q -u a.c &&
test -f a.c || { echo "#rcsclean removed a changed file"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
cat >a.c <<'EOF'
2.2
a
b
c
d
EOF
test $? = 0 &&
ci -l -mm $q a.c &&
co -p2.2 $q a.c | sed -e s/2.2/2.3/ -e s/b/b1/ >a.c &&
ci -l -mm $q a.c &&
co -p2.2 $q a.c | sed -e s/2.2/new/ -e s/d/d1/ >a.c || exit 2
cat >a.0 <<'EOF'
2.3
a
b1
c
d1
EOF
cat >a.1 <<'EOF'
<<<<<<< a.c
new
=======
2.3
>>>>>>> 2.3
a
b1
c
d1
EOF
rcsmerge -E -r2.2 -r2.3 $q a.c
case $? in
0)
	if $diff a.0 a.c >/dev/null
	then echo "#warning: diff3 -E does not work, " \
		"so merge and rcsmerge ignore overlaps and suppress overlap lines."
	else
		$diff a.1 a.c || { echo "#rcsmerge failed (status 0)"; exit 1; }
		echo "#warning: The diff3 lib program exit status ignores overlaps," \
			"so rcsmerge does not warn about overlap lines that it generates."
	fi
	;;
1)
	$diff a.1 a.c || { echo "#rcsmerge failed (status 1)"; exit 1; }
	;;
*)
	echo "#rcsmerge bad status"; exit 1
esac

# Avoid `tr' if possible; it's not portable, and it can't handle null bytes.
# Our substitute exclusive-ORs with '\n';
# this ensures null bytes on output, which is even better than `tr',
# since some diffs think a file is binary only if it contains null bytes.
cat >a.c <<'EOF'
#include <stdio.h>
int main() {
	int c;
	while ((c=getchar()) != EOF)
		putchar(c ^ '\n');
	return 0;
}
EOF
tr=tr
if (rm -f a.exe a.out && $CL a.c $L >&2) >/dev/null 2>&1
then
	if test -s a.out
	then tr=./a.out
	elif test -s a.exe
	then tr=./a.exe
	fi
fi
{
	co -p $q a.c | $tr '\012' '\200' >a.24 &&
	cp a.24 a.c &&
	ciOut=`(ci -l -mm $q a.c 2>&1)` &&
	case $ciOut in
	?*) echo >&2 "$ciOut"
	esac &&
	co -p $q a.c | $tr '\200' '\012' >a.c &&
	rcsdiff -r2.3 $q a.c >/dev/null &&

	echo 2.5 >a.c &&
	ci -l -mm $q a.c &&
	cp a.24 a.c &&
	rcsdiff -r2.4 $q a.c >/dev/null
} || echo "#warning: Traditional diff is used, so RCS is limited to text files."

rcs -u -o2.4: $q a.c || { echo "#rcs -u -o failed"; exit 1; }

rcs -i -Aa.c -t- $q a.d || { echo "#rcs -i -A failed"; exit 1; }

rlog -r2.1 a.c >a.t &&
grep '^checked in with -k' a.t >/dev/null &&
sed '/^checked in with -k/d' a.t >a.u &&
$diff - a.u <<EOF

RCS file: $RCSfile
Working file: a.c
head: 2.3
branch:
locks: strict
access list:
symbolic names:
	N: 2.1
	Oz: 2.1
	n: 1.8
keyword substitution: kv
total revisions: 13;	selected revisions: 1
description:
1.1
----------------------------
revision 2.1
date: $date;  author: w;  state: s;  lines: +14 -1
=============================================================================
EOF
test $? = 0 || { echo "#rlog failed"; exit 1; }


test ! -f $lockfile || { echo "#lock file not removed"; exit 1; }

rm -f a.* $RCSfile $RCS_alt
$rmdir RCS
@


1.5
log
@$Id$ -> $FreeBSD$
@
text
@d18 1
a18 1
# $FreeBSD$
@


1.5.44.1
log
@Switch importer
@
text
@d18 1
a18 1
# $FreeBSD: stable/7/gnu/usr.bin/rcs/rcstest 50472 1999-08-27 23:37:10Z peter $
@


1.5.34.1
log
@Switch importer
@
text
@d18 1
a18 1
# $FreeBSD: stable/6/gnu/usr.bin/rcs/rcstest 50472 1999-08-27 23:37:10Z peter $
@


1.5.2.1
log
@Switch importer
@
text
@d18 1
a18 1
# $FreeBSD: stable/4/gnu/usr.bin/rcs/rcstest 50472 1999-08-27 23:37:10Z peter $
@


1.5.62.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.5.62.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d18 1
a18 1
# $FreeBSD: stable/9/gnu/usr.bin/rcs/rcstest 50472 1999-08-27 23:37:10Z peter $
@


1.5.62.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.5.62.1.4.2
log
@Switch importer
@
text
@d18 1
a18 1
# $FreeBSD: releng/9.1/gnu/usr.bin/rcs/rcstest 50472 1999-08-27 23:37:10Z peter $
@


1.5.62.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.5.62.1.2.2
log
@Switch importer
@
text
@d18 1
a18 1
# $FreeBSD: releng/9.0/gnu/usr.bin/rcs/rcstest 50472 1999-08-27 23:37:10Z peter $
@


1.5.60.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.5.60.2
log
@Switch importer
@
text
@d18 1
a18 1
# $FreeBSD: releng/7.4/gnu/usr.bin/rcs/rcstest 50472 1999-08-27 23:37:10Z peter $
@


1.5.58.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.5.56.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.5.56.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d18 1
a18 1
# $FreeBSD: stable/8/gnu/usr.bin/rcs/rcstest 50472 1999-08-27 23:37:10Z peter $
@


1.5.56.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.5.56.1.8.2
log
@Switch importer
@
text
@d18 1
a18 1
# $FreeBSD: releng/8.3/gnu/usr.bin/rcs/rcstest 50472 1999-08-27 23:37:10Z peter $
@


1.5.56.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.5.56.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.5.56.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.5.54.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.5.52.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.5.50.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.4
log
@Revert $FreeBSD$ to $Id$
@
text
@d18 1
a18 1
#	$Id$
@


1.4.2.1
log
@$Id$ -> $FreeBSD$
@
text
@d18 1
a18 1
# $FreeBSD$
@


1.3
log
@Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
@
text
@d18 1
a18 1
#	$FreeBSD$
@


1.2
log
@First part of import conflict merge from rcs-5.7 import.

All those $Log$ entries, combined with the whitespace changes are a real
pain.

I'm committing this now, before it's completely finished to get it compiling
and working again ASAP.  Some of the FreeBSD specific features are not working
in this commit yet (mainly rlog stuff and $FreeBSD$ support)
@
text
@d18 1
a18 1
#	$Id: rcstest,v 5.14 1995/06/16 06:19:24 eggert Exp $
@


1.2.2.1
log
@$Id$ -> $FreeBSD$
@
text
@d18 1
a18 1
# $FreeBSD$
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
#!/bin/sh
d18 1
a18 1
#	$Id: rcstest,v 5.8 1991/11/20 17:58:10 eggert Exp $
d21 1
a21 1
#    Copyright 1990, 1991 by Paul Eggert
d37 3
a39 2
# along with RCS; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
d45 9
d68 4
a71 4
test -d RCS || {
	echo >&2 "$0: RCS: not a directory; please \`mkdir RCS' first."
	exit 1
}
d78 3
a80 3
case `diff -c a.11 a.3x1` in
*'! 1.1.1.1')
	diff='diff -c';;
d82 2
a83 2
	echo "#warning: diff -c does not work, so diagnostics may be cryptic"
	diff=diff
d87 1
a87 1
<$RCSfile || {
d97 1
a97 1
<$RCSfile &&
d112 1
d122 1
d128 1
d135 1
d139 1
a139 1
<a.c || { echo "#ci -u didn't create a working file"; exit 1; }
d183 7
a189 8
date=`date -u 2>/dev/null` ||
date=`TZ=GMT0 date 2>/dev/null` ||
date=`TZ= date` || exit 2
set $date
case $2 in
Jan) m=01;; Feb) m=02;; Mar) m=03;; Apr) m=04;; May) m=05;; Jun) m=06;;
Jul) m=07;; Aug) m=08;; Sep) m=09;; Oct) m=10;; Nov) m=11;; Dec) m=12;;
*) echo >&2 "$0: $2: unknown month name"; exit 2
d191 2
a192 16
case $3 in
?) d=0$3;;
*) d=$3
esac
case $6 in
[0-9][0-9][0-9][0-9]*) D=$6/$m/$d;;
*)
	case $5 in
	[0-9][0-9][0-9][0-9]*) D=$5/$m/$d;;
	*) echo >&2 "$0: bad date format: $date"; exit 2
	esac
esac
T=$4
case $PWD in
'') PWD=`pwd`
esac &&
d196 3
a198 3
@@Date: $D $T @@
@@Header: $PWD$SLASH$RCSfile 2.1 $D $T w s @@
@@Id: a.c 2.1 $D $T w s @@
d200 2
a201 2
@@Log: a.c @@
 * Revision 2.1  $D  $T  w
d204 1
d213 3
a215 1
sed -e '/^\$/!d' -e 's/\$$/: old $/' a.k >a.o &&
d218 1
a218 1
ci -d"$date" -ss -ww -u2.1 -mm $q a.c &&
d220 1
a220 1
co -p -ko $q a.c >a.oo &&
d222 2
a223 2
cp a.kv a.o || exit 2
rcs -o2.1 $q a.c &&
d227 1
a227 1
sed '/^[^$]/d' a.kv >a.i &&
d234 1
d265 1
d268 1
a268 1
$diff a.kv a.c || { echo "#rcs -N failed"; exit 1; }
d270 1
d272 1
a272 2
rcs -c':::' $q a.c &&
echo '$''Log$' >a.c &&
d274 1
a274 1
test " `sed '$!d' a.c`" = ' :::' || { echo "#rcs -c failed"; exit 1; }
d276 1
d279 1
a279 1
$diff a.kv a.c || { echo "#rcs -o failed"; exit 1; }
d281 1
a281 1
rcsdiff -r1.1 -r2.1 $q a.c >a.0
d286 1
a286 1
diff a.11 a.kv >a.1
d290 1
a290 1
for i in k kv kvl o v
d294 1
a294 1
	rcsdiff -k$i $q a.c || { echo "#rcsdiff -k$i failed"; exit 1; }
d301 31
d363 1
a363 1
rcsmerge -r2.2 -r2.3 $q a.c
d382 22
a403 2
nl='
'
d405 1
a405 1
	co -p $q a.c | tr "$nl" '\200' >a.24 &&
d411 1
a411 1
	co -p $q a.c | tr '\200' "$nl" >a.c &&
d437 1
a438 1
comment leader: ":::"
d445 1
a445 1
date: $D $T;  author: w;  state: s;  lines: +13 -1
d453 2
a454 1
exec rm -f a.* $RCSfile $RCS_alt
@


1.1.1.1
log
@Updated GNU utilities
@
text
@@


1.1.1.1.8.1
log
@Merge from HEAD, except:

	Clients that used gnumalloc still do, despite the merge.  We're not
	bringing phkmalloc over.

	Thread stuff left out.

	PCCARD support left out.
@
text
@d1 1
a1 1
#! /bin/sh
d18 1
a18 1
#	$Id: rcstest,v 1.1.1.1 1993/06/18 04:22:10 jkh Exp $
d21 1
a21 1
#    Copyright 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert
d37 2
a38 3
# along with RCS; see the file COPYING.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
a43 9
# The Makefile overrides the following defaults.
: ${ALL_CFLAGS=-Dhas_conf_h}
: ${CC=cc}
: ${DIFF=diff}
# : ${LDFLAGS=} ${LIBS=} tickles old shell bug

CL="$CC $ALL_CFLAGS $LDFLAGS -o a.out"
L=$LIBS

d58 4
a61 4
if test -d RCS
then rmdir=:
else rmdir=rmdir; mkdir RCS || exit
fi
d68 3
a70 3
case "`$DIFF -c a.11 a.3x1`" in
*!\ 1.1.1.1)
	diff="$DIFF -c";;
d72 2
a73 2
	echo "#warning: $DIFF -c does not work, so diagnostics may be cryptic"
	diff=$DIFF
d77 1
a77 1
test -r $RCSfile || {
d87 1
a87 1
test -r $RCSfile &&
a101 1
rm -f a.c &&
a110 1
rm -f a.c &&
a115 1
rm -f a.c &&
a121 1
rm -f a.c &&
d125 1
a125 1
test -r a.c || { echo "#ci -u didn't create a working file"; exit 1; }
d169 20
a188 7


# Get the date of the previous revision in UTC.
date=`rlog -r a.c | sed -n '/^date: /{ s///; s/;.*//; p; q; }'` || exit
case $date in
[0-9][0-9][0-9]*[0-9]/[0-1][0-9]/[0-3][0-9]\ [0-2][0-9]:[0-5][0-9]:[0-6][0-9]);;
*) echo >&2 "$0: $date: bad rlog date output"; exit 1
d190 4
a193 2
PWD=`pwd` && export PWD &&
rm -f a.c &&
d197 3
a199 3
@@Date: $date @@
@@Header: $PWD$SLASH$RCSfile 2.1 $date w s @@
@@Id: a.c 2.1 $date w s @@
d201 2
a202 2
 * @@Log: a.c @@
 * Revision 2.1  $date  w
a204 1
@@Name: Oz @@
d213 1
a213 3
sed s/Oz//g a.kv >a.e &&
sed s/Oz/N/g a.kv >a.N &&
sed -e '/\$/!d' -e 's/\$$/: old $/' a.k >a.o &&
d216 1
a216 1
ci -d"$date" -nOz -ss -ww -u2.1 -mm $q a.c &&
d218 1
a218 1
co -pOz -ko $q a.c >a.oo &&
d220 2
a221 2
cp a.kv a.o && cp a.o a.b || exit 2
rcs -oOz $q a.c &&
d225 1
a225 1
sed -n 's/^[^$]*\$/$/p' a.kv >a.i &&
a231 1
rm -f a.c &&
a261 1
rm -f a.c &&
d264 1
a264 1
$diff a.N a.c || { echo "#rcs -N failed"; exit 1; }
a265 1
rm -f a.c &&
d267 2
a268 1
echo ':::$''Log$' >a.c &&
d270 1
a270 1
test " `sed '$!d' a.c`" = ' :::' || { echo "#comment leader failed"; exit 1; }
a271 1
rm -f a.c &&
d274 1
a274 1
$diff a.e a.c || { echo "#rcs -o failed"; exit 1; }
d276 1
a276 1
rcsdiff -r1.1 -rOz $q a.c >a.0
d281 1
a281 1
$DIFF a.11 a.kv >a.1
d285 1
a285 1
for i in b k kv kvl o v
d289 1
a289 1
	rcsdiff -k$i -rOz $q a.c || { echo "#rcsdiff -k$i failed"; exit 1; }
a295 31
rcsclean $q a.c &&
rcsclean -u $q a.c || { echo "#rcsclean botched a nonexistent file"; exit 1; }

rm -f a.c &&
co $q a.c &&
rcsclean -n $q a.c &&
rcsclean -n -u $q a.c &&
test -f a.c || { echo "#rcsclean -n removed a file"; exit 1; }

rm -f a.c &&
co $q a.c &&
rcsclean $q a.c &&
test ! -f a.c || { echo "#rcsclean missed an unlocked file"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
rcsclean $q a.c &&
test -f a.c || { echo "#rcsclean removed a locked file"; exit 1; }
rcsclean -u $q a.c &&
test ! -f a.c || {
	echo "#rcsclean -u missed an unchanged locked file"; exit 1;
}

rm -f a.c &&
co -l $q a.c &&
echo change >>a.c &&
rcsclean $q a.c &&
rcsclean $q -u a.c &&
test -f a.c || { echo "#rcsclean removed a changed file"; exit 1; }

rm -f a.c &&
d327 1
a327 1
rcsmerge -E -r2.2 -r2.3 $q a.c
d346 2
a347 22
# Avoid `tr' if possible; it's not portable, and it can't handle null bytes.
# Our substitute exclusive-ORs with '\n';
# this ensures null bytes on output, which is even better than `tr',
# since some diffs think a file is binary only if it contains null bytes.
cat >a.c <<'EOF'
#include <stdio.h>
int main() {
	int c;
	while ((c=getchar()) != EOF)
		putchar(c ^ '\n');
	return 0;
}
EOF
tr=tr
if (rm -f a.exe a.out && $CL a.c $L >&2) >/dev/null 2>&1
then
	if test -s a.out
	then tr=./a.out
	elif test -s a.exe
	then tr=./a.exe
	fi
fi
d349 1
a349 1
	co -p $q a.c | $tr '\012' '\200' >a.24 &&
d355 1
a355 1
	co -p $q a.c | $tr '\200' '\012' >a.c &&
a380 1
	Oz: 2.1
d382 1
d389 1
a389 1
date: $date;  author: w;  state: s;  lines: +14 -1
d397 1
a397 2
rm -f a.* $RCSfile $RCS_alt
$rmdir RCS
@


1.1.1.1.8.2
log
@This 3rd mega-commit should hopefully bring us back to where we were.
I can get it to `make world' succesfully, anyway!
@
text
@d1 1
a1 1
#!/bin/sh
d21 1
a21 1
#    Copyright 1990, 1991 by Paul Eggert
d37 3
a39 2
# along with RCS; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
d45 9
d68 4
a71 4
test -d RCS || {
	echo >&2 "$0: RCS: not a directory; please \`mkdir RCS' first."
	exit 1
}
d78 3
a80 3
case `diff -c a.11 a.3x1` in
*'! 1.1.1.1')
	diff='diff -c';;
d82 2
a83 2
	echo "#warning: diff -c does not work, so diagnostics may be cryptic"
	diff=diff
d87 1
a87 1
<$RCSfile || {
d97 1
a97 1
<$RCSfile &&
d112 1
d122 1
d128 1
d135 1
d139 1
a139 1
<a.c || { echo "#ci -u didn't create a working file"; exit 1; }
d183 7
a189 8
date=`date -u 2>/dev/null` ||
date=`TZ=GMT0 date 2>/dev/null` ||
date=`TZ= date` || exit 2
set $date
case $2 in
Jan) m=01;; Feb) m=02;; Mar) m=03;; Apr) m=04;; May) m=05;; Jun) m=06;;
Jul) m=07;; Aug) m=08;; Sep) m=09;; Oct) m=10;; Nov) m=11;; Dec) m=12;;
*) echo >&2 "$0: $2: unknown month name"; exit 2
d191 2
a192 16
case $3 in
?) d=0$3;;
*) d=$3
esac
case $6 in
[0-9][0-9][0-9][0-9]*) D=$6/$m/$d;;
*)
	case $5 in
	[0-9][0-9][0-9][0-9]*) D=$5/$m/$d;;
	*) echo >&2 "$0: bad date format: $date"; exit 2
	esac
esac
T=$4
case $PWD in
'') PWD=`pwd`
esac &&
d196 3
a198 3
@@Date: $D $T @@
@@Header: $PWD$SLASH$RCSfile 2.1 $D $T w s @@
@@Id: a.c 2.1 $D $T w s @@
d200 2
a201 2
@@Log: a.c @@
 * Revision 2.1  $D  $T  w
d204 1
d213 3
a215 1
sed -e '/^\$/!d' -e 's/\$$/: old $/' a.k >a.o &&
d218 1
a218 1
ci -d"$date" -ss -ww -u2.1 -mm $q a.c &&
d220 1
a220 1
co -p -ko $q a.c >a.oo &&
d222 2
a223 2
cp a.kv a.o || exit 2
rcs -o2.1 $q a.c &&
d227 1
a227 1
sed '/^[^$]/d' a.kv >a.i &&
d234 1
d265 1
d268 1
a268 1
$diff a.kv a.c || { echo "#rcs -N failed"; exit 1; }
d270 1
d272 1
a272 2
rcs -c':::' $q a.c &&
echo '$''Log$' >a.c &&
d274 1
a274 1
test " `sed '$!d' a.c`" = ' :::' || { echo "#rcs -c failed"; exit 1; }
d276 1
d279 1
a279 1
$diff a.kv a.c || { echo "#rcs -o failed"; exit 1; }
d281 1
a281 1
rcsdiff -r1.1 -r2.1 $q a.c >a.0
d286 1
a286 1
diff a.11 a.kv >a.1
d290 1
a290 1
for i in k kv kvl o v
d294 1
a294 1
	rcsdiff -k$i $q a.c || { echo "#rcsdiff -k$i failed"; exit 1; }
d301 31
d363 1
a363 1
rcsmerge -r2.2 -r2.3 $q a.c
d382 22
a403 2
nl='
'
d405 1
a405 1
	co -p $q a.c | tr "$nl" '\200' >a.24 &&
d411 1
a411 1
	co -p $q a.c | tr '\200' "$nl" >a.c &&
d437 1
a438 1
comment leader: ":::"
d445 1
a445 1
date: $D $T;  author: w;  state: s;  lines: +13 -1
d453 2
a454 1
exec rm -f a.* $RCSfile $RCS_alt
@


1.1.1.1.8.3
log
@$Id$ -> $FreeBSD$
@
text
@d18 1
a18 1
# $FreeBSD$
@


1.1.1.2
log
@Import rcs-5.7, required for full support of cvs-1.6.

This is going to be pretty messy....  Although the vendor import was correct,
both the vendor and release tags are the same "gnu"... :-/
Getting cvs to choose the correct one might be rather interesting...
@
text
@d1 1
a1 1
#! /bin/sh
d18 1
a18 1
#	$Id: rcstest,v 5.14 1995/06/16 06:19:24 eggert Exp $
d21 1
a21 1
#    Copyright 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert
d37 2
a38 3
# along with RCS; see the file COPYING.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
a43 9
# The Makefile overrides the following defaults.
: ${ALL_CFLAGS=-Dhas_conf_h}
: ${CC=cc}
: ${DIFF=diff}
# : ${LDFLAGS=} ${LIBS=} tickles old shell bug

CL="$CC $ALL_CFLAGS $LDFLAGS -o a.out"
L=$LIBS

d58 4
a61 4
if test -d RCS
then rmdir=:
else rmdir=rmdir; mkdir RCS || exit
fi
d68 3
a70 3
case "`$DIFF -c a.11 a.3x1`" in
*!\ 1.1.1.1)
	diff="$DIFF -c";;
d72 2
a73 2
	echo "#warning: $DIFF -c does not work, so diagnostics may be cryptic"
	diff=$DIFF
d77 1
a77 1
test -r $RCSfile || {
d87 1
a87 1
test -r $RCSfile &&
a101 1
rm -f a.c &&
a110 1
rm -f a.c &&
a115 1
rm -f a.c &&
a121 1
rm -f a.c &&
d125 1
a125 1
test -r a.c || { echo "#ci -u didn't create a working file"; exit 1; }
d169 20
a188 7


# Get the date of the previous revision in UTC.
date=`rlog -r a.c | sed -n '/^date: /{ s///; s/;.*//; p; q; }'` || exit
case $date in
[0-9][0-9][0-9]*[0-9]/[0-1][0-9]/[0-3][0-9]\ [0-2][0-9]:[0-5][0-9]:[0-6][0-9]);;
*) echo >&2 "$0: $date: bad rlog date output"; exit 1
d190 4
a193 2
PWD=`pwd` && export PWD &&
rm -f a.c &&
d197 3
a199 3
@@Date: $date @@
@@Header: $PWD$SLASH$RCSfile 2.1 $date w s @@
@@Id: a.c 2.1 $date w s @@
d201 2
a202 2
 * @@Log: a.c @@
 * Revision 2.1  $date  w
a204 1
@@Name: Oz @@
d213 1
a213 3
sed s/Oz//g a.kv >a.e &&
sed s/Oz/N/g a.kv >a.N &&
sed -e '/\$/!d' -e 's/\$$/: old $/' a.k >a.o &&
d216 1
a216 1
ci -d"$date" -nOz -ss -ww -u2.1 -mm $q a.c &&
d218 1
a218 1
co -pOz -ko $q a.c >a.oo &&
d220 2
a221 2
cp a.kv a.o && cp a.o a.b || exit 2
rcs -oOz $q a.c &&
d225 1
a225 1
sed -n 's/^[^$]*\$/$/p' a.kv >a.i &&
a231 1
rm -f a.c &&
a261 1
rm -f a.c &&
d264 1
a264 1
$diff a.N a.c || { echo "#rcs -N failed"; exit 1; }
a265 1
rm -f a.c &&
d267 2
a268 1
echo ':::$''Log$' >a.c &&
d270 1
a270 1
test " `sed '$!d' a.c`" = ' :::' || { echo "#comment leader failed"; exit 1; }
a271 1
rm -f a.c &&
d274 1
a274 1
$diff a.e a.c || { echo "#rcs -o failed"; exit 1; }
d276 1
a276 1
rcsdiff -r1.1 -rOz $q a.c >a.0
d281 1
a281 1
$DIFF a.11 a.kv >a.1
d285 1
a285 1
for i in b k kv kvl o v
d289 1
a289 1
	rcsdiff -k$i -rOz $q a.c || { echo "#rcsdiff -k$i failed"; exit 1; }
a295 31
rcsclean $q a.c &&
rcsclean -u $q a.c || { echo "#rcsclean botched a nonexistent file"; exit 1; }

rm -f a.c &&
co $q a.c &&
rcsclean -n $q a.c &&
rcsclean -n -u $q a.c &&
test -f a.c || { echo "#rcsclean -n removed a file"; exit 1; }

rm -f a.c &&
co $q a.c &&
rcsclean $q a.c &&
test ! -f a.c || { echo "#rcsclean missed an unlocked file"; exit 1; }

rm -f a.c &&
co -l $q a.c &&
rcsclean $q a.c &&
test -f a.c || { echo "#rcsclean removed a locked file"; exit 1; }
rcsclean -u $q a.c &&
test ! -f a.c || {
	echo "#rcsclean -u missed an unchanged locked file"; exit 1;
}

rm -f a.c &&
co -l $q a.c &&
echo change >>a.c &&
rcsclean $q a.c &&
rcsclean $q -u a.c &&
test -f a.c || { echo "#rcsclean removed a changed file"; exit 1; }

rm -f a.c &&
d327 1
a327 1
rcsmerge -E -r2.2 -r2.3 $q a.c
d346 2
a347 22
# Avoid `tr' if possible; it's not portable, and it can't handle null bytes.
# Our substitute exclusive-ORs with '\n';
# this ensures null bytes on output, which is even better than `tr',
# since some diffs think a file is binary only if it contains null bytes.
cat >a.c <<'EOF'
#include <stdio.h>
int main() {
	int c;
	while ((c=getchar()) != EOF)
		putchar(c ^ '\n');
	return 0;
}
EOF
tr=tr
if (rm -f a.exe a.out && $CL a.c $L >&2) >/dev/null 2>&1
then
	if test -s a.out
	then tr=./a.out
	elif test -s a.exe
	then tr=./a.exe
	fi
fi
d349 1
a349 1
	co -p $q a.c | $tr '\012' '\200' >a.24 &&
d355 1
a355 1
	co -p $q a.c | $tr '\200' '\012' >a.c &&
a380 1
	Oz: 2.1
d382 1
d389 1
a389 1
date: $date;  author: w;  state: s;  lines: +14 -1
d397 1
a397 2
rm -f a.* $RCSfile $RCS_alt
$rmdir RCS
@
