comparison lib-src/rcs2log @ 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 554c86f77db0
children 4d05376b5cb2
comparison
equal deleted inserted replaced
11081:b651fb9a8216 11082:aee85fcd9d25
10 # Clump together log entries that start with `{topic} ', 10 # Clump together log entries that start with `{topic} ',
11 # where `topic' contains neither white space nor `}'. 11 # where `topic' contains neither white space nor `}'.
12 12
13 # Author: Paul Eggert <eggert@twinsun.com> 13 # Author: Paul Eggert <eggert@twinsun.com>
14 14
15 # $Id: rcs2log,v 1.19 1995/03/21 05:11:06 eggert Exp $ 15 # $Id: rcs2log,v 1.19 1995/03/21 05:37:42 eggert Exp eggert $
16 16
17 # Copyright 1992, 1993, 1994, 1995 Free Software Foundation, Inc. 17 # Copyright 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
18 18
19 # This program is free software; you can redistribute it and/or modify 19 # This program is free software; you can redistribute it and/or modify
20 # it under the terms of the GNU General Public License as published by 20 # it under the terms of the GNU General Public License as published by
62 exit 1 62 exit 1
63 esac 63 esac
64 loginFullnameMailaddrs=$loginFullnameMailaddrs$nl$2$tab$3$tab$4 64 loginFullnameMailaddrs=$loginFullnameMailaddrs$nl$2$tab$3$tab$4
65 shift; shift; shift;; 65 shift; shift; shift;;
66 -u) 66 -u)
67 # If $2 is not tab-separated, use colon for separator.
67 case ${2?} in 68 case ${2?} in
68 *"$nl"*) 69 *"$nl"*)
69 echo >&2 "$0: -u '$2': newlines not allowed" 70 echo >&2 "$0: -u '$2': newlines not allowed"
70 exit 1;; 71 exit 1;;
71 *"$tab"*"$tab"*"$tab"*) 72 *"$tab"*)
73 t=$tab;;
74 *)
75 t=:
76 esac
77 case $2 in
78 *"$t"*"$t"*"$t"*)
72 echo >&2 "$0: -u '$2': too many fields" 79 echo >&2 "$0: -u '$2': too many fields"
73 exit 1;; 80 exit 1;;
74 *"$tab"*"$tab"*) 81 *"$t"*"$t"*)
75 ;; 82 ;;
76 *) 83 *)
77 echo >&2 "$0: -u '$2': not enough fields" 84 echo >&2 "$0: -u '$2': not enough fields"
78 exit 1 85 exit 1
79 esac 86 esac
242 249
243 oldIFS=$IFS 250 oldIFS=$IFS
244 IFS=$nl 251 IFS=$nl
245 for loginFullnameMailaddr in $loginFullnameMailaddrs 252 for loginFullnameMailaddr in $loginFullnameMailaddrs
246 do 253 do
247 IFS=$tab 254 case $loginFullnameMailaddr in
255 *"$tab"*) IFS=$tab;;
256 *) IFS=:
257 esac
248 set x $loginFullnameMailaddr 258 set x $loginFullnameMailaddr
249 login=$2 259 login=$2
250 fullname=$3 260 fullname=$3
251 mailaddr=$4 261 mailaddr=$4
252 initialize_fullname="$initialize_fullname 262 initialize_fullname="$initialize_fullname