]> code.delx.au - gnu-emacs/blobdiff - lib-src/rcs2log
[WINDOWSNT]: Include io.h.
[gnu-emacs] / lib-src / rcs2log
index 3bcf5e9ace9fdebca84d66031d93b91c505fa4ed..8de10c2e1f00d910c63b13debffdabc58b5c31c7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#! /bin/sh
 
 # RCS to ChangeLog generator
 
@@ -12,9 +12,9 @@
 
 # Author: Paul Eggert <eggert@twinsun.com>
 
-# $Id: rcs2log,v 1.22 1995/04/30 15:34:52 eggert Exp $
+# $Id: rcs2log,v 1.27 1996/01/15 01:17:03 eggert Exp $
 
-# Copyright 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+# Copyright 1992, 1993, 1994, 1995, 1996 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
@@ -158,7 +158,8 @@ case $rlog_options in
                                                }
                                        }
                                }
-                               printf "%d/%02d/%02d %02d:%02d:%02d\n", year,i+1,dd,hh,mm,ss
+                               # Output comma instead of space to avoid CVS 1.5 bug.
+                               printf "%d/%02d/%02d,%02d:%02d:%02d\n", year,i+1,dd,hh,mm,ss
                                exit
                        }
                '
@@ -178,15 +179,23 @@ then
 else
        rlog='cvs log'
        repository=`sed 1q <CVS/Repository` || exit
-       case $repository in
-       /*) ;;
-       *) repository=${CVSROOT?}/$repository
+       test ! -f CVS/Root || CVSROOT=`cat <CVS/Root` || exit
+       case $CVSROOT in
+       *:/*)
+               # remote repository
+               ;;
+       *)
+               # local repository
+               case $repository in
+               /*) ;;
+               *) repository=${CVSROOT?}/$repository
+               esac
+               if test ! -d "$repository"
+               then
+                       echo >&2 "$0: $repository: bad repository (see CVS/Repository)"
+                       exit 1
+               fi
        esac
-       if test ! -d "$repository"
-       then
-               echo >&2 "$0: $repository: bad repository (see CVS/Repository)"
-               exit 1
-       fi
 fi
 
 # With no arguments, examine all files under the RCS directory.
@@ -355,7 +364,13 @@ EOF
        '
 
        initialize_fullname=`
-               (cat /etc/passwd; ypmatch $authors passwd) 2>/dev/null |
+               (
+                       cat /etc/passwd
+                       for author in $authors
+                       do nismatch $author passwd.org_dir
+                       done
+                       ypmatch $authors passwd
+               ) 2>/dev/null |
                $AWK -F: "$awkscript"
        `$initialize_fullname
 esac
@@ -405,6 +420,15 @@ case $hostname in
                echo >&2 "$0: cannot deduce hostname"
                exit 1
        }
+
+       case $hostname in
+       *.*) ;;
+       *)
+               domainname=`(domainname) 2>/dev/null` &&
+               case $domainname in
+               *.*) hostname=$hostname.$domainname
+               esac
+       esac
 esac