Commit 0a4e59d9 authored by Paul Eggert's avatar Paul Eggert
Browse files

Treat -u 'LOGIN:FULLNAME:MAILADDR' as if it were

-u 'LOGIN<tab>FULLNAME<tab>MAILADDR'.
parent c0a7db84
......@@ -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 @@ do
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 @@ EOF
IFS=$nl
for loginFullnameMailaddr in $loginFullnameMailaddrs
do
IFS=$tab
case $loginFullnameMailaddr in
*"$tab"*) IFS=$tab;;
*) IFS=:
esac
set x $loginFullnameMailaddr
login=$2
fullname=$3
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment