[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lib-src/grep-changelog,v
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lib-src/grep-changelog,v |
Date: |
Thu, 02 Nov 2006 11:52:15 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Juanma Barranquero <lektu> 06/11/02 11:52:15
Index: grep-changelog
===================================================================
RCS file: /cvsroot/emacs/emacs/lib-src/grep-changelog,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- grep-changelog 6 Feb 2006 11:28:28 -0000 1.14
+++ grep-changelog 2 Nov 2006 11:52:15 -0000 1.15
@@ -36,7 +36,17 @@
@entries);
use Getopt::Long;
-my $result = GetOptions ("author=s" => \$author,
+
+my $result;
+
+if (@ARGV == 0) {
+
+ # No arguments cannot posibly mean "show everything"!!
+ $result = 0;
+
+} else {
+
+ $result = GetOptions ("author=s" => \$author,
"text=s" => \$regexp,
"exclude=s" => \$exclude,
"from-date=s" => \$from_date,
@@ -47,11 +57,12 @@
"version" => \$version,
"help" => \$help);
-# If date options are specified, check that they have the format
-# YYYY-MM-DD.
+ # If date options are specified, check that they have the format
+ # YYYY-MM-DD.
-$result = 0 if $from_date && $from_date !~ /^\d\d\d\d-\d\d-\d\d$/;
-$result = 0 if $to_date && $to_date !~ /^\d\d\d\d-\d\d-\d\d$/;
+ $result = 0 if $from_date && $from_date !~ /^\d\d\d\d-\d\d-\d\d$/;
+ $result = 0 if $to_date && $to_date !~ /^\d\d\d\d-\d\d-\d\d$/;
+}
# Print usage information and exit when necessary.
@@ -77,7 +88,7 @@
--help Print this help
If no CHANGELOG is specified scan the files "ChangeLog" and
-"ChangeLog.1+" in the current directory. Old-style dates in ChangeLogs
+"ChangeLog.N+" in the current directory. Old-style dates in ChangeLogs
are not recognized.
USAGE
exit !$help;
@@ -86,7 +97,7 @@
# Print version info and exit if `--version' was specified.
if ($version) {
- print "0.2\n";
+ print "0.3\n";
exit 0;
}
@@ -233,7 +244,7 @@
# If files were specified on the command line, parse those files in the
# order supplied by the user; otherwise parse default files ChangeLog and
-# ChangeLog.1+ according to $reverse.
+# ChangeLog.NNN according to $reverse.
unless (@ARGV > 0) {
@ARGV = ("ChangeLog");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lib-src/grep-changelog,v,
Juanma Barranquero <=