changeset 11082:aee85fcd9d25

Treat -u 'LOGIN:FULLNAME:MAILADDR' as if it were -u 'LOGIN<tab>FULLNAME<tab>MAILADDR'.
author Paul Eggert <eggert@twinsun.com>
date Tue, 21 Mar 1995 23:14:41 +0000
parents b651fb9a8216
children 2c55e8ceb8b4
files lib-src/=rcs2log lib-src/rcs2log
diffstat 2 files changed, 28 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/=rcs2log	Tue Mar 21 21:47:23 1995 +0000
+++ b/lib-src/=rcs2log	Tue Mar 21 23:14:41 1995 +0000
@@ -12,7 +12,7 @@
 
 # Author: Paul Eggert <eggert@twinsun.com>
 
-# $Id: rcs2log,v 1.19 1995/03/21 05:11:06 eggert Exp $
+# $Id: rcs2log,v 1.19 1995/03/21 05:37:42 eggert Exp eggert $
 
 # Copyright 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
 
@@ -64,14 +64,21 @@
 			loginFullnameMailaddrs=$loginFullnameMailaddrs$nl$2$tab$3$tab$4
 			shift; shift; shift;;
 		-u)
+			# If $2 is not tab-separated, use colon for separator.
 			case ${2?} in
 			*"$nl"*)
 				echo >&2 "$0: -u '$2': newlines not allowed"
 				exit 1;;
-			*"$tab"*"$tab"*"$tab"*)
+			*"$tab"*)
+				t=$tab;;
+			*)
+				t=:
+			esac
+			case $2 in
+			*"$t"*"$t"*"$t"*)
 				echo >&2 "$0: -u '$2': too many fields"
 				exit 1;;
-			*"$tab"*"$tab"*)
+			*"$t"*"$t"*)
 				;;
 			*)
 				echo >&2 "$0: -u '$2': not enough fields"
@@ -244,7 +251,10 @@
 	IFS=$nl
 	for loginFullnameMailaddr in $loginFullnameMailaddrs
 	do
-		IFS=$tab
+		case $loginFullnameMailaddr in
+		*"$tab"*) IFS=$tab;;
+		*) IFS=:
+		esac
 		set x $loginFullnameMailaddr
 		login=$2
 		fullname=$3
--- a/lib-src/rcs2log	Tue Mar 21 21:47:23 1995 +0000
+++ b/lib-src/rcs2log	Tue Mar 21 23:14:41 1995 +0000
@@ -12,7 +12,7 @@
 
 # Author: Paul Eggert <eggert@twinsun.com>
 
-# $Id: rcs2log,v 1.19 1995/03/21 05:11:06 eggert Exp $
+# $Id: rcs2log,v 1.19 1995/03/21 05:37:42 eggert Exp eggert $
 
 # Copyright 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
 
@@ -64,14 +64,21 @@
 			loginFullnameMailaddrs=$loginFullnameMailaddrs$nl$2$tab$3$tab$4
 			shift; shift; shift;;
 		-u)
+			# If $2 is not tab-separated, use colon for separator.
 			case ${2?} in
 			*"$nl"*)
 				echo >&2 "$0: -u '$2': newlines not allowed"
 				exit 1;;
-			*"$tab"*"$tab"*"$tab"*)
+			*"$tab"*)
+				t=$tab;;
+			*)
+				t=:
+			esac
+			case $2 in
+			*"$t"*"$t"*"$t"*)
 				echo >&2 "$0: -u '$2': too many fields"
 				exit 1;;
-			*"$tab"*"$tab"*)
+			*"$t"*"$t"*)
 				;;
 			*)
 				echo >&2 "$0: -u '$2': not enough fields"
@@ -244,7 +251,10 @@
 	IFS=$nl
 	for loginFullnameMailaddr in $loginFullnameMailaddrs
 	do
-		IFS=$tab
+		case $loginFullnameMailaddr in
+		*"$tab"*) IFS=$tab;;
+		*) IFS=:
+		esac
 		set x $loginFullnameMailaddr
 		login=$2
 		fullname=$3