]> code.delx.au - gnu-emacs/blobdiff - lib-src/rcs2log
Add toolbar.
[gnu-emacs] / lib-src / rcs2log
index ded43536deb10ecf6df5586552082051d4d58004..f41552e110de498cba4ab84b5c81bce249b8411f 100755 (executable)
@@ -26,11 +26,11 @@ Options:
   --help  Output help.
   --version  Output version number.
 
-Report bugs to <bug-gnu-emacs@prep.ai.mit.edu>.'
+Report bugs to <bug-gnu-emacs@gnu.org>.'
 
-Id='$Id: rcs2log,v 1.40 1997/05/11 20:02:32 eggert Exp eggert $'
+Id='$Id: rcs2log,v 1.44 1998/08/12 14:22:14 eggert Exp eggert $'
 
-# Copyright 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+# Copyright 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ Id='$Id: rcs2log,v 1.40 1997/05/11 20:02:32 eggert Exp eggert $'
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-Copyright='Copyright 1997 Free Software Foundation, Inc.
+Copyright='Copyright 1998 Free Software Foundation, Inc.
 This program comes with NO WARRANTY, to the extent permitted by law.
 You may redistribute copies of this program
 under the terms of the GNU General Public License.
@@ -425,13 +425,16 @@ EOF
        '
 
        initialize_fullname=`
-               (
-                       cat /etc/passwd
-                       for author in $authors
-                       do NIS_PATH= nismatch $author passwd.org_dir
-                       done
-                       ypmatch $authors passwd
-               ) 2>/dev/null |
+               {
+                       (getent passwd $authors) ||
+                       (
+                               cat /etc/passwd
+                               for author in $authors
+                               do NIS_PATH= nismatch $author passwd.org_dir
+                               done
+                               ypmatch $authors passwd
+                       )
+               } 2>/dev/null |
                $AWK -F: "$awkscript"
        `$initialize_fullname
 esac
@@ -522,11 +525,12 @@ $AWK <$rlogout '
        }
        /^Working file:/ { if (repository == "") filename = $3 }
        /'"$rlog_revision_pattern"'/, /^(-----------*|===========*)$/ {
-               if ($0 ~ /'"$rlog_revision_pattern"'/) {
+               line = $0
+               if (line ~ /'"$rlog_revision_pattern"'/) {
                        rev = $2
                        next
                }
-               if ($0 ~ /^date: [0-9][- +\/0-9:]*;/) {
+               if (line ~ /^date: [0-9][- +\/0-9:]*;/) {
                        date = $2
                        if (date ~ /\//) {
                                # This is a traditional RCS format date YYYY/MM/DD.
@@ -544,12 +548,12 @@ $AWK <$rlogout '
                        rev = "?"
                        next
                }
-               if ($0 ~ /^branches: /) { next }
-               if ($0 ~ /^(-----------*|===========*)$/) { print ""; next }
-               if ($0 == "Initial revision" || $0 ~ /^file .+ was initially added on branch .+\.$/) {
-                       $0 = "New file."
-        }
-               printf "%s%c", $0, 1
+               if (line ~ /^branches: /) { next }
+               if (line ~ /^(-----------*|===========*)$/) { print ""; next }
+               if (line == "Initial revision" || line ~ /^file .+ was initially added on branch .+\.$/) {
+                       line = "New file."
+               }
+               printf "%s%c", line, 1
        }
 ' |