Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
2ca8a587
Commit
2ca8a587
authored
Jun 14, 2000
by
Jim Meyering
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typos in comments. Remove trailing blanks.
parent
25fa6deb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
lib-src/grep-changelog
lib-src/grep-changelog
+12
-12
No files found.
lib-src/grep-changelog
View file @
2ca8a587
#! /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.
#
...
...
@@ -31,7 +31,7 @@ require 5;
# Parse command line options.
use
Getopt::
Long
;
$result
=
GetOptions
("
author=s
"
=>
\
$author
,
$result
=
GetOptions
("
author=s
"
=>
\
$author
,
"
text=s
"
=>
\
$regexp
,
"
exclude=s
"
=>
\
$exclude
,
"
from-date=s
"
=>
\
$from_date
,
...
...
@@ -55,7 +55,7 @@ Usage: $0 [options] [CHANGELOG...]
Print entries in ChangeLogs matching various criteria. Valid options
are
--author=AUTHOR match entries whose author line matches
--author=AUTHOR match entries whose author line matches
regular expression AUTHOR
--text=TEXT match entries whose text matches regular
expression TEXT.
...
...
@@ -68,7 +68,7 @@ are
--help print this help
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.
USAGE
exit
$help
?
0
:
1
;
...
...
@@ -110,7 +110,7 @@ sub header_match_p ($) {
}
# Value is non-zero if ENTRY matches the c
i
iteria specified on the
# Value is non-zero if ENTRY matches the c
r
iteria specified on the
# command line, i.e. it matches $regexp, and it doesn't match
# $exclude.
...
...
@@ -118,7 +118,7 @@ sub entry_match_p ($) {
my
$entry
=
shift
;
if
(
$regexp
)
{
return
1
if
(
$entry
=~
/$regexp/
return
1
if
(
$entry
=~
/$regexp/
&&
(
!
$exclude
||
$entry
!~
$exclude
));
}
else
{
return
1
if
!
$exclude
||
$entry
!~
$exclude
;
...
...
@@ -167,7 +167,7 @@ sub parse_changelog ($) {
if
(
$line
=~
/^\S/
)
{
# Line is an author-line. Print previous entry if
# it matches.
print_log
(
$header
,
$entry
)
print_log
(
$header
,
$entry
)
if
header_match_p
(
$header
)
&&
entry_match_p
(
$entry
);
$entry
=
"";
...
...
@@ -177,12 +177,12 @@ sub parse_changelog ($) {
while
((
$line
=
<
IN
>
)
&&
$line
=~
/^\s*$/
)
{
$header
=
"
$header$line
";
}
}
}
if
(
$line
=~
/^\s*\*/
)
{
# LINE is the first line of a ChangeLog entry. Print
# previous entry if it matches.
print_log
(
$header
,
$entry
)
print_log
(
$header
,
$entry
)
if
header_match_p
(
$header
)
&&
entry_match_p
(
$entry
);
$entry
=
$line
;
}
else
{
...
...
@@ -192,7 +192,7 @@ sub parse_changelog ($) {
}
# Print last entry if it matches.
print_log
(
$header
,
$entry
)
print_log
(
$header
,
$entry
)
if
header_match_p
(
$header
)
&&
entry_match_p
(
$entry
);
close
IN
;
...
...
@@ -217,4 +217,4 @@ if (@ARGV > 0) {
}
# gre-changelog ends here.
# gre
p
-changelog ends here.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment