Skip to content

Commit

Permalink
Homogenize the wording for header fields in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-Elie committed Oct 31, 2021
1 parent 5c1e053 commit d06b60a
Show file tree
Hide file tree
Showing 73 changed files with 700 additions and 667 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTORS
Expand Up @@ -89,7 +89,7 @@ Karl Kleinpaste:

Dave Hayes:
Along with some bugfixes, Dave wrote the posting-backoff code for
nnrpd and the patches to the perl hooks to make the headers
nnrpd and the patches to the perl hooks to make the header fields
modifiable.

Joe Greco:
Expand Down Expand Up @@ -128,8 +128,8 @@ Aidan Cully:
wrote the initial user authenticators and resolvers for the
readers.conf. Provided the patches to support the new
storage.conf format. Added the option to store articles based on
the Expires header. Also added the '@' article exclusion code to
incoming.conf.
the Expires header field. Also added the '@' article exclusion code
to incoming.conf.

Andrew Gierth:
Contributed improvements to the nnrpd Perl filtering support to
Expand Down
14 changes: 7 additions & 7 deletions MANIFEST
Expand Up @@ -511,7 +511,7 @@ lib/confparse.c Generic configuration file parser
lib/daemonize.c Code necessary to become a daemon
lib/date.c Date parsing and conversion routines
lib/dbz.c DBZ database library
lib/defdist.c Determine default Distribution: header
lib/defdist.c Determine default distributions list
lib/dispatch.c Dispatch a command to a function
lib/fdflag.c Set or clear file descriptor flags
lib/fdlimit.c File descriptor limits
Expand Down Expand Up @@ -658,8 +658,8 @@ samples/buffindexed.conf.in Buffindexed overview config file
samples/control.ctl Access control for control messages
samples/control.ctl.local Local access control for control messages
samples/cycbuff.conf Sample cycbuff.conf file
samples/distrib.pats Default values for Distribution: header
samples/distributions Recommended values for Distribution: header
samples/distrib.pats Default values for distributions
samples/distributions Recommended values for distributions
samples/expire.ctl Expiration config file
samples/filter_innd.pl Sample Perl filter for innd
samples/filter_innd.py Sample Python filter for innd
Expand Down Expand Up @@ -857,7 +857,7 @@ tests/data/articles/wire-7 Wire format version of article 7
tests/data/articles/wire-no-body Wire article without a body
tests/data/articles/wire-strange Wire article with CR and LF in headers
tests/data/articles/wire-truncated Wire article truncated in the headers
tests/data/articles/xref News article for Xref: testing
tests/data/articles/xref News article for Xref header field testing
tests/data/config Testing config files (Directory)
tests/data/config/errors Various config files with errors
tests/data/config/groups A config file with groups
Expand Down Expand Up @@ -892,13 +892,13 @@ tests/data/etc/passwd Password data for ckpasswd tests
tests/data/etc/storage.conf Storage configuration for testing
tests/data/overview Test overview data (Directory)
tests/data/overview/1-4 Overview info for test articles 1-4
tests/data/overview/1-4stripped Overview info for 1-4 without Xref:
tests/data/overview/1-4stripped Overview info for 1-4 without Xref
tests/data/overview/basic Basic set of overview test data
tests/data/overview/bogus Bad newsgroup name test data
tests/data/overview/high-numbered High-numbered article test data
tests/data/overview/munge-data Support script to generate test data
tests/data/overview/reversed Same as basic, but in reverse order
tests/data/overview/xref Storing on Xref: test data
tests/data/overview/xref Storing on Xref header field test data
tests/data/upgrade innupgrade test files (Directory)
tests/data/upgrade/inn.conf inn.conf file that needs fixing
tests/data/upgrade/inn.conf.ok Fixed inn.conf file
Expand Down Expand Up @@ -966,7 +966,7 @@ tests/overview Test suite for overview (Directory)
tests/overview/api-t.c Basic tests for overview API
tests/overview/overchan.t Tests for backends/overchan
tests/overview/overview-t.c Basic tests for overview methods
tests/overview/xref-t.c Test storing overview data by Xref:
tests/overview/xref-t.c Test storing overview data by Xref
tests/runtests.c The test suite driver program
tests/storage Test suite for storage (Directory)
tests/storage/archive.t Tests for backends/archive
Expand Down
14 changes: 7 additions & 7 deletions backends/archive.c
Expand Up @@ -165,7 +165,7 @@ link_article(const char *oldpath, const char *newpath, ARTHANDLE *art)


