2.3-2.6.c

usenet usenet
Tue Apr 20 19:45:13 AEST 1982


diff -c -r /ra/csr/glickman/news/dist/README news/README
*** /ra/csr/glickman/news/dist/README	Sun Mar 14 15:00:25 1982
--- news/README	Tue Apr 20 10:44:04 1982
***************
*** 17,23
  shows the changes you need to make to uucp to support the -z option.
  The dirform is the usenet directory form - you should fill it out and
  post it to newsgroup net.news.newsite to announce that you have joined
! the net.
  
  When you start getting network news, you should announce your existence
  to the net by filling out misc/dirform and posting it to the newsgroup

--- 17,24 -----
  shows the changes you need to make to uucp to support the -z option.
  The dirform is the usenet directory form - you should fill it out and
  post it to newsgroup net.news.newsite to announce that you have joined
! the net.  Other useful tools contributed by other sites are added to
! this directory for optional use by USENET sites.
  
  When you start getting network news, you should announce your existence
  to the net by filling out misc/dirform and posting it to the newsgroup
***************
*** 78,80
  
  If you want LIBDIR/users to keep a useful list of users,  you should
  create it mode 666, since readnews does not run suid.

--- 79,92 -----
  
  If you want LIBDIR/users to keep a useful list of users,  you should
  create it mode 666, since readnews does not run suid.
+ 
+ If you want expired articles kept around, create the directory
+ /usr/spool/oldnews.  The expire program will create a hierarchy
+ under this location, if present, similar to the one under /usr/spool/news.
+ 
+ The expire program will delete all articles in the history file
+ which are past their expiration date.  It will remove both the
+ article and the line in history.  This mechanism should keep your
+ history file down to a manageable size.  The trimlib script in the
+ misc directory can be used to keep you log file down in size.
+ Both expire and trimlib should be run once a night from crontab.
Common subdirectories: /ra/csr/glickman/news/dist/doc and news/doc
Common subdirectories: /ra/csr/glickman/news/dist/man and news/man
Common subdirectories: /ra/csr/glickman/news/dist/misc and news/misc
Common subdirectories: /ra/csr/glickman/news/dist/src and news/src
diff -c -r /ra/csr/glickman/news/dist/doc/howto.ms news/doc/howto.ms
*** /ra/csr/glickman/news/dist/doc/howto.ms	Wed Feb 24 04:58:58 1982
--- news/doc/howto.ms	Sat Apr  3 11:48:32 1982
***************
*** 4,10
  Mark R. Horton
  .AI
  Bell Telephone Laboratories
! .CB
  .SH
  What is the Network News?
  .PP

--- 4,10 -----
  Mark R. Horton
  .AI
  Bell Telephone Laboratories
! Columbus, Ohio 43213
  .SH
  What is the Network News?
  .PP
diff -c -r /ra/csr/glickman/news/dist/doc/install.ms news/doc/install.ms
*** /ra/csr/glickman/news/dist/doc/install.ms	Thu Mar 18 15:51:00 1982
--- news/doc/install.ms	Tue Mar 30 18:51:54 1982
***************
*** 175,180
  There are other parameters that may be modified in
  .B defs.h ,
  and they are described in the file.
  .NH 2
  Makefile
  .PP

--- 175,190 -----
  There are other parameters that may be modified in
  .B defs.h ,
  and they are described in the file.
+ .NH 3
+ MANUALLY
+ .PP
+ If this is defined, incoming
+ .B rmgroup
+ messages will not remove the subdirectories, but rather just remove the
+ group line from your active file.
+ You should have NOTIFY on if you use this.
+ Note that on a USG system the subdirectory will not be removed anyway
+ unless you have an unsecure (mode 777 directory) system.
  .NH 2
  Makefile
  .PP
***************
*** 954,959
  .IP (3)
  Chmod the old news directory to 555 to prevent any more news
  from being posted.
  .IP (4)
  Replace the old rnews program with the new rnews program.
  .IP (5)

--- 964,971 -----
  .IP (3)
  Chmod the old news directory to 555 to prevent any more news
  from being posted.
+ (Actually, this will prevent the bitfile from being updated,
+ so it may not be a good idea.)
  .IP (4)
  Replace the old rnews program with the new rnews program.
  .IP (5)
***************
*** 977,983
  .DS
  netnews -s
  .DE
! to see what they subscribe to, and then create a file in their
  home directory called .newsrc containing
  .DS
  options -s \fItheir subscription\fP

--- 989,995 -----
  .DS
  netnews -s
  .DE
! to see what they subscribe to on the old system, and then create a file in their
  home directory called .newsrc containing
  .DS
  options -s \fItheir subscription\fP
diff -c -r /ra/csr/glickman/news/dist/man/checknews.1 news/man/checknews.1
*** /ra/csr/glickman/news/dist/man/checknews.1	Thu Mar 18 15:51:06 1982
--- news/man/checknews.1	Sun Apr  4 20:34:53 1982
***************
*** 2,8
  .SH NAME
  checknews \- check to see if user has news
  .SH SYNOPSIS
! checknews [ynevv] [readnews options]
  .SH DESCRIPTION
  .I checknews
  reports to the user whether or not he has news.

--- 2,8 -----
  .SH NAME
  checknews \- check to see if user has news
  .SH SYNOPSIS
! checknews [ynqevv] [readnews options]
  .SH DESCRIPTION
  .I checknews
  reports to the user whether or not he has news.
***************
*** 12,17
  .TP 10
  .B n
  Reports ``No news'' if there isn't any news to read.
  .TP 10
  .B v
  alters the

--- 12,22 -----
  .TP 10
  .B n
  Reports ``No news'' if there isn't any news to read.
+ .TP 10
+ .B q
+ causes checknews to be quiet.
+ Instead of printing a message, the exit status indicates news.
+ A status of 0 means no news, 1 means there is news.
  .TP 10
  .B v
  alters the
diff -c -r /ra/csr/glickman/news/dist/man/expire.8 news/man/expire.8
*** /ra/csr/glickman/news/dist/man/expire.8	Thu Feb 25 18:26:26 1982
--- news/man/expire.8	Tue Mar 30 18:43:45 1982
***************
*** 2,8
  .SH NAME
  expire \- remove outdated news articles
  .SH SYNOPSIS
! /usr/lib/news/expire [ \-n newsgroups ]
  .SH DESCRIPTION
  .PP
  .I Expire

--- 2,27 -----
  .SH NAME
  expire \- remove outdated news articles
  .SH SYNOPSIS
! /usr/lib/news/expire
! [
! .B \-n
! .I newsgroups
! ]
! [
! .B \-i
! ]
! [
! .B \-I
! ]
! [
! .B \-v
! [
! .I level
! ] ]
! [
! .B \-e
! .I days
! ]
  .SH DESCRIPTION
  .PP
  .I Expire
***************
*** 17,22
  articles are moved to that directory.
  (The new filename is the article ID.)
  Otherwise, the articles are unlinked.
  .SH "SEE ALSO"
  inews(1),
  uurec(8),

--- 36,73 -----
  articles are moved to that directory.
  (The new filename is the article ID.)
  Otherwise, the articles are unlinked.
+ .PP
+ The
+ .B \-v
+ option causes expire to be more verbose.
+ It can be given a verbosity level (default 1) as in
+ .B \-v3
+ for even more output.
+ This is useful if articles aren't being expired and you want to know why.
+ .PP
+ The
+ .B \-e
+ flag gives the number of days to use for a default expiration date.
+ If not given, an installation dependent default (often 2 weeks) is used.
+ .PP
+ The
+ .B \-i
+ and
+ .B \-I
+ flags
+ tell
+ .B expire
+ to ignore any expiration date explicitly given on articles.
+ This can be used when disk space is really tight.
+ The
+ .B \-I
+ flag will always ignore expiration dates,
+ while the
+ .B \-i
+ flag will only ignore the date if ignoring it would expire the article sooner.
+ .I WARNING:
+ If you have articles archived by giving them expiration dates far into the
+ future, these options might remove these files anyway.
  .SH "SEE ALSO"
  inews(1),
  uurec(8),
diff -c -r /ra/csr/glickman/news/dist/man/inews.1 news/man/inews.1
*** /ra/csr/glickman/news/dist/man/inews.1	Thu Mar 18 15:51:09 1982
--- news/man/inews.1	Tue Apr 20 10:47:08 1982
***************
*** 29,35
  .I title 
  must be specified as there is no default.  Each article
  belongs to a list of newsgroups.  If the 
! .B -n 
  flag is omitted, the list
  will default to something like "general".  If you wish to submit
  an article in multiple newsgroups, the

--- 29,35 -----
  .I title 
  must be specified as there is no default.  Each article
  belongs to a list of newsgroups.  If the 
! .B \-n 
  flag is omitted, the list
  will default to something like "general".  If you wish to submit
  an article in multiple newsgroups, the
***************
*** 38,44
  If not specified, the expiration date will be
  set to the local default.
  The
! .B -f
  flag specifies the article's sender.  Without this flag, the sender
  defaults to the user's name.
  .LP

--- 38,44 -----
  If not specified, the expiration date will be
  set to the local default.
  The
! .B \-f
  flag specifies the article's sender.  Without this flag, the sender
  defaults to the user's name.
  .LP
diff -c -r /ra/csr/glickman/news/dist/man/news.5 news/man/news.5
*** /ra/csr/glickman/news/dist/man/news.5	Thu Feb 25 18:27:29 1982
--- news/man/news.5	Tue Apr 20 10:52:39 1982
***************
*** 12,18
  .BR A " format.  " A " format"
  looks like this:
  .LP
! .BI A filename
  .br
  .I newsgroups
  .br

--- 12,18 -----
  .BR A " format.  " A " format"
  looks like this:
  .LP
! .BI A article-ID
  .br
  .I newsgroups
  .br
***************
*** 65,70
  .TP 15
  .B Expires:
  .I Expiration Date
  .LP
  The default article skeleton looks like this:
  .LP

--- 65,79 -----
  .TP 15
  .B Expires:
  .I Expiration Date
+ .TP 15
+ .B Reply-To:
+ .I Address for mail replies
+ .TP 15
+ .B References:
+ .I Article ID of article this is a follow-up to.
+ .TP 15
+ .B Control:
+ .I Text of a control message
  .LP
  The default article skeleton looks like this:
  .LP
***************
*** 78,85
  .br
  .B Posted:
  .br
- .B Expires:
- .br
  .B Received:
  
  .I Body of article

--- 87,92 -----
  .br
  .B Posted:
  .br
  .B Received:
  
  .I Body of article
***************
*** 110,116
  is executed by the shell with the article to be transmitted as the standard
  input.
  The default is
! .BI "uux - -r " sysname !rnews.
  Some examples:
  .LP
  .B "xyz:net.all"

--- 117,123 -----
  is executed by the shell with the article to be transmitted as the standard
  input.
  The default is
! .BI "uux \- \-z \-r " sysname !rnews.
  Some examples:
  .LP
  .B "xyz:net.all"
***************
*** 115,121
  .LP
  .B "xyz:net.all"
  .br
! .B "oldsys:net.all,fa.all,to_oldsys:A"
  .br
  .B "berksys:net.all,ucb.all::/usr/lib/news/sendnews -b berksys\\:rnews"
  .br

--- 122,128 -----
  .LP
  .B "xyz:net.all"
  .br
! .B "oldsys:net.all,fa.all,to.oldsys:A"
  .br
  .B "berksys:net.all,ucb.all::/usr/lib/news/sendnews \-b berksys\\:rnews"
  .br
***************
*** 117,123
  .br
  .B "oldsys:net.all,fa.all,to_oldsys:A"
  .br
! .B "berksys:net.all,ucb.all::/usr/lib/news/sendnews -b berksys\\:rnews"
  .br
  .B "arpasys:net.all,arpa.all::/usr/lib/news/sendnews -a rnews at arpasys"
  .br

--- 124,130 -----
  .br
  .B "oldsys:net.all,fa.all,to.oldsys:A"
  .br
! .B "berksys:net.all,ucb.all::/usr/lib/news/sendnews \-b berksys\\:rnews"
  .br
  .B "arpasys:net.all,arpa.all::/usr/lib/news/sendnews \-a rnews at arpasys"
  .br
***************
*** 119,125
  .br
  .B "berksys:net.all,ucb.all::/usr/lib/news/sendnews -b berksys\\:rnews"
  .br
! .B "arpasys:net.all,arpa.all::/usr/lib/news/sendnews -a rnews at arpasys"
  .br
  .B "old2:net.all,fa.all:A:/usr/lib/sendnews -o old2\\:rnews"
  .br

--- 126,132 -----
  .br
  .B "berksys:net.all,ucb.all::/usr/lib/news/sendnews \-b berksys\\:rnews"
  .br
! .B "arpasys:net.all,arpa.all::/usr/lib/news/sendnews \-a rnews at arpasys"
  .br
  .B "old2:net.all,fa.all:A:/usr/lib/sendnews \-o old2\\:rnews"
  .br
***************
*** 121,127
  .br
  .B "arpasys:net.all,arpa.all::/usr/lib/news/sendnews -a rnews at arpasys"
  .br
! .B "old2:net.all,fa.all:A:/usr/lib/sendnews -o old2\\:rnews"
  .br
  .B "user:fa.sf-lovers::mail user"
  .LP

--- 128,134 -----
  .br
  .B "arpasys:net.all,arpa.all::/usr/lib/news/sendnews \-a rnews at arpasys"
  .br
! .B "old2:net.all,fa.all:A:/usr/lib/sendnews \-o old2\\:rnews"
  .br
  .B "user:fa.sf-lovers::mail user"
  .LP
diff -c -r /ra/csr/glickman/news/dist/man/newsrc.5 news/man/newsrc.5
*** /ra/csr/glickman/news/dist/man/newsrc.5	Thu Mar 18 15:51:11 1982
--- news/man/newsrc.5	Tue Apr 20 10:48:05 1982
***************
*** 1,6
  .TH NEWSRC 5
  .SH NAME
! newsrc \- information file for readnews(1) and newscheck(1)
  .SH DESCRIPTION
  The
  .I .newsrc

--- 1,6 -----
  .TH NEWSRC 5
  .SH NAME
! newsrc \- information file for readnews(1) and checknews(1)
  .SH DESCRIPTION
  The
  .I .newsrc
***************
*** 6,12
  .I .newsrc
  file contains the list of previously read articles and an optional
  options line for
! .IR readnews(1) " and " newscheck(1).
  Each newsgroup that articles
  have been read from has a line of the form:
  .LP

--- 6,12 -----
  .I .newsrc
  file contains the list of previously read articles and an optional
  options line for
! .IR readnews(1) " and " checknews(1).
  Each newsgroup that articles
  have been read from has a line of the form:
  .LP
***************
*** 29,35
  (left-justified).  Then there are the list of options just as they
  would be on the command line.  For instance:
  .LP
! .B "options -n all !fa.sf-lovers !fa.human-nets -r"
  .br
  .B "options -c -r"
  .LP

--- 29,35 -----
  (left-justified).  Then there are the list of options just as they
  would be on the command line.  For instance:
  .LP
! .B "options \-n all !fa.sf-lovers !fa.human-nets \-r"
  .br
  .B "options \-c \-r"
  .LP
***************
*** 31,37
  .LP
  .B "options -n all !fa.sf-lovers !fa.human-nets -r"
  .br
! .B "options -c -r"
  .LP
  A string of lines beginning with a space or tab after the initial options
  line will be considered continuation lines.

--- 31,37 -----
  .LP
  .B "options \-n all !fa.sf-lovers !fa.human-nets \-r"
  .br
! .B "options \-c \-r"
  .LP
  A string of lines beginning with a space or tab after the initial options
  line will be considered continuation lines.
diff -c -r /ra/csr/glickman/news/dist/man/postnews.1 news/man/postnews.1
*** /ra/csr/glickman/news/dist/man/postnews.1	Thu Feb 25 18:29:09 1982
--- news/man/postnews.1	Tue Apr 20 10:45:51 1982
***************
*** 39,45
  University of California at Berkeley.)
  .PP
  After entering the title and newsgroup,
! the user should type the body of the article.  Optionally, the article
  will be read from the specified
  .IR filename .
  To end the article, type control D at the beginning of a line.

--- 39,50 -----
  University of California at Berkeley.)
  .PP
  After entering the title and newsgroup,
! the user should type the body of the article.
! To end the article, type control D at the beginning of a line.
! If the environment variable EDITOR is set to the pathname of
! an editor, the user will be placed in that editor instead of
! typing in the article by hand.
! Optionally, the article
  will be read from the specified
  .IR filename .
  .PP
***************
*** 42,48
  the user should type the body of the article.  Optionally, the article
  will be read from the specified
  .IR filename .
- To end the article, type control D at the beginning of a line.
  .PP
  For more sophisticated uses, such as posting from a file,
  see

--- 47,52 -----
  Optionally, the article
  will be read from the specified
  .IR filename .
  .PP
  For more sophisticated uses, such as specifying an expiration date,
  see
***************
*** 44,50
  .IR filename .
  To end the article, type control D at the beginning of a line.
  .PP
! For more sophisticated uses, such as posting from a file,
  see
  .BR inews (1).
  .SH FILES

--- 48,54 -----
  will be read from the specified
  .IR filename .
  .PP
! For more sophisticated uses, such as specifying an expiration date,
  see
  .BR inews (1).
  .SH FILES
diff -c -r /ra/csr/glickman/news/dist/man/readnews.1 news/man/readnews.1
*** /ra/csr/glickman/news/dist/man/readnews.1	Sun Mar 14 15:00:48 1982
--- news/man/readnews.1	Tue Mar 30 18:46:48 1982
***************
*** 175,180
  .IP "s [\fIfile\fP]"
  Save.  The article is appended to the named file.
  The default is ``Articles''.
  .IP #
  Report last article no. in newsgroup.
  .IP e

--- 175,183 -----
  .IP "s [\fIfile\fP]"
  Save.  The article is appended to the named file.
  The default is ``Articles''.
