These programs are minor utilities used by various parts of C News.
Spacefor determines how many files of size filesize can fit in location
(incoming, articles, control, archive,
or outbound to site)
without cramping things unduly.
The precise locations of these places, and how low space gets before
it is unduly cramped, are site-specific.
Spacefor invokes df(1) or the equivalent system call
to determine the available space.
Queuelen reports how many news batches uucp has queued up for site.
Sizeof reports the total number of bytes in the file(s).
(This may seem redundant with ls -l, but the format of ls -l
varies between systems and sizeof looks after all that.)
Nonexistent files are silently ignored.
-i option is given,
sizeof prints one line per (existing) file, with name and size,
and does not print the total.
getabsdate convert dates in human-readable form
and from (ctime) decimal ASCII representations
of Unixs internal integer dates.
Their functionality resembles that of their namesakes in the C library.
Getabsdate parses only absolute dates,
not relative dates.
ctime will print GMT instead of local time.
ctime will print the time in GMT in Internet format.
Newshostname reports the name of this system for news purposes.
This may differ from the name of the particular CPU it is run on;
a cluster of CPUs sharing a filesystem tree would all have the same
Typically newshostname gets the name from /var/lib/news/whoami;
failing that, it consults various other possible sources
(e.g. the hostname command).
Gngp resembles grep except that its search is based on newsgroup patterns
(e.g. comp, which matches comp, comp.lang, comp.lang.c, ...;
comp,!comp.lang.c which matches comp and comp.lang but not
Gngp prints only the line(s) that
contain a substring that matches the ngpattern.
Normally the substring must run from a point in the line to its end.
flag is given,
the eligible substrings start at the beginning of the
line and end at white space or the end of the line.
-v option prints only lines that do
-r flag reverses the inputs, with patterns coming from
the file and the argument taken as the line(s).
Canonhdr takes the concatenation of its input file(s) (standard input if none)
as an article,
and outputs the header from the article with header keywords canonicalized
for easier processing.
Canonicalization forces all alphabetics to lower case except the first
letter of each (hyphen-separated) word in the keyword,
which is forced to upper case.
Message-ID is the canonical form of [e.g.] message-id.)
canonhdr will also canonicalise dates in
Date: header if none is present.
-m, it will accept RFC 822 headers
and rewrite them as RFC 1036 headers.
Newslock makes a link named lockname to the file locktemp,
and returns exit status 0 for success, 1 if the link could not be made
(typically because lockname already existed).
This is used for shell-file locking in C News.
It is a subset of ln(1) except that (a) no error messages are
ever produced and (b) the link is guaranteed to fail if lockname
(Some brain-damaged versions of ln helpfully remove lockname
in that case, making them useless for locking.)