/*
** Write out a single header to stdout, applying the standard overview
** Write out a single header field to stdout, applying the standard overview
** transformation to it. This code is partly stolen from overdata.c; it
** would be nice to find a way to only write this in one place.
*/
Expand Down Expand Up @@ -276,12 +276,12 @@ process_article(ARTHANDLE *art, const char *token, struct config *config)
struct cvector *groups;
struct buffer *path = NULL;

/* Determine the groups from the Xref: header. In groups will be the split
Xref: header; from the second string on should be a group, a colon, and
an article number. */
/* Determine the groups from the Xref header field. In groups will be the
* split Xref header field body; from the second string on should be a
* group, a colon, and an article number. */
start = wire_findheader(art->data, art->len, "Xref", true);
if (start == NULL) {
warn("cannot find Xref: header in %s", token);
warn("cannot find Xref header field in %s", token);
return;
}
end = wire_endheader(start, art->data + art->len - 1);
Expand All @@ -291,7 +291,7 @@ process_article(ARTHANDLE *art, const char *token, struct config *config)
*p = ' ';
groups = cvector_split_space(xref, NULL);
if (groups->count < 2) {
warn("bogus Xref: header in %s", token);
warn("bogus Xref header field in %s", token);
free(xref);
return;
}
Expand All @@ -303,7 +303,7 @@ process_article(ARTHANDLE *art, const char *token, struct config *config)
group = groups->strings[i];
delim = strchr(group, ':');
if (delim == NULL) {
warn("bogus Xref: entry %s in %s", group, token);
warn("bogus Xref entry %s in %s", group, token);
continue;
}
*delim = '\0';
Expand Down
5 changes: 3 additions & 2 deletions backends/innxmit.c
Expand Up @@ -648,7 +648,8 @@ REMsendarticle(char *Article, char *MessageID, ARTHANDLE *art)

vec[0].iov_base = (char *) art->data;
vec[0].iov_len = len;
/* Add 14 bytes, which maybe will be the length of the Bytes header */
/* Add 14 bytes, which maybe will be the length of the Bytes header
* field */
snprintf(buf, sizeof(buf), "Bytes: %lu\r\n",
(unsigned long) art->len + 14);
vec[1].iov_base = buf;
Expand Down Expand Up @@ -723,7 +724,7 @@ REMsendarticle(char *Article, char *MessageID, ARTHANDLE *art)


/*
** Get the Message-ID header from an open article.
** Get the Message-ID header field from an open article.
*/
static char *
GetMessageID(ARTHANDLE *art)
Expand Down
8 changes: 4 additions & 4 deletions backends/news2mail.in
Expand Up @@ -125,17 +125,17 @@ sub mailto {
die "bad $smgr";
}