+ If the first character of the file name is `|',
+ the rest of the file name is taken as the name of a program,
+ which is executed with the text of the article as standard input.
  .IP #
  Report last article no. in newsgroup.
  .IP e
diff -c -r /ra/csr/glickman/news/dist/man/sendnews.8 news/man/sendnews.8
*** /ra/csr/glickman/news/dist/man/sendnews.8	Thu Feb 25 18:21:30 1982
--- news/man/sendnews.8	Tue Apr 20 10:49:34 1982
***************
*** 2,8
  .SH NAME
  sendnews \- send news articles via mail
  .SH SYNOPSIS
! sendnews [-o] [-a] [-b] [-n newsgroups] destination
  .SH DESCRIPTION
  .I sendnews
  reads an article from it's standard input, performs a set of changes

--- 2,22 -----
  .SH NAME
  sendnews \- send news articles via mail
  .SH SYNOPSIS
! sendnews
! [
! .B \-o
! ]
! [
! .B \-a
! ]
! [
! .B \-b
! ]
! [
! .B \-n
! newsgroups
! ]
! destination
  .SH DESCRIPTION
  .I sendnews
  reads an article from it's standard input, performs a set of changes
***************
*** 13,19
  .I uurec(1).
  .PP
  The
! .B -o
  flag handles old format articles.
  .PP
  The

--- 27,33 -----
  .I uurec(1).
  .PP
  The
! .B \-o
  flag handles old format articles.
  .PP
  The
***************
*** 17,23
  flag handles old format articles.
  .PP
  The
! .B -a
  flag is used for sending articles via the
  .B ARPANET.
  It maps the article's path from

--- 31,37 -----
  flag handles old format articles.
  .PP
  The
! .B \-a
  flag is used for sending articles via the
  .B ARPANET.
  It maps the article's path from
***************
*** 26,32
  .I xxx at arpahost.
  .PP
  The
! .B -b
  flag is used for sending articles via the
  .B Berknet.
  It maps the article's path from

--- 40,46 -----
  .I xxx at arpahost.
  .PP
  The
! .B \-b
  flag is used for sending articles via the
  .B Berknet.
  It maps the article's path from
***************
*** 35,41
  .I berkhost:xxx.
  .PP
  The
! .B -n
  flag changes the article's newsgroup to the specified
  .I newsgroup.
  .SH SEE ALSO

--- 49,55 -----
  .I berkhost:xxx.
  .PP
  The
! .B \-n
  flag changes the article's newsgroup to the specified
  .I newsgroup.
  .SH SEE ALSO
Only in /ra/csr/glickman/news/dist/misc: Mail.diff
diff -c -r /ra/csr/glickman/news/dist/misc/adm news/misc/adm
*** /ra/csr/glickman/news/dist/misc/adm	Sun Feb 28 09:35:35 1982
--- news/misc/adm	Sun Apr 18 17:49:53 1982
***************
*** 1,5
! From cbosg!decvax!watmath!bstempleton Thu Feb 18 23:49:24 1982
! Date: 18-Feb-82 21:47:46-EST (Thu)
  From: cbosg!decvax!watmath!bstempleton
  Subject: Re:  net.adm.site
  Via: cbosgd.uucp (V3.73 [1/5/82]); 18-Feb-82 23:49:22-EST (Thu)

--- 1,5 -----
! From cbosg!decvax!watmath!bstempleton Tue Mar  2 20:01:49 1982
! Date: Mon Mar  1 19:37:04 1982
  From: cbosg!decvax!watmath!bstempleton
  Subject: net.adm.site stuff
  Via: cbosgd.uucp (V3.73 [1/5/82]); 2-Mar-82 20:01:48-EST (Tue)
***************
*** 1,14
  From cbosg!decvax!watmath!bstempleton Thu Feb 18 23:49:24 1982
  Date: 18-Feb-82 21:47:46-EST (Thu)
  From: cbosg!decvax!watmath!bstempleton
! Subject: Re:  net.adm.site
! Via: cbosgd.uucp (V3.73 [1/5/82]); 18-Feb-82 23:49:22-EST (Thu)
! Mail-From: cbosg received by cbosgd at 18-Feb-82 23:49:19-EST (Thu)
! To: decvax!cbosg!cbosgd!mark
! Status: R
! 
! Now that I have seen the unc best path program, i think I will have the program ask for that
! kind of syntax now.  here it is as I sent it out.
  OK, here goes - a new idea for automating some of the work done by news
  administrators on the USENET.
  

--- 1,12 -----
  From cbosg!decvax!watmath!bstempleton Tue Mar  2 20:01:49 1982
  Date: Mon Mar  1 19:37:04 1982
  From: cbosg!decvax!watmath!bstempleton
! Subject: net.adm.site stuff
! Via: cbosgd.uucp (V3.73 [1/5/82]); 2-Mar-82 20:01:48-EST (Tue)
! Mail-From: cbosg received by cbosgd at 2-Mar-82 20:01:45-EST (Tue)
! To: decvax!cbosg!cbosgd!mark decvax!duke!unc!smb decvax!ittvax!swatt
!     decvax!shannon decvax!ucbvax!ARPAVAX:glickman watarts!eric
! :::::::::::::::::::::::::::::::::::::::::::::::::::
  OK, here goes - a new idea for automating some of the work done by news
  administrators on the USENET.
  
***************
*** 21,26
  net.adm.site, and implements automatic USENET directories.  There are two
  programs.  One prompts a news administrator for information concerning his
  site, and builds a file of it.  This file is posted to net.adm.site.
  
  The second file reads articles posted to net.adm.site.  It takes the system
  name off the article-id and creates an entry for that site.  Included in

--- 19,28 -----
  net.adm.site, and implements automatic USENET directories.  There are two
  programs.  One prompts a news administrator for information concerning his
  site, and builds a file of it.  This file is posted to net.adm.site.
+ One of the things the script asks for is a list of your uucp connections
+ in the format required by unc!smb's cheapest path uucp alias generator.
+ If all sites provide the public paths they have, this will allow the
+ generator to produce the best routings, saving everybody money and phone time.
  
  The second file reads articles posted to net.adm.site.  It takes the system
  name off the article-id and creates an entry for that site.  Included in
***************
*** 27,33
  that entry is a path to that site derived from the 'from' line in the
  header.  This article is appended to the USENET directory file, in this
  case called /usr/lib/news/usenetdir, and deletes the old entry for that
! site.
  
  This is a simple description, but the shell scripts are simple and easy to
  read if you want to know what is going on.  The scripts use A format so

--- 29,36 -----
  that entry is a path to that site derived from the 'from' line in the
  header.  This article is appended to the USENET directory file, in this
  case called /usr/lib/news/usenetdir, and deletes the old entry for that
! site.  If you want it to put the entry in a private one file per site
! directory, the change is fairly obvious.
  
  This is a simple description, but the shell scripts are simple and easy to
  read if you want to know what is going on.  The scripts use A format so
***************
*** 72,77
  "How to I get to site X?"
  Unfortunately, the Best Path part won't work if an ARPANET like is used,
  as for site 'cca'.  You'll have to manually alter this.
  
  There are further plans for net.adm.*  These groups can be used for all
  sorts of control messages that might also be read by humans unlike the

--- 75,82 -----
  "How to I get to site X?"
  Unfortunately, the Best Path part won't work if an ARPANET like is used,
  as for site 'cca'.  You'll have to manually alter this.
+ Eventually, best paths will be pulled out of the UUCP link entries in your
+ directory.
  
  There are further plans for net.adm.*  These groups can be used for all
  sorts of control messages that might also be read by humans unlike the
***************
*** 143,162
  echo "sys (or .sys) file (seperated by commas)"
  read unpart
  echo Usenet partners: $unpart >>$san
! echo "Please give the network names of the people that you talk to regularly"
! echo "on the network.  These would be people you talk call with an autodialer,"
! echo "or who poll you on a regular basis.  This will normally include your"
! echo "USENET partners.  If you don't want to make a connection public, don't"
! echo "mention it, of course.  Also include systems for which you are the only"
! echo "network contact, even if you don't talk regularly with them."
! read uupart
! echo Regular uucp: $uupart >>$san
! echo "Give the network names of the sites that you talk to on an irregular"
! echo "basis.  This generally means sites for which you act as a slave, and"
! echo "which do not poll you regularly.  You might also wish to include sites"
! echo "That you dial manually and irregularly here."
! read irpart
! echo Irregular uucp: $irpart >>$san
  echo "Please give the voice phone number of the contact person at your site."
  echo "(nnn) nnn-nnnn format please"
  read voiph

--- 148,188 -----
  echo "sys (or .sys) file (seperated by commas)"
  read unpart
  echo Usenet partners: $unpart >>$san
! cat <<"blart"
! Please give the network names of the people that you talk to
! on the uucp network.  This information is desired for a database of UUCP
! connections from which UUCP aliasing files can be built through a program
! written by unc!smb.  List each site to which you have a uucp connection
! that you wish to make public.  To list a site, give its UUCP name, followed
! by a value describing how useful the connection is in parentheses. Your
! cost can be given as a standard arithmetic expression.  The lower the number,
! the better the line is.  The following 'manifests' are known to the program
! with the following values: (If you don't give an expression, 3000 is default)
! 	LOCAL = 10
! 	ARPA = 31
! 	DED = 95
! 	DEDICATED = 95
! 	DIRECT = 200
! 	DEMAND = 300
! 	DIAL = 300
! 	DIALED = 300
! 	HOURLY = 500
! 	POLLED = 5000
! 	DAILY = 5000
! 	WEEKLY = 30000
! 	DEAD = INF/2
! 	HIGH = -5	/* baud rate bonus */
! 	LOW = 5		/* baud rate penalty */
! 
! Delimit your entries with commas.  Type as many lines as you like,
! (naturally, don't put a comma after the last entry) and enter a null
! line when you are done.  Here is an example:
! decvax(2*HOURLY), watcgl(DIRECT), watarts(DEMAND),
! hcr(POLLED), cbosg(WEEKLY)
! blart
! while { read uupart; test -n "$uupart"; }
! 	do echo Partners: $uupart >>$san
! done
  echo "Please give the voice phone number of the contact person at your site."
  echo "(nnn) nnn-nnnn format please"
  read voiph
Only in news/misc: mhhooks
Only in news/misc: newsinfo
Only in news/misc: sendnewsmail
Only in news/misc: sendspoolednew
Only in news/misc: spoolnews
Only in news/src: Makefile
diff -c -r /ra/csr/glickman/news/dist/src/Makefile.usg news/src/Makefile.usg
*** /ra/csr/glickman/news/dist/src/Makefile.usg	Thu Feb 25 18:06:45 1982
--- news/src/Makefile.usg	Sun Apr 18 18:01:56 1982
***************
*** 1,4
! # @(#) Makefile.usg	2.2	2/25/82
  
  # definitions
  SPOOLDIR = /usr/spool/news

--- 1,4 -----
! # @(#) Makefile.usg	2.3	4/18/82
  
  # definitions
  SPOOLDIR = /usr/spool/news
***************
*** 15,21
  IOBJECTS = inews.o ifuncs.o iextern.o control.o $(OBJECTS)
  ROBJECTS = readnews.o rfuncs.o rextern.o readr.o process.o $(OBJECTS)
  EXPOBJS=  expire.o header.o funcs.o getdate.o rextern.o ftime.o
! OTHERS = uurec recnews expire
  COMMANDS = inews readnews checknews $(OTHERS)
  
  # dependencies

--- 15,21 -----
  IOBJECTS = inews.o ifuncs.o iextern.o control.o $(OBJECTS)
  ROBJECTS = readnews.o rfuncs.o rextern.o readr.o process.o $(OBJECTS)
  EXPOBJS=  expire.o header.o funcs.o getdate.o rextern.o ftime.o
! OTHERS = uurec recnews expire sendnews
  COMMANDS = inews readnews checknews $(OTHERS)
  
  # dependencies
***************
*** 37,43
  		sh newsinstall.sh $(SPOOLDIR) $(LIBDIR) $(NEWSUSR) $(NEWSGRP)
  
  clean:
! 	rm -f $(COMMANDS) $(IOBJECTS) $(ROBJECTS)
  	rm -f core index all
  
  vgrind:

--- 37,43 -----
  		sh newsinstall.sh $(SPOOLDIR) $(LIBDIR) $(NEWSUSR) $(NEWSGRP)
  
  clean:
! 	rm -f $(COMMANDS) *.o
  	rm -f core index all
  
  vgrind:
***************
*** 90,95
  	$(CC) $(CFLAGS) -DSPOOLDIR=\"$(SPOOLDIR) -DLIBDIR=\"$(LIBDIR)\
  		-DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" checknews.c process.o -o checknews
  
  
  uurec:  uurec.c
  	$(CC) $(CFLAGS) -s uurec.c -o uurec

--- 90,97 -----
  	$(CC) $(CFLAGS) -DSPOOLDIR=\"$(SPOOLDIR) -DLIBDIR=\"$(LIBDIR)\
  		-DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" checknews.c process.o -o checknews
  
+ control.o:  control.c defs.h
+ 	$(CC) $(CFLAGS) -c control.c
  
  
  uurec:  uurec.c defs.h
***************
*** 91,97
  		-DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" checknews.c process.o -o checknews
  
  
! uurec:  uurec.c
  	$(CC) $(CFLAGS) -s uurec.c -o uurec
  
  recnews:  recnews.c

--- 93,100 -----
  control.o:  control.c defs.h
  	$(CC) $(CFLAGS) -c control.c
  
! 
! uurec:  uurec.c defs.h
  	$(CC) $(CFLAGS) -s uurec.c -o uurec
  
  recnews:  recnews.c defs.h
***************
*** 94,100
  uurec:  uurec.c
  	$(CC) $(CFLAGS) -s uurec.c -o uurec
  
! recnews:  recnews.c
  	$(CC) $(CFLAGS) -s recnews.c -o recnews
  
  sendnews:  sendnews.c uname.o

--- 97,103 -----
  uurec:  uurec.c defs.h
  	$(CC) $(CFLAGS) -s uurec.c -o uurec
  
! recnews:  recnews.c defs.h
  	$(CC) $(CFLAGS) -s recnews.c -o recnews
  
  sendnews:  sendnews.c uname.o
diff -c -r /ra/csr/glickman/news/dist/src/Makefile.v7 news/src/Makefile.v7
*** /ra/csr/glickman/news/dist/src/Makefile.v7	Thu Feb 25 18:06:46 1982
--- news/src/Makefile.v7	Sun Apr 18 18:01:57 1982
***************
*** 1,4
! # @(#) Makefile.v7	2.2	2/25/82
  
  # definitions
  SPOOLDIR = /usr/spool/news

--- 1,4 -----
! # @(#) Makefile.v7	2.3	4/18/82
  
  # definitions
  SPOOLDIR = /usr/spool/news
***************
*** 36,42
  		sh newsinstall.sh $(SPOOLDIR) $(LIBDIR) $(NEWSUSR) $(NEWSGRP)
  
  clean:
! 	rm -f $(COMMANDS) $(IOBJECTS) $(ROBJECTS)
  	rm -f core index
  
  vgrind:

--- 36,42 -----
  		sh newsinstall.sh $(SPOOLDIR) $(LIBDIR) $(NEWSUSR) $(NEWSGRP)
  
  clean:
! 	rm -f $(COMMANDS) *.o
  	rm -f core index
  
  vgrind:
***************
*** 89,94
  	$(CC) $(CFLAGS) -DSPOOLDIR=\"$(SPOOLDIR) -DLIBDIR=\"$(LIBDIR)\
  		-DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" -c checknews.c
  
  
  uurec:  uurec.c
  	$(CC) $(CFLAGS) -s uurec.c -o uurec

--- 89,96 -----
  	$(CC) $(CFLAGS) -DSPOOLDIR=\"$(SPOOLDIR) -DLIBDIR=\"$(LIBDIR)\
  		-DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" -c checknews.c
  
+ control.o:  control.c defs.h
+ 	$(CC) $(CFLAGS) -c control.c
  
  uname.o:  uname.c defs.h
  	$(CC) $(CFLAGS) -c uname.c
***************
*** 90,96
  		-DNEWSUSR=\"$(NEWSUSR)\" -DNEWSGRP=\"$(NEWSGRP)\" -c checknews.c
  
  
! uurec:  uurec.c
  	$(CC) $(CFLAGS) -s uurec.c -o uurec
  
  recnews:  recnews.c

--- 92,102 -----
  control.o:  control.c defs.h
  	$(CC) $(CFLAGS) -c control.c
  
! uname.o:  uname.c defs.h
! 	$(CC) $(CFLAGS) -c uname.c
! 
! 
! uurec:  uurec.c defs.h
  	$(CC) $(CFLAGS) -s uurec.c -o uurec
  
  recnews:  recnews.c defs.h
***************
*** 93,99
  uurec:  uurec.c
  	$(CC) $(CFLAGS) -s uurec.c -o uurec
  
! recnews:  recnews.c
  	$(CC) $(CFLAGS) -s recnews.c -o recnews
  
  sendnews:  sendnews.o uname.o

--- 99,105 -----
  uurec:  uurec.c defs.h
  	$(CC) $(CFLAGS) -s uurec.c -o uurec
  
! recnews:  recnews.c defs.h
  	$(CC) $(CFLAGS) -s recnews.c -o recnews
  
  sendnews:  sendnews.o uname.o
Only in news/src: SCCS
Only in news/src: berknews.c
diff -c -r /ra/csr/glickman/news/dist/src/checknews.c news/src/checknews.c
*** /ra/csr/glickman/news/dist/src/checknews.c	Thu Mar 18 15:51:15 1982
--- news/src/checknews.c	Sun Apr  4 20:33:36 1982
***************
*** 2,8
   * checknews - news checking program
   */
  
! static char *SccsId = "@(#) checknews.c	2.5	3/18/82";
  
  #include <stdio.h>
  #include <sys/types.h>

--- 2,8 -----
   * checknews - news checking program
   */
  
! static char *SccsId = "@(#) checknews.c	2.7	4/4/82";
  
  #include <stdio.h>
  #include <sys/types.h>
***************
*** 57,63
  char	*ACTIVE = LIBDIR/active";	/* active newsgroups file	*/
  char	*NEWSU = NEWSUSR;		/* login name for netnews	*/
  char	*NEWSG = NEWSGRP;		/* group name for netnews	*/
! int	line = -1, y, e, n;
  int	verbose;			/* For debugging.		*/
  FILE	*rcfp,*actfp;
  char	newsrc[BUFLEN],*rcline[LINES],rcbuf[BUFSIZ],*argvrc[LINES];

--- 57,63 -----
  char	*ACTIVE = LIBDIR/active";	/* active newsgroups file	*/
  char	*NEWSU = NEWSUSR;		/* login name for netnews	*/
  char	*NEWSG = NEWSGRP;		/* group name for netnews	*/
! int	line = -1, y, e, n, q;
  int	verbose;			/* For debugging.		*/
  FILE	*rcfp,*actfp;
  char	newsrc[BUFLEN],*rcline[LINES],rcbuf[LBUFLEN],*argvrc[LINES];
***************
*** 60,66
  int	line = -1, y, e, n;
  int	verbose;			/* For debugging.		*/
  FILE	*rcfp,*actfp;
! char	newsrc[BUFLEN],*rcline[LINES],rcbuf[BUFSIZ],*argvrc[LINES];
  struct stat statbuf;
  struct passwd *getpwuid();
  char	*malloc(),*getenv();

--- 60,66 -----
  int	line = -1, y, e, n, q;
  int	verbose;			/* For debugging.		*/
  FILE	*rcfp,*actfp;
! char	newsrc[BUFLEN],*rcline[LINES],rcbuf[LBUFLEN],*argvrc[LINES];
  struct stat statbuf;
  struct passwd *getpwuid();
  char	*malloc(),*getenv();
***************
*** 85,90
  	y = 0;
  	n = 0;
  	e = 0;
  	if (--argc > 0) {
  		for (argv++; **argv; ++*argv) {
  			switch(**argv) {

--- 85,91 -----
  	y = 0;
  	n = 0;
  	e = 0;
+ 	q = 0;
  	if (--argc > 0) {
  		for (argv++; **argv; ++*argv) {
  			switch(**argv) {
***************
*** 89,95
  		for (argv++; **argv; ++*argv) {
  			switch(**argv) {
  			case 'y':
- 			case 'q':
  				y++;
  				break;
  			case 'v':

--- 90,95 -----
  		for (argv++; **argv; ++*argv) {
  			switch(**argv) {
  			case 'y':
  				y++;
  				break;
  			case 'q':
***************
*** 92,97
  			case 'q':
  				y++;
  				break;
  			case 'v':
  				verbose++;
  				break;

--- 92,100 -----
  			case 'y':
  				y++;
  				break;
+ 			case 'q':
+ 				q++;
+ 				break;
  			case 'v':
  				verbose++;
  				break;
***************
*** 105,111
  			}
  		}
  	}
! 	if (!n && !e && !y)
  		y++;
  
  #ifndef V6

--- 108,114 -----
  			}
  		}
  	}
! 	if (!n && !e && !y && !q)
  		y++;
  
  #ifndef V6
***************
*** 322,328
  #endif
  		fprintf(stderr, "Cannot exec readnews.\n");
  	}
! 	exit(0);
  }
  
  xerror(message)

--- 325,334 -----
  #endif
  		fprintf(stderr, "Cannot exec readnews.\n");
  	}
! 	if (q)
! 		exit(1);
! 	else
! 		exit(0);
  }
  
  xerror(message)
diff -c -r /ra/csr/glickman/news/dist/src/control.c news/src/control.c
*** /ra/csr/glickman/news/dist/src/control.c	Thu Mar 18 15:51:20 1982
--- news/src/control.c	Sun Apr 18 18:02:01 1982
***************
*** 3,9
   * acted on by netnews itself rather than by people.
   */
  
! static char *SccsId = "@(#) control.c	2.3	3/18/82";
  
  #include "iparams.h"
  

--- 3,9 -----
   * acted on by netnews itself rather than by people.
   */
  
! static char *SccsId = "@(#) control.c	2.6	4/18/82";
  
  #include "iparams.h"
  
***************
*** 18,23
  control(h)
  struct hbuf *h;
  {
  	int i;
  
  	log("Ctl Msg %s from %s: %s", h->nbuf, h->path, h->title);

--- 18,24 -----
  control(h)
  struct hbuf *h;
  {
+ 	register char *ctlmsgtext;
  	int i;
  
  	if (*h->ctlmsg)
***************
*** 20,27
  {
  	int i;
  
! 	log("Ctl Msg %s from %s: %s", h->nbuf, h->path, h->title);
! 
  	/*
  	 * Control messages have the standard format
  	 *	command [args]

--- 21,31 -----
  	register char *ctlmsgtext;
  	int i;
  
! 	if (*h->ctlmsg)
! 		ctlmsgtext = h->ctlmsg;
! 	else
! 		ctlmsgtext = h->title;
! 	log("Ctl Msg %s from %s: %s", h->nbuf, h->path, ctlmsgtext);
  	/*
  	 * Control messages have the standard format
  	 *	command [args]
***************
*** 31,37
  	 * code, ifdeffed or otherwise parameterized, to simplify
  	 * the maintenence issues.
  	 */
! 	argparse(h->title);
  	
  	if (eq("ihave"))
  		c_ihave(cargc, cargv);

--- 35,41 -----
  	 * code, ifdeffed or otherwise parameterized, to simplify
  	 * the maintenence issues.
  	 */
! 	argparse(ctlmsgtext);
  	
  	if (eq("ihave"))
  		c_ihave(cargc, cargv);
***************
*** 48,54
  	else if (eq("senduuname"))
  		c_senduuname(cargc, cargv);
  	else
! 		c_unknown(h);
  }
  
  /*

--- 52,58 -----
  	else if (eq("senduuname"))
  		c_senduuname(cargc, cargv);
  	else
! 		c_unknown(h, ctlmsgtext);
  }
  
  /*
***************
*** 209,214
  
  	groupname = argv[1];
  	verifyname(groupname);
  	sprintf(groupdir, "%s/%s", SPOOL, groupname);
  	if (access(groupdir, 0)) {
  		/*

--- 213,220 -----
  
  	groupname = argv[1];
  	verifyname(groupname);
+ 	if (groupname[0] == '.')
+ 		xerror("Illegal group name in rmgroup");
  	sprintf(groupdir, "%s/%s", SPOOL, groupname);
  	if (access(groupdir, 0)) {
  		/*
***************
*** 220,225
  		return;
  	}
  
  	/* We let the shell do all the work.  See the rmgrp shell script. */
  	setuid(geteuid());	/* otherwise it won't rmdir the dir */
  	sprintf(bfr, "rm -rf %s", groupdir);

--- 226,232 -----
  		return;
  	}
  
+ #ifndef MANUALLY
  	/* We let the shell do all the work.  See the rmgrp shell script. */
  	setuid(geteuid());	/* otherwise it won't rmdir the dir */
  	sprintf(bfr, "rm -rf %s", groupdir);
***************
*** 227,232
  	sprintf(bfr, "cp %s/active /tmp/$$ ; sed '/^%s$/d' </tmp/$$ > %s/active ; rm /tmp/$$",
  		LIB, groupname, LIB);
  	rc = system(bfr); log("system(%s) status %d", bfr, rc);
  }
  
  /*

--- 234,240 -----
  	sprintf(bfr, "cp %s/active /tmp/$$ ; sed '/^%s$/d' </tmp/$$ > %s/active ; rm /tmp/$$",
  		LIB, groupname, LIB);
  	rc = system(bfr); log("system(%s) status %d", bfr, rc);
+ #endif
  }
  
  /*
***************
*** 241,246
  	register FILE *fp;
  	char whatsisname[150];
  	char msgbuf[256];
  
  	strcpy(whatsisname, header.path);
  	line = findhist(argv[1]);

--- 249,256 -----
  	register FILE *fp;
  	char whatsisname[150];
  	char msgbuf[256];
+ 	char msgng[64];
+ 	int su = 0;
  
  	strcpy(whatsisname, header.path);
  	strcpy(msgng, header.nbuf);
***************
*** 243,248
  	char msgbuf[256];
  
  	strcpy(whatsisname, header.path);
  	line = findhist(argv[1]);
  	if (line)
  		log("Cancelling %s", line);

--- 253,259 -----
  	int su = 0;
  
  	strcpy(whatsisname, header.path);
+ 	strcpy(msgng, header.nbuf);
  	line = findhist(argv[1]);
  	if (line)
  		log("Cancelling %s", line);
***************
*** 261,266
  		if (hread(&header, fp) == NULL)
  			xerror("Article is garbled.\n");
  		fclose(fp);
  		r = rindex(header.path, '!');
  		if (r == 0)
  			r = header.path;

--- 272,279 -----
  		if (hread(&header, fp) == NULL)
  			xerror("Article is garbled.\n");
  		fclose(fp);
+ 		if((uid==ROOTID||uid==0) && strncmp(msgng,"to.",3) == 0)
+ 			su = 1;
  		r = rindex(header.path, '!');
  		if (r == 0) {
  			r = header.path;
***************
*** 262,268
  			xerror("Article is garbled.\n");
  		fclose(fp);
  		r = rindex(header.path, '!');
! 		if (r == 0)
  			r = header.path;
  		else {
  			while (r > header.path && *--r != '!')

--- 275,281 -----
  		if((uid==ROOTID||uid==0) && strncmp(msgng,"to.",3) == 0)
  			su = 1;
  		r = rindex(header.path, '!');
! 		if (r == 0) {
  			r = header.path;
  		}
  		else {
***************
*** 264,269
  		r = rindex(header.path, '!');
  		if (r == 0)
  			r = header.path;
  		else {
  			while (r > header.path && *--r != '!')
  				;

--- 277,283 -----
  		r = rindex(header.path, '!');
  		if (r == 0) {
  			r = header.path;
+ 		}
  		else {
  			while (r > header.path && *--r != '!')
  				;
***************
*** 279,285
  			if (s > whatsisname)
  				s++;
  		}
! 		if (strcmp(r, s)) {
  			sprintf(msgbuf, "Not contributor: %s and %s", header.path, whatsisname);
  			xerror(msgbuf);
  		}

--- 293,299 -----
  			if (s > whatsisname)
  				s++;
  		}
! 		if (!su && strcmp(r, s)) {
  			sprintf(msgbuf, "Not contributor: %s and %s", header.path, whatsisname);
  			xerror(msgbuf);
  		}
***************
*** 315,321
  	int c;
  
  #ifdef NOTIFY
! 	f = mailhdr(NOTIFY, "sendsys cotrol message");
  	fprintf(f, "\n%s requested your sys file.\n", header.path);
  	mclose(f);
  #endif

--- 329,335 -----
  	int c;
  
  #ifdef NOTIFY
! 	f = mailhdr(NOTIFY, "sendsys control message");
  	fprintf(f, "\n%s requested your sys file.\n", header.path);
  	mclose(f);
  #endif
***************
*** 320,326
  	mclose(f);
  #endif
  	f = mopen(header.path);
! 	fprintf(f, "Subject: response to your senduuname request\n\n");
  	u = fopen(SUBFILE, "r");
  	while ((c=getc(u)) != EOF)
  		putc(c, f);

--- 334,340 -----
  	mclose(f);
  #endif
  	f = mopen(header.path);
! 	fprintf(f, "Subject: response to your sendsys request\n\n");
  	u = fopen(SUBFILE, "r");
  	while ((c=getc(u)) != EOF)
  		putc(c, f);
***************
*** 376,382
  /*
   * An unknown control message has been received.
   */
! c_unknown(h)
  struct hbuf *h;
  {
  	FILE *f;

--- 390,396 -----
  /*
   * An unknown control message has been received.
   */
! c_unknown(h, ctlmsgtext)
  struct hbuf *h;
  char *ctlmsgtext;
  {
***************
*** 378,383
   */
  c_unknown(h)
  struct hbuf *h;
  {
  	FILE *f;
  

--- 392,398 -----
   */
  c_unknown(h, ctlmsgtext)
  struct hbuf *h;
+ char *ctlmsgtext;
  {
  	FILE *f;
  
***************
*** 381,387
  {
  	FILE *f;
  
! 	log("UNKNOWN Ctl Msg %s from %s", h->title, h->path);
  	f = mailhdr(h->path, "Unrecognized Control Message");
  	if (f == NULL)
  		xerror("Cannot send back error message");

--- 396,402 -----
  {
  	FILE *f;
  
! 	log("UNKNOWN Ctl Msg %s from %s", ctlmsgtext, h->path);
  	f = mailhdr(h->path, "Unrecognized Control Message");
  	if (f == NULL)
  		xerror("Cannot send back error message");
diff -c -r /ra/csr/glickman/news/dist/src/defs.h news/src/defs.h
*** /ra/csr/glickman/news/dist/src/defs.h	Thu Mar 18 15:51:22 1982
--- news/src/defs.h	Sun Apr 18 18:02:04 1982
***************
*** 5,10
   * put back in by someone else.
   *
   * If TMAIL is undefined, the -M option will be disabled.
   */
  
  static char *Defs = "@(#) defs.h	2.4	3/18/82";

--- 5,13 -----
   * put back in by someone else.
   *
   * If TMAIL is undefined, the -M option will be disabled.
+  *
+  * By convention, the version of the software you are running is taken
+  * to be the version of control.c.
   */
  
  static char *Defs = "@(#) defs.h	2.6	4/18/82";
***************
*** 7,13
   * If TMAIL is undefined, the -M option will be disabled.
   */
  
! static char *Defs = "@(#) defs.h	2.4	3/18/82";
  
  #define DAYS	(60L*60L*24L)
  #define WEEKS	(7*DAYS)

--- 10,16 -----
   * to be the version of control.c.
   */
  
! static char *Defs = "@(#) defs.h	2.6	4/18/82";
  
  #define DAYS	(60L*60L*24L)
  #define WEEKS	(7*DAYS)
***************
*** 24,29
  #define NOTIFY	"usenet"	/* Tell him about certain ctl messages	*/
  #define UUXZ			/* insert if your uux supports -z	*/
  /* #define UUNAME "euuname"	/* omit for uuname, put in LIBDIR	*/
  
  /* Things you might want to change */
  #define	ROOTID	0	/* uid of person allowed to cancel anything	*/

--- 27,34 -----
  #define NOTIFY	"usenet"	/* Tell him about certain ctl messages	*/
  #define UUXZ			/* insert if your uux supports -z	*/
  /* #define UUNAME "euuname"	/* omit for uuname, put in LIBDIR	*/
+ /* #define MANUALLY		/* Don't execute rmgroups, just notify.	*/
+ /* #define BERKNAME "ARPAVAX"	/* name of local host on Berknet	*/
  
  /* Things you might want to change */
  #define	ROOTID	0	/* uid of person allowed to cancel anything	*/
diff -c -r /ra/csr/glickman/news/dist/src/expire.c news/src/expire.c
*** /ra/csr/glickman/news/dist/src/expire.c	Thu Mar 18 15:51:24 1982
--- news/src/expire.c	Tue Apr 20 10:36:27 1982
***************
*** 3,9
   *		 have expired.
   */
  
! static char *SccsId = "@(#) expire.c	2.3	3/18/82";
  
  #include <stdio.h>
  #include <ctype.h>

--- 3,9 -----
   *		 have expired.
   */
  
! static char *SccsId = "@(#) expire.c	2.8	4/20/82";
  
  #include "params.h"
  
***************
*** 5,16
  
  static char *SccsId = "@(#) expire.c	2.3	3/18/82";
  
! #include <stdio.h>
! #include <ctype.h>
! #include <sys/types.h>
! #include <sys/stat.h>
! #include "defs.h"
! #include "header.h"
  
  char	bfr[BUFLEN], SYSNAME[SNLN], groupdir[BUFSIZ], rcbuf[BUFLEN];
  extern char	*ACTIVE;

--- 5,11 -----
  
  static char *SccsId = "@(#) expire.c	2.8	4/20/82";
  
! #include "params.h"
  
  extern char	groupdir[BUFSIZ], rcbuf[BUFLEN];
  extern char	*ACTIVE;
***************
*** 12,18
  #include "defs.h"
  #include "header.h"
  
! char	bfr[BUFLEN], SYSNAME[SNLN], groupdir[BUFSIZ], rcbuf[BUFLEN];
  extern char	*ACTIVE;
  extern char	*SPOOL;
  extern char	*CAND;

--- 7,13 -----
  
  #include "params.h"
  
! extern char	groupdir[BUFSIZ], rcbuf[BUFLEN];
  extern char	*ACTIVE;
  extern char	*SPOOL;
  extern char	*CAND;
***************
*** 16,22
  extern char	*ACTIVE;
  extern char	*SPOOL;
  extern char	*CAND;
! int verbose = 0;
  
  main(argc, argv)
  int argc;

--- 11,23 -----
  extern char	*ACTIVE;
  extern char	*SPOOL;
  extern char	*CAND;
! char	ARTFILE[BUFSIZ], NARTFILE[BUFSIZ], OARTFILE[BUFSIZ];
! char	filename[BUFSIZ];
! char	*OLDNEWS = "/usr/spool/oldnews";
! int	verbose = 0;
! int	ignorexp = 0;
! long	expincr;
! long	atol();
  
  main(argc, argv)
  int argc;
***************
*** 27,34
  	register char *ptr;
  	struct hbuf h;
  	struct stat statbuf;
! 	register time_t now;
! 	char	newname[BUFLEN];
  	char ngpat[LBUFLEN];
  
  	ngpat[0] = '\0';

--- 28,34 -----
  	register char *ptr;
  	struct hbuf h;
  	struct stat statbuf;
! 	register time_t now, newtime;
  	char ngpat[LBUFLEN];
  	char afline[BUFLEN];
  	char *p1, *p2;
***************
*** 30,35
  	register time_t now;
  	char	newname[BUFLEN];
  	char ngpat[LBUFLEN];
  
  	ngpat[0] = '\0';
  	while (argc > 1) {

--- 30,38 -----
  	struct stat statbuf;
  	register time_t now, newtime;
  	char ngpat[LBUFLEN];
+ 	char afline[BUFLEN];
+ 	char *p1, *p2;
+ 	FILE *ohfd, *nhfd;
  
  	expincr = DFLTEXP;
  	ngpat[0] = '\0';
***************
*** 31,36
  	char	newname[BUFLEN];
  	char ngpat[LBUFLEN];
  
  	ngpat[0] = '\0';
  	while (argc > 1) {
  		switch (argv[1][1]) {

--- 34,40 -----
  	char *p1, *p2;
  	FILE *ohfd, *nhfd;
  
+ 	expincr = DFLTEXP;
  	ngpat[0] = '\0';
  	while (argc > 1) {
  		switch (argv[1][1]) {
***************
*** 40,45
  			else
  				verbose = 1;
  			break;
  		case 'n':
  			if (argc > 2) {
  				argv++;

--- 44,62 -----
  			else
  				verbose = 1;
  			break;
+ 		case 'e':	/* Use this as default expiration time */
+ 			if (argc > 2 && argv[2][0] != '-') {
+ 				argv++;
+ 				argc--;
+ 				expincr = atol(argv[1]) * DAYS;
+ 			}
+ 			break;
+ 		case 'I':	/* Ignore any existing expiration date */
+ 			ignorexp = 2;
+ 			break;
+ 		case 'i':	/* Ignore any existing expiration date */
+ 			ignorexp = 1;
+ 			break;
  		case 'n':
  			if (argc > 2) {
  				argv++;
***************
*** 55,61
  			}
  			break;
  		default:
! 			fprintf(stderr, "Usage: expire [-v] [-n newsgroups]\n");
  			exit(1);
  		}
  		argc--; argv++;

--- 72,78 -----
  			}
  			break;
  		default:
! 			printf("Usage: expire [ -v [level] ] [-e days ] [-i] [-n newsgroups]\n");
  			exit(1);
  		}
  		argc--; argv++;
***************
*** 63,75
  	if (ngpat[0] == 0)
  		strcpy(ngpat, "all,");
  	now = time(0);
! 	if ((actfp = fopen(ACTIVE, "r")) == NULL) {
! 		fprintf(stderr, "expire:  Cannot open ACTIVE file.\n");
! 		exit(1);
! 	}
! 	while (fgets(groupdir, BUFLEN, actfp) != NULL) {
! 		if (!nstrip(groupdir))
! 			xerror("Active newsgroups file line too long");
  		ngcat(groupdir);
  		if (!ngmatch(groupdir, ngpat))
  			continue;

--- 80,114 -----
  	if (ngpat[0] == 0)
  		strcpy(ngpat, "all,");
  	now = time(0);
! 	newtime = now + expincr;
! 	if (chdir(SPOOL))
! 		xerror("Cannot chdir %s", SPOOL);
! 
! 	sprintf(OARTFILE, "%s/%s", LIB, "ohistory");
! 	sprintf(ARTFILE, "%s/%s", LIB, "history");
! 	ohfd = xfopen(ARTFILE, "r");
! 	sprintf(NARTFILE, "%s/%s", LIB, "nhistory");
! 	nhfd = xfopen(NARTFILE, "w");
! 
! 	while (fgets(afline, BUFLEN, ohfd) != NULL) {
! 		if (verbose > 1)
! 			printf("article: %s", afline);
! 		p1 = index(afline, '\t');
! 		if (p1)
! 			p2 = index(p1+1, '\t');
! 		else
! 			continue;
! 		if (!p2)
! 			continue;
! 		p2++;
! 		strcpy(groupdir, p2);
! 		p1 = index(groupdir, '/');
! 		if (p1)
! 			*p1 = 0;
! 		else
! 			continue;
! 		if (verbose > 1)
! 			printf("newsgroup %s\n", groupdir);
  		ngcat(groupdir);
  		if (!ngmatch(groupdir, ngpat)) {
  			fputs(afline, nhfd);
***************
*** 71,77
  		if (!nstrip(groupdir))
  			xerror("Active newsgroups file line too long");
  		ngcat(groupdir);
! 		if (!ngmatch(groupdir, ngpat))
  			continue;
  		ngdel(groupdir);
  		if (verbose > 1)

--- 110,117 -----
  		if (verbose > 1)
  			printf("newsgroup %s\n", groupdir);
  		ngcat(groupdir);
! 		if (!ngmatch(groupdir, ngpat)) {
! 			fputs(afline, nhfd);
  			continue;
  		}
  		ngdel(groupdir);
***************
*** 73,78
  		ngcat(groupdir);
  		if (!ngmatch(groupdir, ngpat))
  			continue;
  		ngdel(groupdir);
  		if (verbose > 1)
  			fprintf(stderr, "newsgroup %s\n", groupdir);

--- 113,119 -----
  		if (!ngmatch(groupdir, ngpat)) {
  			fputs(afline, nhfd);
  			continue;
+ 		}
  		ngdel(groupdir);
  		strcpy(filename, p2);
  		p1 = index(filename, ' ');
***************
*** 74,86
  		if (!ngmatch(groupdir, ngpat))
  			continue;
  		ngdel(groupdir);
! 		if (verbose > 1)
! 			fprintf(stderr, "newsgroup %s\n", groupdir);
! 		for (ptr = groupdir; *ptr; ptr++)
! 			if (isspace(*ptr))
! 				*ptr = '\0';
! 		sprintf(rcbuf, "%s/.%s", SPOOL, groupdir);
! 		if (stat(rcbuf, &statbuf) == -1)
  			continue;
  		for (i = 1; i <= statbuf.st_size; i++) {
  			sprintf(rcbuf, "%s/%s/%d", SPOOL, groupdir, i);

--- 115,129 -----
  			continue;
  		}
  		ngdel(groupdir);
! 		strcpy(filename, p2);
! 		p1 = index(filename, ' ');
! 		if (p1 == 0)
! 			p1 = index(filename, '\n');
! 		if (p1)
! 			*p1 = 0;
! 		if (access(filename, 4) || (fp = fopen(filename, "r")) == NULL) {
! 			if (verbose > 3)
! 				printf("Can't open %s.\n", filename);
  			continue;
  		}
  		if (hread(&h, fp) == NULL) {
***************
*** 82,106
  		sprintf(rcbuf, "%s/.%s", SPOOL, groupdir);
  		if (stat(rcbuf, &statbuf) == -1)
  			continue;
! 		for (i = 1; i <= statbuf.st_size; i++) {
! 			sprintf(rcbuf, "%s/%s/%d", SPOOL, groupdir, i);
! 			if (access(rcbuf, 4) || (fp = fopen(rcbuf, "r")) == NULL) {
! 				if (verbose > 3)
! 					fprintf(stderr, "Can't open %s.\n", rcbuf);
! 				continue;
! 			}
! 			if (hread(&h, fp) == NULL) {
! 				if (verbose)
! 					fprintf(stderr, "Garbled article %s.\n", rcbuf);
! 				fclose(fp);
! 				continue;
! 			}
! 			if (h.expdate[0])
! 				h.exptime = cgtdate(h.expdate);
! 			else
! 				h.exptime = cgtdate(h.recdate) + DFLTEXP;
! 			if (now >= h.exptime) {
! 				sprintf(newname, "%s/%s", CAND, h.ident);
  #ifdef DEBUG
  				fprintf(stderr, "link %s to %s\ncancel %s\n", newname, rcbuf, rcbuf);
  #else

--- 125,142 -----
  			if (verbose > 3)
  				printf("Can't open %s.\n", filename);
  			continue;
! 		}
! 		if (hread(&h, fp) == NULL) {
! 			if (verbose)
! 				printf("Garbled article %s.\n", filename);
! 			fclose(fp);
! 			continue;
! 		}
! 		h.exptime = cgtdate(h.expdate);
! 		if (!h.expdate[0] || ignorexp==2 ||
! 		    (ignorexp==1 && newtime < h.exptime))
! 			h.exptime = newtime;
! 		if (now >= h.exptime) {
  #ifdef DEBUG
  			printf("cancel %s\n", filename);
  #else
***************
*** 102,108
  			if (now >= h.exptime) {
  				sprintf(newname, "%s/%s", CAND, h.ident);
  #ifdef DEBUG
! 				fprintf(stderr, "link %s to %s\ncancel %s\n", newname, rcbuf, rcbuf);
  #else
  				if (verbose)
  					printf("cancel %s\n", rcbuf);

--- 138,144 -----
  			h.exptime = newtime;
  		if (now >= h.exptime) {
  #ifdef DEBUG
! 			printf("cancel %s\n", filename);
  #else
  			if (verbose)
  				printf("cancel %s\n", filename);
***************
*** 104,113
  #ifdef DEBUG
  				fprintf(stderr, "link %s to %s\ncancel %s\n", newname, rcbuf, rcbuf);
  #else
! 				if (verbose)
! 					printf("cancel %s\n", rcbuf);
! 				link(rcbuf, newname);
! 				unlink(rcbuf);
  #endif
  			}
  			else

--- 140,148 -----
  #ifdef DEBUG
  			printf("cancel %s\n", filename);
  #else
! 			if (verbose)
! 				printf("cancel %s\n", filename);
! 			ulall(p2);
  #endif
  		}
  		else {
***************
*** 109,119
  				link(rcbuf, newname);
  				unlink(rcbuf);
  #endif
- 			}
- 			else
- 				if (verbose > 2)
- 					fprintf(stderr, "Good article %s\n", rcbuf);
- 			fclose(fp);
  		}
  	}
  	exit(0);

--- 144,149 -----
  				printf("cancel %s\n", filename);
  			ulall(p2);
  #endif
  		}
  		else {
  			fputs(afline, nhfd);
***************
*** 115,120
  					fprintf(stderr, "Good article %s\n", rcbuf);
  			fclose(fp);
  		}
  	}
  	exit(0);
  }

--- 145,156 -----
  			ulall(p2);
  #endif
  		}
+ 		else {
+ 			fputs(afline, nhfd);
+ 			if (verbose > 2)
+ 				printf("Good article %s\n", rcbuf);
+ 		}
+ 		fclose(fp);
  	}
  	unlink(OARTFILE);
  	link(ARTFILE, OARTFILE);
***************
*** 116,121
  			fclose(fp);
  		}
  	}
  	exit(0);
  }
  

--- 152,162 -----
  		}
  		fclose(fp);
  	}
+ 	unlink(OARTFILE);
+ 	link(ARTFILE, OARTFILE);
+ 	unlink(ARTFILE);
+ 	link(NARTFILE, ARTFILE);
+ 	unlink(NARTFILE);
  	exit(0);
  }
  
***************
*** 119,124
  	exit(0);
  }
  
  xerror(message)
  char *message;
  {

--- 160,204 -----
  	exit(0);
  }
  
+ ulall(artlist)
+ char *artlist;
+ {
+ 	char *p;
+ 	int last = 0;
+ 	char newname[BUFLEN];
+ 
+ 	while (*artlist == ' ' || *artlist == '\n')
+ 		artlist++;
+ 	if (*artlist == 0)
+ 		return;
+ 	p = index(artlist, ' ');
+ 	if (p == 0) {
+ 		last = 1;
+ 		p = index(artlist, '\n');
+ 	}
+ 	if (p == 0) {
+ 		last = 1;
+ 		unlink(artlist);
+ 		return;
+ 	}
+ 	if (p)
+ 		*p = 0;
+ 	if (access(OLDNEWS, 0) == 0) {
+ 		sprintf(newname, "%s/%s", OLDNEWS, artlist);
+ 		printf("link %s to %s\n", newname, filename);
+ 		if (link(artlist, newname) == -1) {
+ 			if (mkdir(groupdir) == 0)
+ 				link(artlist, newname);
+ 		}
+ 	}
+ 
+ 	if (verbose)
+ 		printf("unlink %s\n", artlist);
+ 	unlink(artlist);
+ 	if (!last)
+ 		ulall(p+1);
+ }
+ 
  xerror(message)
  char *message;
  {
***************
*** 122,127
  xerror(message)
  char *message;
  {
  	fflush(stdout);
  	fprintf(stderr, "expire: %s.\n", message);
  	exit(1);

--- 202,208 -----
  xerror(message)
  char *message;
  {
+ 	printf("expire: %s.\n", message);
  	fflush(stdout);
  	exit(1);
  }
***************
*** 123,128
  char *message;
  {
  	fflush(stdout);
- 	fprintf(stderr, "expire: %s.\n", message);
  	exit(1);
  }

--- 204,209 -----
  {
  	printf("expire: %s.\n", message);
  	fflush(stdout);
  	exit(1);
  }
  
***************
*** 125,128
  	fflush(stdout);
  	fprintf(stderr, "expire: %s.\n", message);
  	exit(1);
  }

--- 205,229 -----
  	printf("expire: %s.\n", message);
  	fflush(stdout);
  	exit(1);
+ }
+ 
+ mkdir(groupdir)
+ register char *groupdir;
+ {
+ 	char buf[BUFLEN];
+ 	register struct passwd *pw;
+ 	extern char *NEWSU;
+ 	int rc;
+ 
+ 	if (access(OLDNEWS, 2) < 0)
+ 		return -1;
+ 	sprintf(buf, "mkdir %s/%s", OLDNEWS, groupdir);
+ 	rc = system(buf);
+ 	sprintf(buf, "%s/%s", OLDNEWS, groupdir);
+ 	if (verbose)
+ 		printf("mkdir %s, rc %d\n", buf, rc);
+ 	chmod(buf, 0755);
+ 	if ((pw = getpwnam(NEWSU)) != NULL)
+ 		chown(buf, pw->pw_uid, pw->pw_gid);
+ 	return rc;
  }
diff -c -r /ra/csr/glickman/news/dist/src/ftime.c news/src/ftime.c
*** /ra/csr/glickman/news/dist/src/ftime.c	Sun Mar 14 15:01:13 1982
--- news/src/ftime.c	Mon Mar 22 20:23:08 1982
***************
*** 1,4
! static char *SccsId = "@(#) ftime.c	2.1	2/23/82";
  
  #include <sys/types.h>
  struct timeb

--- 1,4 -----
! static char *SccsId = "@(#) ftime.c	2.2	3/14/82";
  
  #include <sys/types.h>
  struct timeb
diff -c -r /ra/csr/glickman/news/dist/src/funcs.c news/src/funcs.c
*** /ra/csr/glickman/news/dist/src/funcs.c	Sun Mar 14 15:01:16 1982
--- news/src/funcs.c	Sat Apr  3 11:53:24 1982
***************
*** 2,8
   * funcs - functions used by both inews and readnews.
   */
  
! static char *SccsId = "@(#) funcs.c	2.2	2/25/82";
  
  #include "params.h"
  

--- 2,8 -----
   * funcs - functions used by both inews and readnews.
   */
  
! static char *SccsId = "@(#) funcs.c	2.4	4/3/82";
  
  #include "params.h"
  
***************
*** 185,191
   * This version restricts PATH to bin and /usr/bin.
   * Called with fsubr(pshell, s, NULL)
   */
! char	**environ;
  
  /* ARGSUSED */
  pshell(s, dummy)

--- 185,191 -----
   * This version restricts PATH to bin and /usr/bin.
   * Called with fsubr(pshell, s, NULL)
   */
! extern char	**environ;
  
  /* ARGSUSED */
  pshell(s, dummy)
***************
*** 334,341
   * Return the ptr in sp at which the character c last
   * appears; NULL if not found
   */
- 
- #define NULL 0
  
  char *
  rindex(sp, c)

--- 334,339 -----
   * Return the ptr in sp at which the character c last
   * appears; NULL if not found
   */
  
  char *
  rindex(sp, c)
diff -c -r /ra/csr/glickman/news/dist/src/getdate.y news/src/getdate.y
*** /ra/csr/glickman/news/dist/src/getdate.y	Fri Feb 26 19:12:19 1982
--- news/src/getdate.y	Sat Apr  3 11:53:26 1982
***************
*** 3,9
  	/* 	Steven M. Bellovin (unc!smb)			*/
  	/*	Dept. of Computer Science			*/
  	/*	University of North Carolina at Chapel Hill	*/
! 	/*	@(#) getdate.y	2.3	2/26/82	*/
  
  #include <sys/types.h>
  #ifdef USG

--- 3,9 -----
  	/* 	Steven M. Bellovin (unc!smb)			*/
  	/*	Dept. of Computer Science			*/
  	/*	University of North Carolina at Chapel Hill	*/
! 	/*	@(#) getdate.y	2.4	4/3/82	*/
  
  #include <sys/types.h>
  #ifdef USG
diff -c -r /ra/csr/glickman/news/dist/src/header.c news/src/header.c
*** /ra/csr/glickman/news/dist/src/header.c	Thu Mar 18 15:51:26 1982
--- news/src/header.c	Sun Apr 18 18:02:11 1982
***************
*** 2,8
   * header.c - header functions plus some other goodies
   */
  
! static char *SccsId = "@(#) header.c	2.4	3/18/82";
  
  #include <stdio.h>
  #include <sys/types.h>

--- 2,8 -----
   * header.c - header functions plus some other goodies
   */
  
! static char *SccsId = "@(#) header.c	2.6	4/18/82";
  
  #include <stdio.h>
  #include <sys/types.h>
***************
*** 67,72
  #define ARTICLEID	7
  #define REPLYTO		8
  #define FOLLOWID	9
  #define OTHER		99
  
  frmread(fp, hp)

--- 67,73 -----
  #define ARTICLEID	7
  #define REPLYTO		8
  #define FOLLOWID	9
+ #define CONTROL		10
  #define OTHER		99
  
  frmread(fp, hp)
***************
*** 76,81
  	int fromflag = FALSE, groupflag = FALSE, subflag = FALSE;
  	int titleflag = FALSE, fileflag = FALSE, recflag = FALSE, i;
  	int exprflag = FALSE, replyflag = FALSE, followflag = FALSE;
  	long curpos;
  	char wordfrom[100], uname[100], at[100], site[100];
  

--- 77,83 -----
  	int fromflag = FALSE, groupflag = FALSE, subflag = FALSE;
  	int titleflag = FALSE, fileflag = FALSE, recflag = FALSE, i;
  	int exprflag = FALSE, replyflag = FALSE, followflag = FALSE;
+ 	int ctlflag = FALSE;
  	long curpos;
  	char wordfrom[100], uname[100], at[100], site[100];
  
***************
*** 124,129
  			case FOLLOWID:
  				if (!followflag)
  					getfield(&followflag, hp->followid);
  			case OTHER:
  				break;
  		}

--- 126,136 -----
  			case FOLLOWID:
  				if (!followflag)
  					getfield(&followflag, hp->followid);
+ 				break;
+ 			case CONTROL:
+ 				if (!ctlflag)
+ 					getfield(&ctlflag, hp->ctlmsg);
+ 				break;
  			case OTHER:
  				break;
  		}
***************
*** 189,194
  		return REPLYTO;
  	if (!strncmp(ptr, "References: ", 12))
  		return FOLLOWID;
  	return OTHER;
  }
  

--- 196,203 -----
  		return REPLYTO;
  	if (!strncmp(ptr, "References: ", 12))
  		return FOLLOWID;
+ 	if (!strncmp(ptr, "Control: ", 12))
+ 		return CONTROL;
  	return OTHER;
  }
  
***************
*** 199,215
  register struct hbuf *hp;
  register FILE *fp;
  {
! 	ngdel(strcpy(bfr, hp->nbuf));
! 	fprintf(fp, "From: %s!%s\nNewsgroups: %s\n", SYSNAME, hp->path, bfr);
! 	fprintf(fp, "Title: %s\nArticle-I.D.: %s\n", hp->title, hp->ident);
! 	fprintf(fp, "Posted: %s\n", hp->subdate); 
! 	if (strlen(hp->replyto))
! 		fprintf(fp, "Reply-To: %s\n", hp->replyto); 
! 	if (!defexp)
! 		fprintf(fp, "Expires: %s\n", hp->expdate);
! 	if (hp->followid && *hp->followid)
! 		fprintf(fp, "References: %s\n", hp->followid); 
! 	putc('\n', fp);
  }
  
  /*

--- 208,214 -----
  register struct hbuf *hp;
  register FILE *fp;
  {
! 	ihwrite(hp, fp, 0);
  }
  
  /*
***************
*** 216,222
   * Same as above, except include receival date for local usage and
   * an extra \n for looks.
   */
- 
  lhwrite(hp, fp)
  register struct hbuf *hp;
  register FILE *fp;

--- 215,220 -----
   * Same as above, except include receival date for local usage and
   * an extra \n for looks.
   */
  lhwrite(hp, fp)
  register struct hbuf *hp;
  register FILE *fp;
***************
*** 221,226
  register struct hbuf *hp;
  register FILE *fp;
  {
  	ngdel(strcpy(bfr, hp->nbuf));
  	fprintf(fp, "From: %s!%s\nNewsgroups: %s\n", SYSNAME, hp->path, bfr);
  	fprintf(fp, "Title: %s\nArticle-I.D.: %s\n", hp->title, hp->ident);

--- 219,236 -----
  register struct hbuf *hp;
  register FILE *fp;
  {
+ 	ihwrite(hp, fp, 1);
+ }
+ 
+ /*
+  * Write header at 'hp' on stream 'fp' in B format.  Include received date
+  * if wr is 1.  Leave off sysname if wr is 2.
+  */
+ ihwrite(hp, fp, wr)
+ register struct hbuf *hp;
+ register FILE *fp;
+ int wr;
+ {
  	ngdel(strcpy(bfr, hp->nbuf));
  	if (wr == 2)
  		fprintf(fp, "From: %s\nNewsgroups: %s\n", hp->path, bfr);
***************
*** 222,228
  register FILE *fp;
  {
  	ngdel(strcpy(bfr, hp->nbuf));
! 	fprintf(fp, "From: %s!%s\nNewsgroups: %s\n", SYSNAME, hp->path, bfr);
  	fprintf(fp, "Title: %s\nArticle-I.D.: %s\n", hp->title, hp->ident);
  	fprintf(fp, "Posted: %s\nExpires: %s\n", hp->subdate, hp->expdate);
  	if (strlen(hp->replyto))

--- 232,241 -----
  int wr;
  {
  	ngdel(strcpy(bfr, hp->nbuf));
! 	if (wr == 2)
! 		fprintf(fp, "From: %s\nNewsgroups: %s\n", hp->path, bfr);
! 	else
! 		fprintf(fp, "From: %s!%s\nNewsgroups: %s\n", SYSNAME, hp->path, bfr);
  	fprintf(fp, "Title: %s\nArticle-I.D.: %s\n", hp->title, hp->ident);
  	fprintf(fp, "Posted: %s\n", hp->subdate); 
  	if (wr == 1)
***************
*** 224,231
  	ngdel(strcpy(bfr, hp->nbuf));
  	fprintf(fp, "From: %s!%s\nNewsgroups: %s\n", SYSNAME, hp->path, bfr);
  	fprintf(fp, "Title: %s\nArticle-I.D.: %s\n", hp->title, hp->ident);
! 	fprintf(fp, "Posted: %s\nExpires: %s\n", hp->subdate, hp->expdate);
! 	if (strlen(hp->replyto))
  		fprintf(fp, "Reply-To: %s\n", hp->replyto); 
  	fprintf(fp, "Received: %s\n", hp->recdate);
  	if (hp->followid && *hp->followid)

--- 237,248 -----
  	else
  		fprintf(fp, "From: %s!%s\nNewsgroups: %s\n", SYSNAME, hp->path, bfr);
  	fprintf(fp, "Title: %s\nArticle-I.D.: %s\n", hp->title, hp->ident);
! 	fprintf(fp, "Posted: %s\n", hp->subdate); 
! 	if (wr == 1)
! 		fprintf(fp, "Received: %s\n", hp->recdate);
! 	if (*hp->expdate)
! 		fprintf(fp, "Expires: %s\n", hp->expdate);
! 	if (*hp->replyto)
  		fprintf(fp, "Reply-To: %s\n", hp->replyto); 
  	if (*hp->followid)
  		fprintf(fp, "References: %s\n", hp->followid); 
***************
*** 227,234
  	fprintf(fp, "Posted: %s\nExpires: %s\n", hp->subdate, hp->expdate);
  	if (strlen(hp->replyto))
  		fprintf(fp, "Reply-To: %s\n", hp->replyto); 
! 	fprintf(fp, "Received: %s\n", hp->recdate);
! 	if (hp->followid && *hp->followid)
  		fprintf(fp, "References: %s\n", hp->followid); 
  	putc('\n', fp);
  }

--- 244,250 -----
  		fprintf(fp, "Expires: %s\n", hp->expdate);
  	if (*hp->replyto)
  		fprintf(fp, "Reply-To: %s\n", hp->replyto); 
! 	if (*hp->followid)
  		fprintf(fp, "References: %s\n", hp->followid); 
  	if (*hp->ctlmsg)
  		fprintf(fp, "Control: %s\n", hp->ctlmsg);
***************
*** 230,235
  	fprintf(fp, "Received: %s\n", hp->recdate);
  	if (hp->followid && *hp->followid)
  		fprintf(fp, "References: %s\n", hp->followid); 
  	putc('\n', fp);
  }
  

--- 246,253 -----
  		fprintf(fp, "Reply-To: %s\n", hp->replyto); 
  	if (*hp->followid)
  		fprintf(fp, "References: %s\n", hp->followid); 
+ 	if (*hp->ctlmsg)
+ 		fprintf(fp, "Control: %s\n", hp->ctlmsg);
  	putc('\n', fp);
  }
  
diff -c -r /ra/csr/glickman/news/dist/src/header.h news/src/header.h
*** /ra/csr/glickman/news/dist/src/header.h	Sun Mar 14 15:01:19 1982
--- news/src/header.h	Sun Apr 18 18:02:13 1982
***************
*** 2,8
   * header.h - Article header format
   */
  
! static char *Header = "@(#) header.h	2.1	2/23/82";
  
  /* article header */
  struct	hbuf {

--- 2,8 -----
   * header.h - Article header format
   */
  
! static char *Header = "@(#) header.h	2.4	4/18/82";
  
  /* article header */
  struct	hbuf {
***************
*** 18,21
  	time_t	rectime;		/* recdate in secs	*/
  	char	expdate[DATELEN];	/* expiration date	*/
  	time_t	exptime;		/* expdate in secs	*/
  };

--- 18,22 -----
  	time_t	rectime;		/* recdate in secs	*/
  	char	expdate[DATELEN];	/* expiration date	*/
  	time_t	exptime;		/* expdate in secs	*/
+ 	char	ctlmsg[PATHLEN];	/* control message	*/
  };
diff -c -r /ra/csr/glickman/news/dist/src/help news/src/help
*** /ra/csr/glickman/news/dist/src/help	Tue Feb 23 20:15:31 1982
--- news/src/help	Tue Mar 30 18:47:34 1982
***************
*** 9,14
  f [title]	Submit a follow up article.
  N [newsgroup]	Go to next newsgroup or named newsgroup.
  s [file]	Save.  Article is appended to file (default, Articles).
  #		Report last article no. in newsgroup.
  e		Erase.  Forget that an article was read.
  h		Print verbose header.

--- 9,15 -----
  f [title]	Submit a follow up article.
  N [newsgroup]	Go to next newsgroup or named newsgroup.
  s [file]	Save.  Article is appended to file (default, Articles).
+ s |program	Run program with article as standard input.
  #		Report last article no. in newsgroup.
  e		Erase.  Forget that an article was read.
  h		Print verbose header.
diff -c -r /ra/csr/glickman/news/dist/src/ifuncs.c news/src/ifuncs.c
*** /ra/csr/glickman/news/dist/src/ifuncs.c	Thu Mar 18 15:51:31 1982
--- news/src/ifuncs.c	Mon Apr 19 19:50:09 1982
***************
*** 2,8
   * ifuncs - functions used by inews.
   */
  
! static char *SccsId = "@(#) ifuncs.c	2.3	3/18/82";
  
  #include "iparams.h"
  

--- 2,8 -----
   * ifuncs - functions used by inews.
   */
  
! static char *SccsId = "@(#) ifuncs.c	2.7	4/19/82";
  
  #include "iparams.h"
  
***************
*** 61,66
  {
  	register FILE *ofp;
  	register int c;
  	struct hbuf h;
  	char TRANS[BUFLEN];
  	/* afmt: the other machine runs an A news, so we xmit in A format */

--- 61,67 -----
  {
  	register FILE *ofp;
  	register int c;
+ 	register char *ptr;
  	struct hbuf h;
  	char TRANS[BUFLEN];
  	char *argv[20];
***************
*** 63,68
  	register int c;
  	struct hbuf h;
  	char TRANS[BUFLEN];
  	/* afmt: the other machine runs an A news, so we xmit in A format */
  	int afmt = (index(sp->s_flags, 'A') != NULL);
  	/* notify: don't send the article, just tell him we have it */

--- 64,71 -----
  	register char *ptr;
  	struct hbuf h;
  	char TRANS[BUFLEN];
+ 	char *argv[20];
+ 	register int pid, fd;
  	/* afmt: the other machine runs an A news, so we xmit in A format */
  	int afmt = (index(sp->s_flags, 'A') != NULL);
  	/* notify: don't send the article, just tell him we have it */
***************
*** 67,72
  	int afmt = (index(sp->s_flags, 'A') != NULL);
  	/* notify: don't send the article, just tell him we have it */
  	int notify = maynotify && (index(sp->s_flags, 'N') != NULL);
  
  #ifdef DEBUG
  	printf("Transmitting to '%s'\n", sp->s_name);

--- 70,81 -----
  	int afmt = (index(sp->s_flags, 'A') != NULL);
  	/* notify: don't send the article, just tell him we have it */
  	int notify = maynotify && (index(sp->s_flags, 'N') != NULL);
+ 	/* noshell: don't fork a shell to execute the xmit command */
+ 	int noshell = (index(sp->s_flags, 'S') != NULL);
+ #ifdef BERKNAME
+ 	/* berknet: change sysname in path to berknet name */
+ 	int berknet = (index(sp->s_flags, 'U') != NULL);
+ #endif
  
  #ifdef DEBUG
  	printf("Transmitting to '%s'\n", sp->s_name);
***************
*** 97,102
  			h.ident, sp->s_name);
  
  	ofp = xfopen(mktemp(TRANS), "w");
  	if (afmt)
  		ohwrite(&h, ofp);
  	else

--- 106,122 -----
  			h.ident, sp->s_name);
  
  	ofp = xfopen(mktemp(TRANS), "w");
+ #ifdef BERKNAME
+ 	gobbledygook;
+ 	if (berknet) {
+ 		ptr = index(h.path, '!');
+ 		sprintf(bfr, "%s:%s", BERKNAME, ++ptr);
+ 		strcpy(h.path, bfr);
+ 	}
+ 	if (berknet)
+ 		ihwrite(&h, ofp, 2);
+ 	else
+ #endif
  	if (afmt)
  		ohwrite(&h, ofp);
  	else 
***************
*** 99,105
  	ofp = xfopen(mktemp(TRANS), "w");
  	if (afmt)
  		ohwrite(&h, ofp);
! 	else
  		hwrite(&h, ofp);
  	if (!notify)
  		while ((c = getc(ifp)) != EOF)

--- 119,125 -----
  #endif
  	if (afmt)
  		ohwrite(&h, ofp);
! 	else 
  		hwrite(&h, ofp);
  	if (!notify)
  		while ((c = getc(ifp)) != EOF)
***************
*** 114,120
  #endif
  	else
  		sprintf(bfr, "(%s) < %s", sp->s_xmit, TRANS);
! 	fwait(fsubr(pshell, bfr, (char *)NULL));
  	unlink(TRANS);
  }
  

--- 134,161 -----
  #endif
  	else
  		sprintf(bfr, "(%s) < %s", sp->s_xmit, TRANS);
! 	if (noshell) {
! 		if (pid = fork())
! 			fwait(pid);
! 		else {
! 			close(0);
! 			open(TRANS, 0);
! 			ptr = sp->s_xmit;
! 			for (pid = 0; pid < 19; pid++) {
! 				while (isspace(*ptr))
! 					*ptr++ = 0;
! 				argv[pid] = ptr;
! 				while (!isspace(*++ptr) && *ptr)
! 					;
! 				if (!*ptr)
! 					break;
! 			}
! 			argv[++pid] = 0;
! 			execv(sp->s_xmit, argv);
! 			xerror("Can't execv\n");
! 		}
! 	} else
! 		fwait(fsubr(pshell, bfr, (char *)NULL));
  	unlink(TRANS);
  }
  
diff -c -r /ra/csr/glickman/news/dist/src/inews.c news/src/inews.c
*** /ra/csr/glickman/news/dist/src/inews.c	Thu Mar 18 15:51:37 1982
--- news/src/inews.c	Tue Apr 20 11:09:05 1982
***************
*** 2,8
   * inews - insert, receive, and transmit news articles.
   */
  
! static char *SccsId = "@(#) inews.c	2.5	3/18/82";
  
  #include "iparams.h"
  

--- 2,8 -----
   * inews - insert, receive, and transmit news articles.
   */
  
! static char *SccsId = "@(#) inews.c	2.8	4/20/82";
  
  #include "iparams.h"
  
***************
*** 219,225
  	 *     (and, of course, things like btl.msg.ctl for local broadcasts)
  	 * (2) to.ucbvax.ctl, which is sent only to ucbvax.
  	 */
- 	is_ctl = mode != CREATENG && ngmatch(header.nbuf, "all.all.ctl,");
  
  	/* Authorize newsgroups. */
  	if (mode == PROC) {

--- 219,224 -----
  	 *     (and, of course, things like btl.msg.ctl for local broadcasts)
  	 * (2) to.ucbvax.ctl, which is sent only to ucbvax.
  	 */
  
  	/* Authorize newsgroups. */
  	if (mode == PROC) {
***************
*** 232,238
  			xxit(0);
  		}
  		ngcat(header.nbuf);
! 		is_ctl = mode != CREATENG && ngmatch(header.nbuf, "all.all.ctl,");
  		strcpy(nbuf, header.nbuf);
  		if (s_find(&srec, SYSNAME) == FALSE)
  			xerror("Cannot find SYSNAME in SYSFILE");

--- 231,240 -----
  			xxit(0);
  		}
  		ngcat(header.nbuf);
! 	}
! 	is_ctl = mode != CREATENG &&
! 		(ngmatch(header.nbuf, "all.all.ctl,") || *header.ctlmsg);
! 	if (mode == PROC) {
  		strcpy(nbuf, header.nbuf);
  		if (s_find(&srec, SYSNAME) == FALSE)
  			xerror("Cannot find SYSNAME in SYSFILE");
***************
*** 286,292
  
  	/* Do the actual insertion. */
  	if (tty) {
! 		if (fork() == 0)
  			insert();
  		exit(0);
  	} else

--- 288,295 -----
  
  	/* Do the actual insertion. */
  	if (tty) {
! 		i = fork();
! 		if (i <= 0)
  			insert();
  		exit(0);
  	} else
***************
*** 473,479
  	char locbuf[256];
  
  	sprintf(locbuf, "%s/.%s", SPOOL, rindex(ngname, '/') + 1);
! 	if (!(pid = fork())) {
  		if (setuid(geteuid()))	/* This fails on some systems, but
  					 * works on 4BSD, and 2BSD. */
  #ifndef USG

--- 476,482 -----
  	char locbuf[256];
  
  	sprintf(locbuf, "%s/.%s", SPOOL, rindex(ngname, '/') + 1);
! 	if ((pid = fork()) <= 0) {
  		if (setuid(geteuid()))	/* This fails on some systems, but
  					 * works on 4BSD, and 2BSD. */
  #ifndef USG
Only in news/src: news
diff -c -r /ra/csr/glickman/news/dist/src/newsinstall.sh news/src/newsinstall.sh
*** /ra/csr/glickman/news/dist/src/newsinstall.sh	Sat Feb 27 13:54:13 1982
--- news/src/newsinstall.sh	Sun Mar 14 15:18:07 1982
***************
*** 37,43
  chgrp $NEWSGRP $LIBDIR
  
  : Ensure certain files in LIBDIR exist
! touch $LIBDIR/history $LIBDIR/active $LIBDIR/log
  
  : If no sys file, make one.
  if test ! -f $LIBDIR/sys

--- 37,44 -----
  chgrp $NEWSGRP $LIBDIR
  
  : Ensure certain files in LIBDIR exist
! touch $LIBDIR/history $LIBDIR/active $LIBDIR/log $LIBDIR/users
! chmod 666 $LIBDIR/users
  
  : If no sys file, make one.
  if test ! -f $LIBDIR/sys
***************
*** 67,73
  chown $NEWSUSR $LIBDIR/[a-z]*
  chgrp $NEWSGRP $LIBDIR/[a-z]*
  
! if test -d $LIBDIR/.canned
  then
  	chmod 755 $LIBDIR/.canned
  fi

--- 68,74 -----
  chown $NEWSUSR $LIBDIR/[a-z]*
  chgrp $NEWSGRP $LIBDIR/[a-z]*
  
! if test -d $SPOOLDIR/.canned
  then
  	chmod 755 $SPOOLDIR/.canned
  fi
***************
*** 69,75
  
  if test -d $LIBDIR/.canned
  then
! 	chmod 755 $LIBDIR/.canned
  fi
  
  echo reminder: uux must permit rnews if running over uucp

--- 70,76 -----
  
  if test -d $SPOOLDIR/.canned
  then
! 	chmod 755 $SPOOLDIR/.canned
  fi
  
  echo reminder: uux must permit rnews if running over uucp
Only in news/src: postnews
diff -c -r /ra/csr/glickman/news/dist/src/postnews.usg news/src/postnews.usg
*** /ra/csr/glickman/news/dist/src/postnews.usg	Sun Mar 14 15:01:37 1982
--- news/src/postnews.usg	Sun Apr 18 18:02:17 1982
***************
*** 1,5
! : /bin/sh
! # @(#) postnews	2.1	2/23/82
  if [ $# -gt 1 ]; then
  	echo "$0: Too many args"
  	exit 1

--- 1,4 -----
! : '@(#) postnews.usg	2.3	4/18/82'
  if [ $# -gt 1 ]; then
  	echo "$0: Too many args"
  	exit 1
***************
*** 8,14
  	echo "$0: Can't read $1"
  	exit 1
  fi
! echo "Title:  " \\c
  read title
  echo "Newsgroups (general):  " \\c
  read ng

--- 7,13 -----
  	echo "$0: Can't read $1"
  	exit 1
  fi
! echo "Title: " \\c
  read title
  echo "Newsgroups (general): " \\c
  read ng
***************
*** 10,16
  fi
  echo "Title:  " \\c
  read title
! echo "Newsgroups (general):  " \\c
  read ng
  if [ x$ng = x ]; then
  	ng=general

--- 9,15 -----
  fi
  echo "Title: " \\c
  read title
! echo "Newsgroups (general): " \\c
  read ng
  if [ x$ng = x ]; then
  	ng=general
***************
*** 17,24
  fi
  case $# in
  0)
! 	echo "Type news, end with control D"
! 	inews -t "$title" -n $ng
  	;;
  1)
  	inews -t "$title" -n $ng < $1

--- 16,31 -----
  fi
  case $# in
  0)
! 	if [ x$EDITOR = x ]
! 	then
! 		echo "Type news, end with control D"
! 		inews -t "$title" -n $ng
! 	else
! 		t=/tmp/pn$$
! 		trap "rm -f $t; exit" 0 1 2
! 		$EDITOR $t
! 		inews -t "$title" -n $ng <$t &
! 	fi
  	;;
  1)
  	inews -t "$title" -n $ng < $1 &
***************
*** 21,27
  	inews -t "$title" -n $ng
  	;;
  1)
! 	inews -t "$title" -n $ng < $1
  	;;
  esac
  

--- 28,33 -----
  	fi
  	;;
  1)
! 	inews -t "$title" -n $ng < $1 &
  	;;
  esac
***************
*** 24,30
  	inews -t "$title" -n $ng < $1
  	;;
  esac
- 
- 
- 
- 

--- 31,33 -----
  	inews -t "$title" -n $ng < $1 &
  	;;
  esac
diff -c -r /ra/csr/glickman/news/dist/src/postnews.v7 news/src/postnews.v7
*** /ra/csr/glickman/news/dist/src/postnews.v7	Sun Mar 14 15:01:38 1982
--- news/src/postnews.v7	Sun Apr 18 18:02:19 1982
***************
*** 1,4
! : '@(#) postnews	2.1	2/23/82'
  if [ $# -gt 1 ]; then
  	echo "$0: Too many args"
  	exit 1

--- 1,4 -----
! : '@(#) postnews.v7	2.3	4/18/82'
  if [ $# -gt 1 ]; then
  	echo "$0: Too many args"
  	exit 1
***************
*** 7,13
  	echo "$0: Can't read $1"
  	exit 1
  fi
! echo -n "Title:  "
  read title
  echo -n "Newsgroups (general):  "
  read ng

--- 7,13 -----
  	echo "$0: Can't read $1"
  	exit 1
  fi
! echo -n "Title: "
  read title
  echo -n "Newsgroups (general): "
  read ng
***************
*** 9,15
  fi
  echo -n "Title:  "
  read title
! echo -n "Newsgroups (general):  "
  read ng
  if [ x$ng = x ]; then
  	ng=general

--- 9,15 -----
  fi
  echo -n "Title: "
  read title
! echo -n "Newsgroups (general): "
  read ng
  if [ x$ng = x ]; then
  	ng=general
***************
*** 16,23
  fi
  case $# in
  0)
! 	echo "Type news, end with control D"
! 	inews -t "$title" -n $ng
  	;;
  1)
  	inews -t "$title" -n $ng < $1

--- 16,31 -----
  fi
  case $# in
  0)
! 	if [ x$EDITOR = x ]
! 	then
! 		echo "Type news, end with control D"
! 		inews -t "$title" -n $ng
! 	else
! 		t=/tmp/pn$$
! 		trap "rm -f $t; exit" 0 1 2
! 		$EDITOR $t
! 		inews -t "$title" -n $ng <$t &
! 	fi
  	;;
  1)
  	inews -t "$title" -n $ng < $1 &
***************
*** 20,26
  	inews -t "$title" -n $ng
  	;;
  1)
! 	inews -t "$title" -n $ng < $1
  	;;
  esac
  

--- 28,33 -----
  	fi
  	;;
  1)
! 	inews -t "$title" -n $ng < $1 &
  	;;
  esac
***************
*** 23,29
  	inews -t "$title" -n $ng < $1
  	;;
  esac
- 
- 
- 
- 

--- 31,33 -----
  	inews -t "$title" -n $ng < $1 &
  	;;
  esac
diff -c -r /ra/csr/glickman/news/dist/src/process.c news/src/process.c
*** /ra/csr/glickman/news/dist/src/process.c	Sun Mar 14 15:01:40 1982
--- news/src/process.c	Mon Mar 22 20:23:37 1982
***************
*** 2,8
   * process - process options for readnews
   */
  
! static char *SccsId = "@(#) process.c	2.1	2/23/82";
  
  #include "rparams.h"
  

--- 2,8 -----
   * process - process options for readnews
   */
  
! static char *SccsId = "@(#) process.c	2.2	3/14/82";
  
  #include "rparams.h"
  
Only in news/src: readnews.1
diff -c -r /ra/csr/glickman/news/dist/src/readnews.c news/src/readnews.c
*** /ra/csr/glickman/news/dist/src/readnews.c	Sat Feb 27 18:52:58 1982
--- news/src/readnews.c	Sat Apr  3 10:22:09 1982
***************
*** 2,8
   * readnews - read news articles.
   */
  
! static char *SccsId = "@(#) readnews.c	2.2	2/27/82";
  
  #include "rparams.h"
  

--- 2,8 -----
   * readnews - read news articles.
   */
  
! static char *SccsId = "@(#) readnews.c	2.4	4/3/82";
  
  #include "rparams.h"
  
***************
*** 78,83
  	}
  	if (!(MAILER = getenv("MAILER")))
  		MAILER = "mail";	/* was /bin/mail */
  	if (!(PAGER = getenv("PAGER")))
  		PAGER = PAGE;
  	if (ptr = getenv("NEWSOPTS"))

--- 78,84 -----
  	}
  	if (!(MAILER = getenv("MAILER")))
  		MAILER = "mail";	/* was /bin/mail */
+ #ifdef PAGE
  	if (!(PAGER = getenv("PAGER")))
  		PAGER = PAGE;
  #else
***************
*** 80,85
  		MAILER = "mail";	/* was /bin/mail */
  	if (!(PAGER = getenv("PAGER")))
  		PAGER = PAGE;
  	if (ptr = getenv("NEWSOPTS"))
  		strcpy(rcbuf, ptr);
  	else

--- 81,89 -----
  #ifdef PAGE
  	if (!(PAGER = getenv("PAGER")))
  		PAGER = PAGE;
+ #else
+ 	PAGER = "";
+ #endif
  	if (ptr = getenv("NEWSOPTS"))
  		strcpy(rcbuf, ptr);
  	else
***************
*** 213,219
  			break;
  #endif
  	}
! 	if (xflag || lflag)
  		xxit(0);
  	if (*groupdir && mode != MAIL)
  		updaterc();

--- 217,223 -----
  			break;
  #endif
  	}
! 	if (xflag || lflag || tflag)
  		xxit(0);
  	if (*groupdir && mode != MAIL)
  		updaterc();
diff -c -r /ra/csr/glickman/news/dist/src/readr.c news/src/readr.c
*** /ra/csr/glickman/news/dist/src/readr.c	Thu Mar 18 15:51:47 1982
--- news/src/readr.c	Sun Apr 18 18:02:23 1982
***************
*** 2,8
   * readr - /bin/mail and msgs interface and associated functions.
   */
  
! static char *SccsId = "@(#) readr.c	2.4	3/18/82";
  
  #include "rparams.h"
  

--- 2,8 -----
   * readr - /bin/mail and msgs interface and associated functions.
   */
  
! static char *SccsId = "@(#) readr.c	2.8	4/18/82";
  
  #include "rparams.h"
  
***************
*** 29,35
  	char goodone[BUFLEN];		/* last decent article		*/
  	char ogroupdir[BUFLEN];		/* last groupdir		*/
  	char address[PATHLEN];		/* for reply copy		*/
! 	char *ptr1, *ptr2;		/* for reply manipulation	*/
  	int  news = 0;
  	char *ed, *tf = "/tmp/folXXXXXX";
  	char edcmdbuf[128];

--- 29,35 -----
  	char goodone[BUFLEN];		/* last decent article		*/
  	char ogroupdir[BUFLEN];		/* last groupdir		*/
  	char address[PATHLEN];		/* for reply copy		*/
! 	char *ptr1, *ptr2, *ptr3;	/* for reply manipulation	*/
  	int  news = 0;
  	char *ed, *tf = "/tmp/folXXXXXX";
  	char edcmdbuf[128];
***************
*** 173,179
  						fprintf(ofp, "Article %d (%s):\n", bit, h.ident);
  					}
  					hprint(&h, !cflag, ofp);
! 			}
  			news = TRUE;
  			if ((cflag && !lflag) || pflag) {
  				tprint(fp, ofp);

--- 173,179 -----
  						fprintf(ofp, "Article %d (%s):\n", bit, h.ident);
  					}
  					hprint(&h, !cflag, ofp);
! 				}
  			news = TRUE;
  			if ((cflag && !lflag) || pflag) {
  				tprint(fp, ofp);
***************
*** 248,253
  			clear(bit);
  			saveart;
  			nextbit();
  			break;
  
  		/* reprint the article */

--- 248,255 -----
  			clear(bit);
  			saveart;
  			nextbit();
+ 			if (hflag)
+ 				fprintf(ofp, "From: %s\n", h.path);
  			break;
  
  		/* reprint the article */
***************
*** 280,287
  			}
  			while (*bptr == ' ')
  				bptr++;
! 			if (*bptr == '\0')
! 				strcpy(bptr, "Articles");
  			fwait(fsubr(save, tfilename, bptr));
  			break;
  

--- 282,301 -----
  			}
  			while (*bptr == ' ')
  				bptr++;
! 			if(*bptr != '|' && index(bptr,'/') == NULL) {
! 				char hetyped[BUFLEN];
! 				char *boxptr;
! 				strcpy(hetyped,bptr);
! 				if((boxptr=getenv("NEWSBOX"))!=NULL)
! 					strcpy(bptr,boxptr);
! 				else
! 					sprintf(bptr,"%s",userhome);
! 				strcat(bptr,"/");
! 				if(hetyped[0] != '\0')
! 					strcat(bptr, hetyped);
! 				else
! 					strcat(bptr, "Articles");
! 			}
  			fwait(fsubr(save, tfilename, bptr));
  			break;
  
***************
*** 363,369
  			}
  			if (*bptr != '\0') goto badropt;
  			readmode = SPEC;
! 			if (strcmp(username, hptr->path) && uid != ROOTID && uid) {
  				fprintf(ofp, "Can't cancel what you didn't write.\n");
  				break;
  			}

--- 377,384 -----
  			}
  			if (*bptr != '\0') goto badropt;
  			readmode = SPEC;
! 			i = strcmp(username, hptr->path);
! 			if (i && uid != ROOTID && uid) {
  				fprintf(ofp, "Can't cancel what you didn't write.\n");
  				break;
  			} else if (i)
***************
*** 366,373
  			if (strcmp(username, hptr->path) && uid != ROOTID && uid) {
  				fprintf(ofp, "Can't cancel what you didn't write.\n");
  				break;
! 			}
! 			if (!cancel(ofp, hptr)) {
  				clear(bit);
  				saveart;
  				nextbit();

--- 381,389 -----
  			if (i && uid != ROOTID && uid) {
  				fprintf(ofp, "Can't cancel what you didn't write.\n");
  				break;
! 			} else if (i)
! 				fprintf(ofp, "Not contributor: cancelling locally only.\n");
! 			if (!cancel(ofp, hptr, i)) {
  				clear(bit);
  				saveart;
  				nextbit();
***************
*** 543,548
  		case 'f':
  			tfilename = h.title;
  			ptr2 = h.nbuf;
  			if (*bptr == '-') {
  				if (*hbuf1.title && *hbuf1.nbuf) {
  					tfilename = hbuf1.title;

--- 559,565 -----
  		case 'f':
  			tfilename = h.title;
  			ptr2 = h.nbuf;
+ 			ptr3 = h.ident;
  			if (*bptr == '-') {
  				if (*hbuf1.title && *hbuf1.nbuf) {
  					tfilename = hbuf1.title;
***************
*** 547,552
  				if (*hbuf1.title && *hbuf1.nbuf) {
  					tfilename = hbuf1.title;
  					ptr2 = hbuf1.nbuf;
  				}
  				bptr++;
  			}

--- 564,570 -----
  				if (*hbuf1.title && *hbuf1.nbuf) {
  					tfilename = hbuf1.title;
  					ptr2 = hbuf1.nbuf;
+ 					ptr3 = hbuf1.ident;
  				}
  				bptr++;
  			}
***************
*** 557,563
  				bptr++;
  			fprintf(ofp, "Title: ");
  			if (*bptr == '\0') {
! 				sprintf(bfr, "%s -F %s -n %s -t \'", INEWS, h.ident, ptr2);
  				if (strncmp(tfilename, "Re: ", 4)) {
  					strcat(bfr, "Re: ");
  					fprintf(ofp, "Re: ");

--- 575,581 -----
  				bptr++;
  			fprintf(ofp, "Title: ");
  			if (*bptr == '\0') {
! 				sprintf(bfr, "%s -F %s -n %s -t \'", INEWS, ptr3, ptr2);
  				if (strncmp(tfilename, "Re: ", 4)) {
  					strcat(bfr, "Re: ");
  					fprintf(ofp, "Re: ");
***************
*** 573,579
  			fflush(ofp);
  			/* backslash special characters */
  			for (ptr1 = rcbuf, ptr2 = bfr; *ptr2; ptr1++, ptr2++) {
! 				if (index("\"\\$", *ptr2))
  					*ptr1++ = '\\';
  				*ptr1 = *ptr2;
  			}

--- 591,597 -----
  			fflush(ofp);
  			/* backslash special characters */
  			for (ptr1 = rcbuf, ptr2 = bfr; *ptr2; ptr1++, ptr2++) {
! 				if (index("\\", *ptr2))
  					*ptr1++ = '\\';
  				*ptr1 = *ptr2;
  			}
***************
*** 594,599
  				system(edcmdbuf);
  				strcat(rcbuf, "< ");
  				strcat(rcbuf, tf);
  				printf("%s\n", rcbuf);
  				if (fork() == 0) {
  					system(rcbuf);

--- 612,621 -----
  				system(edcmdbuf);
  				strcat(rcbuf, "< ");
  				strcat(rcbuf, tf);
+ 				if (access(tf, 4)) {
+ 					fprintf(stderr, "Article not posted: no input file.\n");
+ 					break;
+ 				}
  				printf("%s\n", rcbuf);
  				if (fork() == 0) {
  					system(rcbuf);
***************
*** 602,608
  				}
  			}
  			else {
! 				printf("bar: %s\n", rcbuf);
  				system(rcbuf);
  			}
  			break;

--- 624,630 -----
  				}
  			}
  			else {
! 				printf("%s\n", rcbuf);
  				system(rcbuf);
  			}
  			break;
***************
*** 638,644
  			break;
  
  		case '#':
! 			fprintf(ofp, "Last article is %D.\n", statbuf.st_size);
  			break;
  
  		/* error */

--- 660,666 -----
  			break;
  
  		case '#':
! 			fprintf(ofp, "Last article is %ld.\n", statbuf.st_size);
  			break;
  
  		/* error */
***************
*** 732,737
  	register FILE *ufp, *hfp;
  	struct hbuf h;
  	int isprogram = 0;
  
  	if ((hfp = fopen(file, "r")) == NULL) {
  		printf("Can't get article.\n");

--- 754,760 -----
  	register FILE *ufp, *hfp;
  	struct hbuf h;
  	int isprogram = 0;
+ 	int isnew = 1;
  
  	if ((hfp = fopen(file, "r")) == NULL) {
  		printf("Can't get article.\n");
***************
*** 741,746
  		printf("Article is garbled.\n");
  		return;
  	}
  	setgid(gid);
  	setuid(uid);
  	umask(savmask);

--- 764,774 -----
  		printf("Article is garbled.\n");
  		return;
  	}
+ 	ufp = fopen(to, "r");
+ 	if (ufp != NULL) {
+ 		fclose(ufp);
+ 		isnew = 0;
+ 	}
  	setgid(gid);
  	setuid(uid);
  	umask(savmask);
***************
*** 764,770
  	if (isprogram)
  		pclose (ufp);
  	else
! 	fclose(ufp);
  }
  
  /*

--- 792,800 -----
  	if (isprogram)
  		pclose (ufp);
  	else
! 		fclose(ufp);
! 	if (isnew && !isprogram)
! 		printf("%s: %s\n", to, isnew ? "New file": "Appended");
  }
  
  /*
***************
*** 902,909
  	unlink(TRANS);
  }
  
! #define SYSWIDE
! cancel(ofp, hp)
  FILE *ofp;
  struct hbuf *hp;
  {

--- 932,944 -----
  	unlink(TRANS);
  }
  
! /*
!  * Cancel the article whose header is in hp, by posting a control message
!  * to cancel it.  The scope of the control message depends on who would
!  * really be willing to cancell it.  It is sent as far as it will do any good.
!  * notauthor is true iff the person posting the article is the real author.
!  */
! cancel(ofp, hp, notauthor)
  FILE *ofp;
  struct hbuf *hp;
  int notauthor;
***************
*** 906,911
  cancel(ofp, hp)
  FILE *ofp;
  struct hbuf *hp;
  {
  	FILE *inews;
  	struct utsname grunt;

--- 941,947 -----
  cancel(ofp, hp, notauthor)
  FILE *ofp;
  struct hbuf *hp;
+ int notauthor;
  {
  	FILE *inews;
  	struct utsname me;
***************
*** 908,914
  struct hbuf *hp;
  {
  	FILE *inews;
! 	struct utsname grunt;
  
  	uname(&grunt);
  #ifdef SYSWIDE

--- 944,953 -----
  int notauthor;
  {
  	FILE *inews;
! 	struct utsname me;
! 	char *p, *q;
! 	char distgroup[64];
! 	int pid;
  
  	fflush(stdout);
  	pid = fork();
***************
*** 910,922
  	FILE *inews;
  	struct utsname grunt;
  
! 	uname(&grunt);
! #ifdef SYSWIDE
! 	sprintf(bfr, "%s -t cancel %s -n net.general.ctl", INEWS, hp->ident);
! #else
! 	sprintf(bfr, "%s -t cancel %s -n to.%s.ctl", INEWS, hp->ident, grunt.nodename);
! #endif
! 	if ((inews = popen(bfr, "w")) == NULL) {
  		fprintf(ofp, "Can't fork %s\n", INEWS);
  		return(1);
  	}

--- 949,973 -----
  	char distgroup[64];
  	int pid;
  
! 	fflush(stdout);
! 	pid = fork();
! 	if (pid > 0)
! 		return 0;
! 	uname(&me);
! 	strcpy(distgroup, hp->nbuf);
! 	p = index(distgroup, '.');
! 	q = index(p+1, '.');
! 	if (notauthor)
! 		sprintf(distgroup, "to.%s.ctl", me.nodename);
! 	else if (p == 0)
! 		sprintf(distgroup, "%s.msg.ctl", distgroup);
! 	else if (q == 0)
! 		strcat(distgroup, ".ctl");
! 	else
! 		strcpy(q, ".ctl");
! 	sprintf(bfr, "%s -t 'cancel %s' -n %s < /dev/null",
! 			INEWS, hp->ident, distgroup);
! 	if ((inews = popen(bfr, "w")) == NULL)
  		fprintf(ofp, "Can't fork %s\n", INEWS);
  	else
  		pclose(inews);
***************
*** 918,927
  #endif
  	if ((inews = popen(bfr, "w")) == NULL) {
  		fprintf(ofp, "Can't fork %s\n", INEWS);
! 		return(1);
! 	}
! 	pclose(inews);
! 	return(0);
  }
  
  dash(num, ofp)

--- 969,979 -----
  			INEWS, hp->ident, distgroup);
  	if ((inews = popen(bfr, "w")) == NULL)
  		fprintf(ofp, "Can't fork %s\n", INEWS);
! 	else
! 		pclose(inews);
! 	if (pid == 0)
! 		exit(0);
! 	return 0;
  }
  
  dash(num, ofp)
***************
*** 969,974
  	fprintf(ofp, "\n");
  }
  
  strqcat(dest, src)
  register char *dest, *src;
  {

--- 1021,1030 -----
  	fprintf(ofp, "\n");
  }
  
+ /*
+  * like strcat but be careful with quotes.  since there appears to be no way
+  * to quote an apostrophe in sh, we change them to double quotes.
+  */
  strqcat(dest, src)
  register char *dest, *src;
  {
***************
*** 977,984
  	dest--;
  	while (*src) {
  		if (*src == '\'')
! 			*dest++ = '\\';
! 		*dest++ = *src++;
  	}
  	*dest++ = 0;
  }

--- 1033,1041 -----
  	dest--;
  	while (*src) {
  		if (*src == '\'')
! 			*dest++ = '"', src++;
! 		else
! 			*dest++ = *src++;
  	}
  	*dest++ = 0;
  }
diff -c -r /ra/csr/glickman/news/dist/src/recnews.c news/src/recnews.c
*** /ra/csr/glickman/news/dist/src/recnews.c	Thu Feb 25 18:06:52 1982
--- news/src/recnews.c	Sat Apr  3 11:53:27 1982
***************
*** 31,37
   * essential to use recnews to be able to join usenet.
   */
  
! static char *SccsId = "@(#) recnews.c	2.2	2/25/82";
  
  #include "defs.h"
  

--- 31,37 -----
   * essential to use recnews to be able to join usenet.
   */
  
! static char *SccsId = "@(#) recnews.c	2.3	4/3/82";
  
  #include "defs.h"
  
***************
*** 311,318
   * NULL if not found
   *
   */
- 
- #define	NULL	0
  
  char *
  any(sp, sq)

--- 311,316 -----
   * NULL if not found
   *
   */
  
  char *
  any(sp, sq)
diff -c -r /ra/csr/glickman/news/dist/src/rfuncs.c news/src/rfuncs.c
*** /ra/csr/glickman/news/dist/src/rfuncs.c	Sun Mar 14 15:01:52 1982
--- news/src/rfuncs.c	Sun Apr 18 18:02:25 1982
***************
*** 2,8
   * rfuncs - functions for readnews.
   */
  
! static char *SccsId = "@(#) rfuncs.c	2.2	2/26/82";
  
  #include "rparams.h"
  

--- 2,8 -----
   * rfuncs - functions for readnews.
   */
  
! static char *SccsId = "@(#) rfuncs.c	2.5	4/18/82";
  
  #include "rparams.h"
  
***************
*** 301,306
  		return FALSE;
  	if (aflag && cgtdate(hp->recdate) < atime) 
  		return FALSE;
  	return TRUE;
  }
  

--- 301,308 -----
  		return FALSE;
  	if (aflag && cgtdate(hp->recdate) < atime) 
  		return FALSE;
+ 	if (index(hp->nbuf, ',') && seenbefore(hp->ident))
+ 		return FALSE;
  	return TRUE;
  }
  
***************
*** 304,309
  	return TRUE;
  }
  
  
  back() {
  	while (fseek(actfp, -2L, 1) != -1 && ftell(actfp) > 0L) {

--- 306,342 -----
  	return TRUE;
  }
  
+ /*
+  * Given an article ID, return TRUE if we have already seen that article ID
+  * in this readnews session.  This should only be called for articles
+  * with commas in the newsgroup name, and prevents the same article, which
+  * was submitted to multiple newsgroups, from being shown to the same
+  * person more than once.  Bug: if the user quits after seeing the first
+  * copy, he'll see it again next time in the other newsgroup.
+  */
+ #define NART	100	/* max # articles on multiple newsgroups */
+ #define IDSIZE	14	/* max size of an article ID */
+ seenbefore(artid)
+ char *artid;
+ {
+ 	static int nbef = 0;
+ 	static char histbuf[NART][IDSIZE];
+ 	register int i;
+ 
+ 	for (i=0; i<nbef; i++)
+ 		if (strcmp(histbuf[i], artid) == 0)
+ 			return TRUE;
+ 	if (strlen(artid) >= IDSIZE) {
+ 		fprintf(stderr, "Article id '%s' too long\n", artid);
+ 		return FALSE;
+ 	}
+ 	if (nbef >= NART-1) {
+ 		fprintf(stderr, "Too many multiple newsgroup articles\n");
+ 		return FALSE;
+ 	}
+ 	strcpy(histbuf[nbef++], artid);
+ 	return FALSE;
+ }
  
  back() {
  	while (fseek(actfp, -2L, 1) != -1 && ftell(actfp) > 0L) {
diff -c -r /ra/csr/glickman/news/dist/src/sendnews.c news/src/sendnews.c
*** /ra/csr/glickman/news/dist/src/sendnews.c	Thu Mar 18 15:51:53 1982
--- news/src/sendnews.c	Sat Apr  3 10:22:12 1982
***************
*** 2,8
   * sendnews - send news article by mail.
   */
  
! static char *SccsId = "@(#) sendnews.c	2.2	3/18/82";
  
  #include <stdio.h>
  #include <ctype.h>

--- 2,8 -----
   * sendnews - send news article by mail.
   */
  
! static char *SccsId = "@(#) sendnews.c	2.3	4/3/82";
  
  #include <stdio.h>
  #include <ctype.h>
***************
*** 87,92
  						punct = &buffer[4];
  						while (isspace(*punct++))
  							;
  					}
  					else if (!strncmp(buffer, "From: ",6)) {
  						punct = &buffer[6];

--- 87,93 -----
  						punct = &buffer[4];
  						while (isspace(*punct++))
  							;
+ 						punct--;
  					}
  					else if (!strncmp(buffer, "From: ",6)) {
  						punct = &buffer[6];
***************
*** 92,97
  						punct = &buffer[6];
  						while (isspace(*punct++))
  							;
  					}
  					else
  						punct = buffer;

--- 93,99 -----
  						punct = &buffer[6];
  						while (isspace(*punct++))
  							;
+ 						punct--;
  					}
  					else
  						punct = buffer;
Only in news/src: tags



More information about the Comp.sources.unix mailing list