changeset 3248:9ee93fc9aba0

When given no file arguments, inspect RCS/.* as well as RCS/*. Don't report an error if RCS is empty or nonexistent.
author Richard M. Stallman <rms@gnu.org>
date Sat, 29 May 1993 06:22:48 +0000
parents eab748cfcf49
children b47c0a6be84b
files lib-src/=rcs2log lib-src/rcs2log
diffstat 2 files changed, 48 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/=rcs2log	Sat May 29 06:19:15 1993 +0000
+++ b/lib-src/=rcs2log	Sat May 29 06:22:48 1993 +0000
@@ -12,7 +12,7 @@
 
 # Author: Paul Eggert <eggert@twinsun.com>
 
-# $Id: rcs2log,v 1.10 1993/03/16 22:49:00 eggert Exp eggert $
+# $Id: rcs2log,v 1.11 1993/05/03 17:55:22 eggert Exp rms $
 
 # Copyright 1992, 1993 Free Software Foundation, Inc.
 
@@ -30,6 +30,8 @@
 # along with this program; see the file COPYING.  If not, write to
 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 
+nl='
+'
 
 # Parse options.
 
@@ -114,14 +116,31 @@
 fi
 datearg="-d>$date"
 
+# With no arguments, examine all files under the RCS directory.
+case $# in
+0)
+	files=
+	for file in RCS/.* RCS/*
+	do
+		case $file in
+		RCS/. | RCS/..) ;;
+		RCS/.\* | RCS/\*) test -f "$file" && files=$files$nl$file;;
+		*) files=$files$nl$file
+		esac
+	done
+	case $files in
+	'') exit 0
+	esac
+	oldIFS=$IFS
+	IFS=$nl
+	set $files
+	IFS=$oldIFS
+esac
+
 rlogout=/tmp/chg$$
 trap exit 1 2 13 15
 trap 'rm -f $rlogout; exit 1' 0
 
-case $# in
-0) set RCS/*
-esac
-
 rlog "$datearg" "$@" >$rlogout || exit
 
 
--- a/lib-src/rcs2log	Sat May 29 06:19:15 1993 +0000
+++ b/lib-src/rcs2log	Sat May 29 06:22:48 1993 +0000
@@ -12,7 +12,7 @@
 
 # Author: Paul Eggert <eggert@twinsun.com>
 
-# $Id: rcs2log,v 1.10 1993/03/16 22:49:00 eggert Exp eggert $
+# $Id: rcs2log,v 1.11 1993/05/03 17:55:22 eggert Exp rms $
 
 # Copyright 1992, 1993 Free Software Foundation, Inc.
 
@@ -30,6 +30,8 @@
 # along with this program; see the file COPYING.  If not, write to
 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 
+nl='
+'
 
 # Parse options.
 
@@ -114,14 +116,31 @@
 fi
 datearg="-d>$date"
 
+# With no arguments, examine all files under the RCS directory.
+case $# in
+0)
+	files=
+	for file in RCS/.* RCS/*
+	do
+		case $file in
+		RCS/. | RCS/..) ;;
+		RCS/.\* | RCS/\*) test -f "$file" && files=$files$nl$file;;
+		*) files=$files$nl$file
+		esac
+	done
+	case $files in
+	'') exit 0
+	esac
+	oldIFS=$IFS
+	IFS=$nl
+	set $files
+	IFS=$oldIFS
+esac
+
 rlogout=/tmp/chg$$
 trap exit 1 2 13 15
 trap 'rm -f $rlogout; exit 1' 0
 
-case $# in
-0) set RCS/*
-esac
-
 rlog "$datearg" "$@" >$rlogout || exit