# Header.
# Headers.
while (<SMGR>) {
chomp;

# Empty line signals the end of header.
# Empty line signals the end of header field.
if (/^$/) {
print SM "To: ".join(",", @a)."\n\n";
last;
}

# Skip unnecessary headers.
# Skip unnecessary header fields.
next if /^X-/i;
next if /^To:/i;
next if /^NNTP-Posting-Date:/i;
Expand All @@ -144,7 +144,7 @@ sub mailto {
next if /^Xref:/i;
next if /^Path:/i;

# Convert Newsgroups: header into X-Newsgroups:.
# Convert Newsgroups header field into X-Newsgroups header field.
s/^Newsgroups:/X-Newsgroups:/i;

print SM "$_\n";
Expand Down
2 changes: 1 addition & 1 deletion backends/sendinpaths.in
@@ -1,7 +1,7 @@
#! /usr/bin/perl -w
# fixscript will replace this line with code to load INN::Config

## Submit Path: statistics based on ninpaths.
## Submit Path header field statistics based on ninpaths.
##
## A rewrite of the sendinpaths shell script in Perl, based on Mohan Kokal's
## initial work. Improved by Julien Elie.
Expand Down
2 changes: 1 addition & 1 deletion contrib/analyze-traffic.pl
Expand Up @@ -52,7 +52,7 @@
#
# - We try (if $USE_ALL_GROUPS is set, below) to count crossposted
# towards each listed group (even ones not carried on the server!),
# but since some articles have funky Newsgroups headers, that can
# but since some articles have funky Newsgroups header fields, that can
# backfire. So parsing can fail, which usually results in the
# relevant line being skipped, but occasionally can cause Perl to
# issue warnings (and perhaps produce funny things in the output).
Expand Down
16 changes: 8 additions & 8 deletions contrib/count_overview.pl
@@ -1,27 +1,27 @@
#!/usr/local/bin/perl
#
# count_overview.pl: Count the groups in a bunch of xref records.
# count_overview.pl: Count the groups in a bunch of Xref records.

while (<>) {

chop;
@xreflist = split(/\t/); # split apart record
@xreflist = split(/\t/); # Split apart record.

$_ = $xreflist[$#xreflist]; # xref is last.
$_ = $xreflist[$#xreflist]; # Xref is last.

@xreflist = reverse(split(/ /)); #break part xref line.
@xreflist = reverse(split(/ /)); # Break part Xref header field body.

pop @xreflist; # get rid xref header
pop @xreflist; # Get rid of Xref header field.
pop @xreflist;

while ($current = pop @xreflist) {
($current) = split(/:/,$current); #get newsgroup name
$groups{$current}++; #tally
($current) = split(/:/,$current); # Get newsgroup name.
$groups{$current}++; # Tally.
}

}

# display accumulated groups and counts.
# Display accumulated groups and counts.
foreach $current (sort keys %groups) {
printf "%-50s\t%5d\n", $current, $groups{$current};
}
2 changes: 1 addition & 1 deletion contrib/expirectl.c
Expand Up @@ -325,7 +325,7 @@ main(int ac, char **av)
/remember/:[1.2/20]
## Keep for 1-10 days, allow Expires headers to work.
## Keep for 1-10 days, allow Expires header fields to work.
#
*:A:1:[1.0]:[6.0]
*.advocacy:A:1:[0.5]:[2.0]
Expand Down
14 changes: 7 additions & 7 deletions contrib/pullart.c
Expand Up @@ -73,7 +73,7 @@ int main (int argc, char *argv[])
{
printf ("Usage: pullart <cycbuff> <fileprefix> [<header> <string>]\n");
printf (" Read cycbuffer <cycbuff> and print all articles whose\n");
printf (" article header <header> contains <string>.\n");
printf (" article header field body <header> contains <string>.\n");
printf (" Articles are written to files name <fileprefix>.nnnnnn\n");
printf (" where nnnnnn is numbered sequentially from 0.\n");
printf (" If <header> and <string> not specified, all articles\n");
Expand Down Expand Up @@ -202,7 +202,7 @@ printf ("string <%s>\n", string != NULL ? string : NULL);

/*
Writes article stored in buff[] if it has a
"Newsgroups:" header line which contains *newsgroup
"Newsgroups:" header field which contains *newsgroup
Write to a file named fileprefix.fileno
*/
int
Expand All @@ -227,7 +227,7 @@ WriteArticle
}

/*
Is header here? Search if header string requested, leave if not found
Is header field here? Search if header string requested, leave if not found
*/
if (headerin!=NULL)
{
Expand All @@ -244,16 +244,16 @@ WriteArticle
}

/*
Header found. What about string?
Header field found. What about string?
Search if string requested, leave if not found
*/
if (string!=NULL)
{
/* Find end of header line */
/* Find end of header field body */
begptr++;
endptr = strchr (begptr, '\n');

/* Something is wrong, end of header not found, do not write
/* Something is wrong, end of header field body not found, do not write
* article
*/
if (endptr==NULL)
Expand All @@ -274,7 +274,7 @@ WriteArticle
/* No string specified */

}
/* No header specified */
/* No header field specified */

/* Open file, write buffer, close file */
snprintf (filename, sizeof(filename), "%s.%06i", fileprefix, fileno);
Expand Down
2 changes: 1 addition & 1 deletion control/controlchan.in
Expand Up @@ -131,7 +131,7 @@ while (<STDIN>) {
if ($hdr{'date'}) {
$postingdate = int(convdate('-n', "$hdr{'date'}"));
} else {
logmsg('Missing Date: header field');
logmsg('Missing Date header field');
$parser->filer->purge;
next;
}
Expand Down
12 changes: 6 additions & 6 deletions control/perl-nocem.in
Expand Up @@ -608,7 +608,7 @@ thanks to its Message-ID.
When you have verified that everything works, you can eventually turn
off regular spam cancels, if you want, not processing any longer
cancels containing C<cyberspam> in the Path: header (see the
cancels containing C<cyberspam> in the Path header field body (see the
I<refusecybercancels> parameter in F<inn.conf>).
=head1 FILES
Expand All @@ -631,13 +631,13 @@ The keyring which contains the public keys of trusted NoCeM issuers.
=head1 BUGS
The Subject: header is not checked for the @@NCM string and there is no
check for the presence of the References: header.
The Subject header field body is not checked for the @@NCM string and
there is no check for the presence of the References header field.
The Newsgroups: pseudo header is not checked, but this can be done in
local_want_cancel_id().
The Newsgroups pseudo header field body is not checked, but this can
be done in local_want_cancel_id().
The Hierarchies: header is ignored.
The Hierarchies header field is ignored.
=head1 HISTORY
Expand Down

0 comments on commit d06b60a

Please sign in to comment.