# HG changeset patch # User Juanma Barranquero # Date 1078872389 0 # Node ID bdf4aa3226e7bf2fd1f38474f2ce804327f4b884 # Parent c1238bacc77f09ad709d95007fa16ce45d0241cd Changes to support ChangeLog.10+. (main): Tidy up usage string. Fix "Use of uninitialized value" warning. Set version to 0.2. Parse the directory listing to get any ChangeLog.n file, not just 1..9. (header_match_p, entry_match_p, print_log, parse_changelog): Remove Perl prototypes (their purpose is to help the parser, which isn't needed here, not declare arguments). (parse_changelog): Make --reverse faster on big batches by not modifying the entries list. diff -r c1238bacc77f -r bdf4aa3226e7 lib-src/grep-changelog --- a/lib-src/grep-changelog Tue Mar 09 15:28:27 2004 +0000 +++ b/lib-src/grep-changelog Tue Mar 09 22:46:29 2004 +0000 @@ -1,6 +1,6 @@ #! /usr/bin/perl -# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc. # # This file is part of GNU Emacs. # @@ -56,34 +56,36 @@ if ($result == 0 || $help) { print < 0) { - @ARGV = ("ChangeLog", map {"ChangeLog.$_"} reverse 1..9); + @ARGV = ("ChangeLog"); + + push @ARGV, + map {"ChangeLog.$_"} + sort {$b <=> $a} + map {/\.(\d+)$/; $1} + do { + opendir D, '.'; + grep /^ChangeLog\.\d+$/, readdir D; + }; + @ARGV = reverse @ARGV if $reverse; }