Commit 2ca8a587 authored by Jim Meyering's avatar Jim Meyering
Browse files

Fix typos in comments. Remove trailing blanks.

parent 25fa6deb
#! /usr/bin/perl #! /usr/bin/perl
# $Id: grep-changelog,v 1.1 1999/08/10 13:33:49 gerd Exp $ # $Id: grep-changelog,v 1.2 2000/05/05 13:19:05 gerd Exp $
# Copyright (C) 1999 Free Software Foundation, Inc. # Copyright (C) 1999, 2000 Free Software Foundation, Inc.
# #
# This file is part of GNU Emacs. # This file is part of GNU Emacs.
# #
...@@ -31,7 +31,7 @@ require 5; ...@@ -31,7 +31,7 @@ require 5;
# Parse command line options. # Parse command line options.
use Getopt::Long; use Getopt::Long;
$result = GetOptions ("author=s" => \$author, $result = GetOptions ("author=s" => \$author,
"text=s" => \$regexp, "text=s" => \$regexp,
"exclude=s" => \$exclude, "exclude=s" => \$exclude,
"from-date=s" => \$from_date, "from-date=s" => \$from_date,
...@@ -55,7 +55,7 @@ Usage: $0 [options] [CHANGELOG...] ...@@ -55,7 +55,7 @@ Usage: $0 [options] [CHANGELOG...]
Print entries in ChangeLogs matching various criteria. Valid options Print entries in ChangeLogs matching various criteria. Valid options
are are
--author=AUTHOR match entries whose author line matches --author=AUTHOR match entries whose author line matches
regular expression AUTHOR regular expression AUTHOR
--text=TEXT match entries whose text matches regular --text=TEXT match entries whose text matches regular
expression TEXT. expression TEXT.
...@@ -68,7 +68,7 @@ are ...@@ -68,7 +68,7 @@ are
--help print this help --help print this help
If no CHANGELOG is specified scan the files "ChangeLog" and If no CHANGELOG is specified scan the files "ChangeLog" and
"ChangeLog.[9-1]" in the current directory. Old-style dates in ChangeLogs "ChangeLog.[9-1]" in the current directory. Old-style dates in ChangeLogs
are not recognized. are not recognized.
USAGE USAGE
exit $help ? 0 : 1; exit $help ? 0 : 1;
...@@ -110,7 +110,7 @@ sub header_match_p ($) { ...@@ -110,7 +110,7 @@ sub header_match_p ($) {
} }
# Value is non-zero if ENTRY matches the ciiteria specified on the # Value is non-zero if ENTRY matches the criteria specified on the
# command line, i.e. it matches $regexp, and it doesn't match # command line, i.e. it matches $regexp, and it doesn't match
# $exclude. # $exclude.
...@@ -118,7 +118,7 @@ sub entry_match_p ($) { ...@@ -118,7 +118,7 @@ sub entry_match_p ($) {
my $entry = shift; my $entry = shift;
if ($regexp) { if ($regexp) {
return 1 if ($entry =~ /$regexp/ return 1 if ($entry =~ /$regexp/
&& (!$exclude || $entry !~ $exclude)); && (!$exclude || $entry !~ $exclude));
} else { } else {
return 1 if !$exclude || $entry !~ $exclude; return 1 if !$exclude || $entry !~ $exclude;
...@@ -167,7 +167,7 @@ sub parse_changelog ($) { ...@@ -167,7 +167,7 @@ sub parse_changelog ($) {
if ($line =~ /^\S/) { if ($line =~ /^\S/) {
# Line is an author-line. Print previous entry if # Line is an author-line. Print previous entry if
# it matches. # it matches.
print_log ($header, $entry) print_log ($header, $entry)
if header_match_p ($header) && entry_match_p ($entry); if header_match_p ($header) && entry_match_p ($entry);
$entry = ""; $entry = "";
...@@ -177,12 +177,12 @@ sub parse_changelog ($) { ...@@ -177,12 +177,12 @@ sub parse_changelog ($) {
while (($line = <IN>) && $line =~ /^\s*$/) { while (($line = <IN>) && $line =~ /^\s*$/) {
$header = "$header$line"; $header = "$header$line";
} }
} }
if ($line =~ /^\s*\*/) { if ($line =~ /^\s*\*/) {
# LINE is the first line of a ChangeLog entry. Print # LINE is the first line of a ChangeLog entry. Print
# previous entry if it matches. # previous entry if it matches.
print_log ($header, $entry) print_log ($header, $entry)
if header_match_p ($header) && entry_match_p ($entry); if header_match_p ($header) && entry_match_p ($entry);
$entry = $line; $entry = $line;
} else { } else {
...@@ -192,7 +192,7 @@ sub parse_changelog ($) { ...@@ -192,7 +192,7 @@ sub parse_changelog ($) {
} }
# Print last entry if it matches. # Print last entry if it matches.
print_log ($header, $entry) print_log ($header, $entry)
if header_match_p ($header) && entry_match_p ($entry); if header_match_p ($header) && entry_match_p ($entry);
close IN; close IN;
...@@ -217,4 +217,4 @@ if (@ARGV > 0) { ...@@ -217,4 +217,4 @@ if (@ARGV > 0) {
} }
# gre-changelog ends here. # grep-changelog ends here.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment