From: sources@anomaly.sbs.risc.net
Subject: v01i127 - NN v6.4.18, FullScreen USENET Newsreader - Part 01/23
Reply-To: sources@anomaly.sbs.risc.net
Organization: The Rhode Island Internet Systems Cooperative Network
Date: Mon, 14 Sep 1992 14:19:48 GMT
Followup-To: biz.sco.general


#!/bin/sh
# This is a shell archive (shar 3.32)
#
# existing files WILL be overwritten
# This format requires very little intelligence at unshar time.
# "echo" and "sed" will be needed.
#
# This is part 1 of a multipart archive                                    
# do not concatenate these parts, unpack them in order with /bin/sh        
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#     62 -rwxr-xr-x FILES
#  11365 -rw-r--r-- MANIFEST
#   1730 -rw-r--r-- Makefile
#  21789 -rw-r--r-- Patch.Result
#   7714 -rw-r--r-- README
#    338 -rw-r--r-- SPLITNN1
#  12442 -rw-r--r-- account.c
#   3220 -rw-r--r-- active.c
#  23021 -rw-r--r-- admin.c
#  24333 -rw-r--r-- answer.c
#  10491 -rw-r--r-- articles.c
#   1638 -rw-r--r-- articles.h
#   7822 -rw-r--r-- aux.sh
#    606 -rw-r--r-- back_act.sh
#  11166 -rw-r--r-- collect.c
#    771 -rw-r--r-- conf/m-3b1g.h
#    688 -rw-r--r-- conf/m-att3b.h
#   1212 -rw-r--r-- conf/m-convex.h
#    519 -rw-r--r-- conf/m-dec3100.h
#    750 -rw-r--r-- conf/m-gould.h
#    550 -rw-r--r-- conf/m-hp9000.h
#    721 -rw-r--r-- conf/m-i80286.h
#    675 -rw-r--r-- conf/m-i80386.h
#    427 -rw-r--r-- conf/m-m680x0.h
#    509 -rw-r--r-- conf/m-m88000.h
#    552 -rw-r--r-- conf/m-mips.h
#    676 -rw-r--r-- conf/m-pyramid.h
#    446 -rw-r--r-- conf/m-rt6150.h
#    523 -rw-r--r-- conf/m-sgi4D.h
#    664 -rw-r--r-- conf/m-sparc.h
#    673 -rw-r--r-- conf/m-sun386i.h
#    713 -rw-r--r-- conf/m-symmetry.h
#   2259 -rw-r--r-- conf/m-template.h
#    809 -rw-r--r-- conf/m-vax.h
#    298 -rw-r--r-- conf/s-3b1g.h
#    447 -rw-r--r-- conf/s-aix221.h
#    741 -rw-r--r-- conf/s-aux1-1.h
#   2498 -rw-r--r-- conf/s-bsd4-2.h
#    238 -rw-r--r-- conf/s-bsd4-3.h
#    331 -rw-r--r-- conf/s-dnix5-2.h
#    275 -rw-r--r-- conf/s-dnix5-3.h
#    156 -rw-r--r-- conf/s-dynix3-0.h
#   3028 -rw-r--r-- conf/s-fortune.h
#    510 -rw-r--r-- conf/s-hpux.h
#    672 -rw-r--r-- conf/s-hpux2-1.h
#    288 -rw-r--r-- conf/s-hpux3-0.h
#    202 -rw-r--r-- conf/s-hpux6-5.h
#    310 -rw-r--r-- conf/s-pyramid.h
#   1068 -rw-r--r-- conf/s-sgi4D.h
#    216 -rw-r--r-- conf/s-sunos3.h
#    364 -rw-r--r-- conf/s-sunos4-0.h
#    155 -rw-r--r-- conf/s-sys5-tcap.h
#   2621 -rw-r--r-- conf/s-sys5.h
#   6394 -rw-r--r-- conf/s-template.h
#    149 -rw-r--r-- conf/s-texas1500.h
#    141 -rw-r--r-- conf/s-tower32.h
#   4046 -rw-r--r-- conf/s-umipsb.h
#    388 -rw-r--r-- conf/s-uport2-2.h
#     72 -rw-r--r-- conf/s-usg3-1.h
#    962 -rw-r--r-- conf/s-xenix386.h
#    501 -rw-r--r-- conf/s-xenix386ds.h
#    558 -rw-r--r-- conf/s-ultrix.h
#   1156 -rw-r--r-- conf/s-apollo.h
#    414 -rw-r--r-- conf/m-amdahl.h
#    622 -rw-r--r-- conf/m-mx300.h
#    212 -rw-r--r-- conf/s-NeXT1-0.h
#    355 -rw-r--r-- conf/s-hpux7-0.h
#   1762 -rw-r--r-- conf/s-ix386.h
#    479 -rw-r--r-- conf/s-ptx1-1.h
#    463 -rw-r--r-- conf/s-scoV386.h
#   1343 -rw-r--r-- conf/s-sinix.h
#    531 -rw-r--r-- conf/s-sunos4-v.h
#    257 -rw-r--r-- conf/s-sysV88.h
#    152 -rw-r--r-- conf/s-umipsb4-5.h
#    497 -rw-r--r-- conf/s-uts2-0.h
#    742 -rw-r--r-- conf/s-xenix286.h
#    747 -rw-r--r-- conf/s-xenix286b.h
#    449 -rw-r--r-- conf/s-xenix68k.h
#  12094 -rw-r--r-- config.h-dist
#   2723 -rw-r--r-- contrib/aspell
#    688 -rwxr-xr-x contrib/cn
#   7717 -rw-r--r-- contrib/recmail.c
#   1657 -rw-r--r-- contrib/recmail.sh
#    530 -rw-r--r-- cvt-help.c
#   6756 -rw-r--r-- data.h
#  24173 -rw-r--r-- db.c
#   2870 -rw-r--r-- db.h
#    496 -rw-r--r-- debug.h
#  10889 -rw-r--r-- decode.c
#  12849 -rw-r--r-- digest.c
#   3623 -rw-r--r-- dir.c
#    759 -rw-r--r-- dir.h
#  24932 -rw-r--r-- doc/INSTALLATION
#   6036 -rw-r--r-- doc/NEWS-6.3
#  12220 -rw-r--r-- doc/NEWS-6.4
#  14786 -rw-r--r-- doc/NNTP
#  14423 -rw-r--r-- doc/PROBLEMS
#  73368 -rw-r--r-- doc/RELEASE_NOTES
#   2841 -rw-r--r-- doc/RELEASE_NOTES.
#   3275 -rw-r--r-- execute.c
#  14193 -rw-r--r-- expire.c
#  11826 -rw-r--r-- folder.c
#   2175 -rw-r--r-- format.awk
#   2613 -rw-r--r-- fullname.c
#  19609 -rw-r--r-- global.c
#   5270 -rw-r--r-- global.h
#  26279 -rw-r--r-- group.c
#    392 -rw-r--r-- help/adm.upgrade1
#    666 -rw-r--r-- help/adm.upgrade2
#    626 -rw-r--r-- help/adm.upgrade3
#    485 -rw-r--r-- help/adm.upgrade4
#    599 -rw-r--r-- help/adm.welcome
#    328 -rw-r--r-- help/help.attr
#   2924 -rw-r--r-- help/help.commands
#   1353 -rw-r--r-- help/help.extended
#    314 -rw-r--r-- help/help.help
#    781 -rw-r--r-- help/help.map
#   1003 -rw-r--r-- help/help.menu
#   1248 -rw-r--r-- help/help.more
#     13 -rw-r--r-- help/help.read
#    413 -rw-r--r-- help/help.set
#    591 -rw-r--r-- help/help.show
#    880 -rw-r--r-- help/help.sort
#   7199 -rw-r--r-- help/help.variables
#   2870 -rw-r--r-- help/help.commands.
#   2359 -rw-r--r-- hostname.c
#   1463 -rw-r--r-- inews/Makefile
#    649 -rw-r--r-- inews/Manifest
#   2391 -rw-r--r-- inews/README
#   3051 -rw-r--r-- inews/README.NN
#  11341 -rw-r--r-- inews/clientlib.c
#    230 -rw-r--r-- inews/clientlib.h
#   3126 -rw-r--r-- inews/conf.h
#   8001 -rw-r--r-- inews/inews.c
#   2530 -rw-r--r-- inews/nntp.h
#    100 -rw-r--r-- inews/version.c
#  27869 -rw-r--r-- init.c
#   2435 -rw-r--r-- init.sample
#   9201 -rw-r--r-- inst.sh
#  21092 -rw-r--r-- keymap.c
#   5133 -rw-r--r-- keymap.h
#  23557 -rw-r--r-- kill.c
#  14491 -rw-r--r-- macro.c
#  51094 -rw-r--r-- man/nn.1.A
#  36327 -rw-r--r-- man/nn.1.B
#  66152 -rw-r--r-- man/nn.1.C
#  48056 -rw-r--r-- man/nn.1.D
#   4489 -rw-r--r-- man/nnacct.1m
#  20327 -rw-r--r-- man/nnadmin.1m
#   2767 -rw-r--r-- man/nncheck.1
#   3766 -rw-r--r-- man/nngoback.1
#   1666 -rw-r--r-- man/nngrab.1
#   2697 -rw-r--r-- man/nngrep.1
#  22099 -rw-r--r-- man/nnmaster.8
#   2600 -rw-r--r-- man/nnpost.1
#   1242 -rw-r--r-- man/nnspew.8
#   1572 -rw-r--r-- man/nnstats.1m
#   2224 -rw-r--r-- man/nntidy.1
#   1421 -rw-r--r-- man/nnusage.1m
#  21113 -rw-r--r-- master.c
#   2864 -rw-r--r-- match.c
#  49595 -rw-r--r-- menu.c
#   2211 -rw-r--r-- menu.h
#  31072 -rw-r--r-- more.c
#   7119 -rw-r--r-- news.c
#   2373 -rw-r--r-- news.h
#  38967 -rw-r--r-- newsrc.c
#  21288 -rw-r--r-- nn.c
#    730 -rw-r--r-- nngrab.sh
#   1469 -rw-r--r-- nnmail.c
#    564 -rw-r--r-- nnspew.sh
#   3021 -rw-r--r-- nnstats.sh
#  25682 -rw-r--r-- nntp.c
#   2530 -rw-r--r-- nntp.h
#   1088 -rw-r--r-- nnusage.sh
#   3764 -rw-r--r-- options.c
#   2329 -rw-r--r-- options.h
#   6947 -rw-r--r-- pack_date.c
#  10519 -rw-r--r-- pack_name.c
#   1415 -rw-r--r-- pack_subject.c
#   1187 -rw-r--r-- patchlevel.h
#   3357 -rw-r--r-- prefix.c
#   5075 -rw-r--r-- proto.c
#   1061 -rw-r--r-- proto.h
#  31695 -rw-r--r-- regexp.c
#    731 -rw-r--r-- regexp.h
#   7348 -rw-r--r-- reroute.c
#   1952 -rw-r--r-- routes.sample
#  18385 -rw-r--r-- save.c
#  14839 -rw-r--r-- sequence.c
#   9063 -rw-r--r-- sort.c
#  33014 -rw-r--r-- term.c
#   1307 -rw-r--r-- term.h
#   5341 -rw-r--r-- unshar.c
#      2 -rw-r--r-- update.h
#    776 -rw-r--r-- upgrade_rc.sh
#    198 -rw-r--r-- usercheck.c
#   1183 -rw-r--r-- vararg.h
#  31383 -rw-r--r-- variable.c
#   7465 -rw-r--r-- xmakefile
#    980 -rw-r--r-- ChangeLog
#
if test -r shar3_seq_.tmp; then
	echo "Must unpack archives in sequence!"
	next=`cat shar3_seq_.tmp`; echo "Please unpack part $next next"
	exit 1
fi
# ============= FILES ==============
echo "x - extracting FILES (Text)"
sed 's/^X//' << 'SHAR_EOF' > FILES &&
Xtail +3 MANIFEST | grep -v "Directory for" | awk '{print $1}'
SHAR_EOF
# ============= MANIFEST ==============
echo "x - extracting MANIFEST (Text)"
sed 's/^X//' << 'SHAR_EOF' > MANIFEST &&
X   File Name		Archive #	Description
X----------------------------------------------------------
XREADME                     1	Read this file first
XMANIFEST                   1	Packing list
XFILES                     22	Extract file names from MANIFEST
XMakefile                  21	Makefile for building nn
XSPLITNN1                  22	Split nn.1 in four parts.
Xaccount.c                 17	Accounting routines
Xactive.c                  20	Read active file
Xadmin.c                   12	Administration mode (nnadmin)
Xanswer.c                  14	Respond/post/mail code
Xarticles.c                17	Incore article fetching and management
Xarticles.h                21	Header file for article management
Xaux.sh                    10	Auxiliary script for post/mail
Xback_act.sh               22	Backup active file once a day
Xcollect.c                 16	Collect groups and articles in the database
Xconf                       1	Directory for s- and m- files
Xconf/m-3b1g.h             22	For 3b1 (unix-pc) with GCC [no networking].
Xconf/m-att3b.h            22	For AT&T 3b2 (with s-usg3-1.h)
Xconf/m-convex.h           21	For Convex.
Xconf/m-dec3100.h          22	For DECstation 3100 (with s-bsd4-2.h)
Xconf/m-gould.h            22	For Gould PN6000 (with s-bsd4-3.h)
Xconf/m-hp9000.h           22	For HP9000 series 320 and 800 (at least)
Xconf/m-i80286.h           22	For Intel 80286 processors [no network support]
Xconf/m-i80386.h           22	For Intel 80386 processors [no network support]
Xconf/m-m680x0.h           22	For 68000 family processors
Xconf/m-m88000.h           22	For Motorola 88000 risc processors
Xconf/m-mips.h             22	For MIPS processors
Xconf/m-pyramid.h          22	For Pyramid (and Targon 35).
Xconf/m-rt6150.h           22	For IBM 6150
Xconf/m-sgi4D.h            22	For Silicon Graphics 4D series.
Xconf/m-sparc.h            22	For SPARC processors
Xconf/m-sun386i.h          22	For 80386 based SUNs [have network support]
Xconf/m-symmetry.h         22	For Sequent Symmetry.
Xconf/m-template.h         21	Template for new machine files.
Xconf/m-vax.h              22	For VAX family
Xconf/m-amdahl.h          P14	For Amdahl
Xconf/m-mx300.h           P14	For Siemens MX300
Xconf/s-3b1g.h             22	For 3b1 (unix-pc) with GCC.
Xconf/s-aix221.h           14	For AIX 2.2.1
Xconf/s-apollo.h		6.4.13	For Apollo Domain/OS
Xconf/s-aux1-1.h           22	For A/UX 1.1
Xconf/s-bsd4-2.h           20	For 4.2 BSD and Ultrix systems
Xconf/s-bsd4-3.h           22	For 4.3 BSD systems
Xconf/s-dnix5-2.h          22	For dnix 5.2 on DIAB DS90.
Xconf/s-dnix5-3.h          22	For dnix 5.3 on DIAB DS90.
Xconf/s-dynix3-0.h         22	For Dynix 3.0 on Symmetry.
Xconf/s-fortune.h          19	For Fortune 32:16 [read comments in the file]
Xconf/s-hpux.h              6	For HPUX (series 300)
Xconf/s-hpux2-1.h          22	For HPUX 2.1 (series 800)
Xconf/s-hpux3-0.h          22	For HPUX 3.0 (series 800)
Xconf/s-hpux6-5.h          21	For HPUX 6.5 or newer (series 300)
Xconf/s-pyramid.h          22	For Pyramid (and Targon 35).
Xconf/s-sgi4D.h            21	For IRIX 3.1/3.2 [read comments in the file]
Xconf/s-sunos3.h           22	For SunOS 3
Xconf/s-sunos4-0.h         22	For SunOS 4.0
Xconf/s-sys5-tcap.h        22	For system V using termcap.
Xconf/s-sys5.h             20	For most system V based systems.
Xconf/s-template.h         19	Template for new system files.
Xconf/s-texas1500.h        22	For Texas Instruments System 1500.
Xconf/s-tower32.h          22	For NCR tower
Xconf/s-umipsb.h           19	For Mips w/riscos 4.0 or greater
Xconf/s-uport2-2.h         22	For Microport UNIX V.2
Xconf/s-usg3-1.h           22	For most system V systems (obsolete)
Xconf/s-xenix386.h         21	For xenix386 [termcap version].
Xconf/s-xenix386ds.h       22	For Xenix386 2.3.2 w/development system.
Xconf/s-NeXT1-0.h         P14	For NeXT 1.0
Xconf/s-hpux7-0.h         P14	For HPUX 7.0
Xconf/s-ix386.h           P14	For Interactive UNIX on 386.
Xconf/s-ptx1-1.h          P14	For Dynix/PTX on symmetry.
Xconf/s-scoV386.h         P14	For SCO UNIX V on 386.
Xconf/s-sinix.h           P14	For Siemens SINIX
Xconf/s-sunos4-v.h        P14	For SunOS 4.1 SysV environment
Xconf/s-sysV88.h          P14	For Motorola System V/88 Release 3.
Xconf/s-ultrix.h          P14	For ULTRIX systems (4.2 based)
Xconf/s-umipsb4-5.h       P14	For Riscos 4.5 and later
Xconf/s-uts2-0.h          P14	For Amdahl UTS 2.0
Xconf/s-xenix286.h        P14	For SCO Xenix 2.2.1 (286) -- terminfo
Xconf/s-xenix286b.h       P14	For SCO Xenix 286 -- termcap
Xconf/s-xenix68k.h        P14	For Tandy 68000/Xenix 3.2
Xconfig.h-dist             17	CONFIGURATION FILE, DISTRIBUTED VERSION
Xcontrib                    1	Directory for contributed software
Xcontrib/aspell            20	Ispell front-end written in perl
Xcontrib/cn                22	Checknews w/multi-column output
Xcontrib/recmail.c         18	Sample recmail program
Xcontrib/recmail.sh        18	Sample recmail script
Xcvt-help.c                22	Convertion utility for help files
Xdata.h                    15	Internal article and group information
Xdb.c                      13	Database access and update routines
Xdb.h                      20	External database format
Xdebug.h                   22	Debugging symbols
Xdecode.c                  17	UUdecode engine
Xdigest.c                  17	Digest splitting
Xdir.c                     19	Directory access
Xdir.h                     22	Include file for directory access
Xdoc                        1	Directory for documentation files
Xdoc/INSTALLATION           9	INSTALLATION AND CONFIGURATION
Xdoc/NEWS-6.3              18	What's new in release 6.3
Xdoc/NEWS-6.4              16	What's new in release 6.4
Xdoc/NNTP                  16	INSTALLATION WITH NNTP or NFS
Xdoc/PROBLEMS              15	KNOWN PROBLEMS AND SOLUTIONS
Xdoc/RELEASE_NOTES         20	Known problems
Xexecute.c                 19	Shell command execution
Xexpire.c                  15	Database expiration
Xfolder.c                  13	Folder menu and file name expansion
Xformat.awk                21	Nroff -man formatter in awk
Xfullname.c                20	Extract full name from /etc/passwd
Xglobal.c                   4	Global routines
Xglobal.h                  19	Global include file
Xgroup.c                   10	Group menu, group overview, and goto-group
Xhelp                       1	Directory for online help files
Xhelp/adm.upgrade1         22	Start-up message 1
Xhelp/adm.upgrade2         22	Start-up message 2
Xhelp/adm.upgrade3         22	Start-up message 3
Xhelp/adm.upgrade4         22	Start-up message 4
Xhelp/adm.welcome          22	New user welcome message
Xhelp/help.attr            22	Help on attributes
Xhelp/help.commands        20	Help on commands
Xhelp/help.extended        21	Help on : commands
Xhelp/help.help            22	Help on help
Xhelp/help.map             21	Help on key mapping
Xhelp/help.menu            21	? in selection mode
Xhelp/help.more            21	? in reading mode
Xhelp/help.read            12	Help on reading mode
Xhelp/help.set             22	Help on :set commands
Xhelp/help.show            22	Help on :show commands
Xhelp/help.sort            21	Help on menu ordering
Xhelp/help.variables        2	Help on variables
Xhostname.c                20	Generic gethostname() function
Xinews                      1	Directory for NNTP 1.5.7 mini-inews
Xinews/Makefile            19	mini-inews makefile
Xinews/Manifest            22	mini-inews manifest
Xinews/README              21	mini-inews read me 2nd
Xinews/README.NN           19	mini-inews read me 1st
Xinews/clientlib.c         16	mini-inews source
Xinews/clientlib.h         22	mini-inews source
Xinews/conf.h              20	mini-inews configuration file
Xinews/inews.c             12	mini-inews source
Xinews/nntp.h              20	mini-inews source
Xinews/version.c           22	mini-inews source
Xinit.c                    11	Init file and extended command parsing
Xinit.sample               20	Sample init file
Xinst.sh                   18	Installation script
Xkeymap.c                   6	Key mapping and command names
Xkeymap.h                  19	Key and command names
Xkill.c                    11	Kill compilation and processing
Xmacro.c                   14	Macro compilation and execution
Xman                        1	Directory for user manuals
Xman/nn.1.A                 2	nn manual (for users) - part 1
Xman/nn.1.B                 7	nn manual (for users) - part 2
Xman/nn.1.C                 3	nn manual (for users) - part 3
Xman/nn.1.D                 4	nn manual (for users) - part 4
Xman/nnacct.1m              9	nnacct manual (for sysadm)
Xman/nnadmin.1m             8	nnadmin manual (for sysadm)
Xman/nncheck.1             20	nncheck manual (for users)
Xman/nngoback.1            19	nngoback manual (for users)
Xman/nngrab.1               5	nngrab manual (for users)
Xman/nngrep.1              20	nngrep manual (for users)
Xman/nnmaster.8            13	nnmaster manual (for sysadm)
Xman/nnpost.1              21	nnpost manual (for users)
Xman/nnspew.8              21	nnspew manual (for sysadm)
Xman/nnstats.1m            21	nnstats manual (for sysadm)
Xman/nntidy.1              21	nntidy manual (for users)
Xman/nnusage.1m            21	nnusage manual (for sysadm)
Xmaster.c                   7	Database manager (nnmaster)
Xmatch.c                   20	String/regexp matching
Xmenu.c                     6	Article selection menu
Xmenu.h                    21	Return values from various modes
Xmore.c                     9	Pager (reading mode)
Xnews.c                    18	Parsing of news article headers
Xnews.h                    21	Article header information
Xnewsrc.c                   5	Access and update .newsrc
Xnn.c                      14	nn main program
Xnngrab.sh                 22	Quick subject search
Xnnmail.c                  21	Primitive mailer w/domain addressing
Xnnspew.sh                 22	Subject database generator (for nngrab)
Xnnstats.sh                20	Collection and Expiration reports
Xnntp.c                    10	NNTP interface library
Xnntp.h                    20	NNTP response codes
Xnnusage.sh                22	Usage statistics
Xoptions.c                 19	Option parsing (much better than getopt!)
Xoptions.h                 21	Header file for option parsing
Xpack_date.c               19	Timestamp generation
Xpack_name.c                3	Pack sender names
Xpack_subject.c            21	Pack subject lines
Xpatchlevel.h               8	Patch level and history
Xprefix.c                  16	Generate prefix for scripts.
Xproto.c                   19	Locking and message passing
Xproto.h                   21	Include file for proto routines
Xregexp.c                   8	Regular expression compile and exec
Xregexp.h                   1	Include file for regexp usage
Xreroute.c                 18	Mail address parsing and rewrite
Xroutes.sample             21	Sample configuration file for nnmail
Xsave.c                    15	Article saving, unpacking, etc.
Xsequence.c                 5	Group presentation sequence parser
Xsort.c                    11	Article menu ordering
Xterm.c                     1	Terminal interface library
Xterm.h                    21	Include file for terminal interface
Xunshar.c                  18	Unshar pre-processor
Xupgrade_rc.sh             22	.nn/rc to .newsrc converter
Xusercheck.c               22	Check uid during installation
Xvararg.h                  21	Faked and real varargs.h encapsulation
Xvariable.c                12	Variable management
Xxmakefile                 18	Skeleton for ymakefile
SHAR_EOF
# ============= Makefile ==============
echo "x - extracting Makefile (Text)"
sed 's/^X//' << 'SHAR_EOF' > Makefile &&
X#
X# Makefile for nn release 6.4
X#
X# Specify your favourite compiler, preprocessor, and compiler flags:
X#
X# Some alternatives for CPP might be /lib/cpp and $(CC) -P
X# Common values for CFLAGS are '-O -s' or '-g'
X#
X
XCC =		gcc
XCPP =		cc -E
XCFLAGS =	-O2
XMAKE =		make
X
X#
X# Before compiling, read the instructions in the file INSTALLATION!
X# -----------------------------------------------------------------
X#
X#	make all	compile programs
X#	make clean	remove all make'd files from source directory
X#
X# no changes are needed below this line
X#
X
XSHELL = /bin/sh
X
Xall: ymakefile
X	$(MAKE) $(MFLAGS) -f ymakefile all
X
Xtouch: ymakefile
X	$(MAKE) -f ymakefile -t all
X
Xdbg: ymakefile
X	$(MAKE) $(MFLAGS) -f ymakefile nn1
X
Xnn: ymakefile
X	$(MAKE) $(MFLAGS) -f ymakefile nn
X
Xmaster: ymakefile
X	$(MAKE) $(MFLAGS) -f ymakefile master
X
Xlint: ymakefile
X	$(MAKE) -f ymakefile lint
X
Xclient: ymakefile
X	$(MAKE) $(MFLAGS) -f ymakefile client
X
Xymakefile: Makefile xmakefile config.h
X	cp xmakefile MF.c
X	$(CPP) -DCOMPILER="$(CC)" -DPREPROC="$(CPP)" \
X	       -DLDEBUG="$(LDFLAGS)" \
X	       -DCDEBUG="$(CFLAGS)" -Iconf MF.c | \
X	sed -e '1,/MAKE WILL CUT HERE/d' \
X	    -e '/^#/d' \
X	    -e '/^[ \f	]$$/d' \
X	    -e '/^[ \/]*[*]/d' | \
X	sed -n -e '/^..*$$/p' > ymakefile
X	rm -f MF.c
X
X#
X# clean up
X#	Will remove object and executeable files.
X#
X
Xclean:	ymakefile
X	make -f ymakefile clean
X	rm -f *.o *~ ymakefile
X
X#
X# distribution
X#
X
Xdistrib: man/nn.1.D
X	[ -d DIST ] || mkdir DIST
X	rm DIST/Part.*
X	makekit -m -k30 -s55000 -nDIST/Part.
X
Xtar: man/nn.1.D
X	chmod +x FILES
X	rm -f /tmp/nn64tar*
X	tar cf /tmp/nn64tar `FILES`
X	cd /tmp && compress nn64tar
X
Xsplit: tar
X	rm -f /tmp/nn64z*
X	cd /tmp && bsplit -b40000 -pnn64z -v < nn64tar.Z
X
Xman/nn.1.D: man/nn.1
X	sh SPLITNN1
X	
SHAR_EOF
# ============= Patch.Result ==============
echo "x - extracting Patch.Result (Text)"
sed 's/^X//' << 'SHAR_EOF' > Patch.Result &&
XHmm...  Looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|
X|	     This is an official patch to nn release 6.4
X|	     -------------------------------------------
X|
X|			       PATCH #11
X|
X|			    Priority: HIGH
X|
X|
X|This patch fixes a syntax error introduced in patch #10 which causes
X|term.c not to compile on some systems.  It also fixes a nasty bug in
X|the article header sorting which could provoke a crash in qsort;
X|unfortunately the fix involves changing the interpretation of the
X|subject-match-limit variable:
X|
X|===================================================================
X|
X|The subject-match-limit variable is now a simple compare only first
X|"length" characters limit whereas before it was only used if one
X|subject was a true suffix of another subject.  Unfortunately, the old
X|interpretation made the sorting non-deterministic and it could cause
X|qsort() to crash.  The default value is now changed to 256 effectively
X|disabling the match-limit unless explicitly set to a lower limit.
X|
X|Thanks to Paul Eggert for a detailed analysis on this problem.
X|
X|===================================================================
X|
X|This patch also changes the splitting of folders in a way which is not
X|backwards compatible:  When splitting a folder (e.g. G +folder), nn
X|will now determine the format of the folder (mail, mmdf, standard)
X|from the *first* article in the folder, and the rest of the folder is
X|split according to this format.  (Thanks to Bernd Wechner for a lot of
X|patches to the folder and digest code).
X|
X|This may cause problems with current folders which are a mixture of
X|different formats; such folders must be manually reformatted to use
X|only a single format.
X|
X|To ensure that folders are used properly, the save-full and save-short
X|commands will now append articles to an existing folder using the
X|current format of the folder (determined from the first article).
X|Consequently, the mmdf-format and mail-format variables are now only
X|used to determine the type to use for new folders.
X|
X|===================================================================
X|
X|Notice: Updates to the manual for the new features are postponed to
X|the next patch to keep this patch at a reasonable size.
X|
X|As usual, all changes are described in the updated RELEASE_NOTES file
X|(read that for more details about this patch).  Thanks to all who
X|reported bugs and provided fixes.
X|
X|To apply this patch, use nn's :patch command, or run this command from
X|the shell in the root of the nn source tree:
X|	patch -p0 < this-article
X|
X|Then run "make all" and "./inst u".
X|
X|++Kim Storm
X|
X|===================================================================
X|
X|*** ./LAST/admin.c	Tue Sep 18 12:44:49 1990
X|--- admin.c	Wed Sep 19 18:40:59 1990
X--------------------------
XPatching file admin.c using Plan A...
XHunk #1 succeeded at 781.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/aux.sh	Mon Jul  9 17:59:52 1990
X|--- aux.sh	Tue Sep 25 16:08:24 1990
X--------------------------
XPatching file aux.sh using Plan A...
XHunk #1 succeeded at 334.
XHunk #2 succeeded at 344.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/conf/m-symmetry.h	Sat Mar 31 23:12:50 1990
X|--- conf/m-symmetry.h	Thu Aug 23 11:41:47 1990
X--------------------------
XPatching file conf/m-symmetry.h using Plan A...
XHunk #1 succeeded at 20.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/conf/s-pyramid.h	Sat Mar 31 23:13:02 1990
X|--- conf/s-pyramid.h	Mon Sep 24 13:14:00 1990
X--------------------------
XPatching file conf/s-pyramid.h using Plan A...
XHunk #1 succeeded at 9.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/db.c	Tue Sep 18 12:44:53 1990
X|--- db.c	Thu Sep 20 18:01:05 1990
X--------------------------
XPatching file db.c using Plan A...
XHunk #1 succeeded at 22.
XHunk #2 succeeded at 99.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/digest.c	Thu Jul 19 18:12:10 1990
X|--- digest.c	Fri Oct  5 18:12:35 1990
X--------------------------
XPatching file digest.c using Plan A...
XHunk #1 succeeded at 2.
XHunk #2 succeeded at 12.
XHunk #3 succeeded at 55.
XHunk #4 succeeded at 320.
XHunk #5 succeeded at 338.
XHunk #6 succeeded at 389.
XHunk #7 succeeded at 453.
XHunk #8 succeeded at 468.
XHunk #9 succeeded at 482.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/doc/RELEASE_NOTES	Tue Sep 18 12:44:55 1990
X|--- doc/RELEASE_NOTES	Thu Oct  4 23:05:05 1990
X--------------------------
XPatching file doc/RELEASE_NOTES using Plan A...
XHunk #1 succeeded at 1163.
XHunk #2 succeeded at 1572.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/folder.c	Mon Jul 16 17:38:41 1990
X|--- folder.c	Sat Sep 29 01:26:59 1990
X--------------------------
XPatching file folder.c using Plan A...
XHunk #1 succeeded at 10.
XHunk #2 succeeded at 66.
XHunk #3 succeeded at 98.
XHunk #4 succeeded at 225.
XHunk #5 succeeded at 326.
XHunk #6 succeeded at 351.
XHunk #7 succeeded at 396.
XHunk #8 succeeded at 429.
XHunk #9 succeeded at 441.
XHunk #10 succeeded at 464.
XHunk #11 succeeded at 473.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/global.c	Tue Sep 18 12:44:57 1990
X|--- global.c	Fri Oct  5 18:23:21 1990
X--------------------------
XPatching file global.c using Plan A...
XHunk #1 succeeded at 39.
XHunk #2 succeeded at 361.
XHunk #3 succeeded at 477.
XHunk #4 succeeded at 524.
XHunk #5 succeeded at 664.
XHunk #6 succeeded at 675.
XHunk #7 succeeded at 707.
XHunk #8 succeeded at 724.
XHunk #9 succeeded at 948.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/group.c	Tue Sep 18 12:44:59 1990
X|--- group.c	Mon Sep 24 13:13:59 1990
X--------------------------
XPatching file group.c using Plan A...
XHunk #1 succeeded at 686.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/init.c	Thu Jul 19 18:12:14 1990
X|--- init.c	Thu Oct  4 19:04:47 1990
X--------------------------
XPatching file init.c using Plan A...
XHunk #1 succeeded at 178.
XHunk #2 succeeded at 244.
XHunk #3 succeeded at 912.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/man/nn.1.C	Tue Sep 18 12:45:06 1990
X|--- man/nn.1.C	Fri Oct  5 18:43:05 1990
X--------------------------
XPatching file man/nn.1.C using Plan A...
XHunk #1 succeeded at 1101.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/more.c	Tue Sep 18 12:45:08 1990
X|--- more.c	Thu Sep 20 22:05:48 1990
X--------------------------
XPatching file more.c using Plan A...
XHunk #1 succeeded at 1038.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/news.c	Thu Jul 19 18:12:20 1990
X|--- news.c	Thu Sep 27 20:27:34 1990
X--------------------------
XPatching file news.c using Plan A...
XHunk #1 succeeded at 55.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/newsrc.c	Tue Sep 18 12:45:09 1990
X|--- newsrc.c	Thu Oct  4 22:30:46 1990
X--------------------------
XPatching file newsrc.c using Plan A...
XHunk #1 succeeded at 26.
XHunk #2 succeeded at 338.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/nntp.c	Thu Jul 19 18:12:21 1990
X|--- nntp.c	Fri Oct  5 18:23:22 1990
X--------------------------
XPatching file nntp.c using Plan A...
XHunk #1 succeeded at 47.
XHunk #2 succeeded at 62.
XHunk #3 succeeded at 259.
XHunk #4 succeeded at 279.
XHunk #5 succeeded at 302.
XHunk #6 succeeded at 316.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/patchlevel.h	Tue Sep 18 12:45:13 1990
X|--- patchlevel.h	Thu Oct  4 23:12:18 1990
X--------------------------
XPatching file patchlevel.h using Plan A...
XHunk #1 succeeded at 21.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/save.c	Tue Sep 18 12:45:14 1990
X|--- save.c	Mon Oct  1 17:15:46 1990
X--------------------------
XPatching file save.c using Plan A...
XHunk #1 succeeded at 22.
XHunk #2 succeeded at 48.
XHunk #3 succeeded at 154.
XHunk #4 succeeded at 504.
XHunk #5 succeeded at 647.
XHunk #6 succeeded at 668.
XHunk #7 succeeded at 696.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/sequence.c	Tue Sep 18 12:45:14 1990
X|--- sequence.c	Wed Sep 19 18:40:55 1990
X--------------------------
XPatching file sequence.c using Plan A...
XHunk #1 succeeded at 669.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/sort.c	Tue Sep 18 12:45:15 1990
X|--- sort.c	Thu Oct  4 22:27:30 1990
X--------------------------
XPatching file sort.c using Plan A...
XHunk #1 succeeded at 9.
XHunk #2 succeeded at 87.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/term.c	Tue Sep 18 12:45:16 1990
X|--- term.c	Tue Sep 18 15:33:39 1990
X--------------------------
XPatching file term.c using Plan A...
XHunk #1 succeeded at 825.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/variable.c	Tue Sep 18 12:45:17 1990
X|--- variable.c	Thu Oct  4 23:12:16 1990
X--------------------------
XPatching file variable.c using Plan A...
XHunk #1 succeeded at 11.
XHunk #2 succeeded at 27.
XHunk #3 succeeded at 62.
XHunk #4 succeeded at 84.
XHunk #5 succeeded at 169.
XHunk #6 succeeded at 207.
XHunk #7 succeeded at 240.
XHunk #8 succeeded at 282.
XHunk #9 succeeded at 296.
XHunk #10 succeeded at 389.
XHunk #11 succeeded at 511.
XHunk #12 succeeded at 551.
XHunk #13 succeeded at 698.
XHunk #14 succeeded at 718.
XHunk #15 succeeded at 936.
XHunk #16 succeeded at 995.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/xmakefile	Tue Jun 12 11:47:04 1990
X|--- xmakefile	Wed Aug 22 20:16:40 1990
X--------------------------
XPatching file xmakefile using Plan A...
XHunk #1 succeeded at 24.
XHunk #2 succeeded at 62.
XHunk #3 succeeded at 94.
XHunk #4 succeeded at 121.
XHunk #5 succeeded at 134.
XHmm...  Ignoring the trailing garbage.
Xdone
XHmm...  Looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|
X|	     This is an official patch to nn release 6.4
X|	     -------------------------------------------
X|
X|			       PATCH #12
X|
X|			    Priority: LOW
X|
X|
X|This patch contains mainly updates to the documentation for the
X|new features introduced in previous patches, but a number of minor bugs
X|have been fixed and some new features related to the init files have
X|been introduced.
X|
X|As usual, all changes are described in the updated RELEASE_NOTES file
X|(read that for more details about this patch).  Thanks to all who
X|reported bugs and provided fixes.
X|
X|To apply this patch, use nn's :patch command, or run this command from
X|the shell in the root of the nn source tree:
X|	patch -p0 < this-article
X|
X|Then run "make all" and "./inst u".
X|
X|++Kim Storm
X|
X|===================================================================
X|
X|*** ./LAST/SPLITNN1	Tue Apr 24 17:13:08 1990
X|--- SPLITNN1	Fri Nov  2 20:54:16 1990
X--------------------------
XPatching file SPLITNN1 using Plan A...
XHunk #1 succeeded at 1.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/admin.c	Fri Oct  5 19:07:02 1990
X|--- admin.c	Thu Nov  1 20:40:38 1990
X--------------------------
XPatching file admin.c using Plan A...
XHunk #1 succeeded at 58.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/answer.c	Tue Sep 18 12:44:50 1990
X|--- answer.c	Tue Nov  6 17:55:29 1990
X--------------------------
XPatching file answer.c using Plan A...
XHunk #1 succeeded at 422.
XHunk #2 succeeded at 893.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/aux.sh	Fri Oct  5 19:07:02 1990
X|--- aux.sh	Wed Oct 31 13:07:50 1990
X--------------------------
XPatching file aux.sh using Plan A...
XHunk #1 succeeded at 208.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/conf/m-i80386.h	Sat Mar 31 23:12:49 1990
X|--- conf/m-i80386.h	Sat Nov  3 00:27:14 1990
X--------------------------
XPatching file conf/m-i80386.h using Plan A...
XHunk #1 succeeded at 16.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/db.c	Fri Oct  5 19:07:04 1990
X|--- db.c	Wed Nov  7 12:29:18 1990
X--------------------------
XPatching file db.c using Plan A...
XHunk #1 succeeded at 979.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/doc/RELEASE_NOTES	Fri Oct  5 19:07:07 1990
X|--- doc/RELEASE_NOTES	Tue Nov  6 17:55:27 1990
X--------------------------
XPatching file doc/RELEASE_NOTES using Plan A...
XHunk #1 succeeded at 1225.
XHunk #2 succeeded at 1735.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/execute.c	Mon Jun 25 15:46:39 1990
X|--- execute.c	Thu Nov  1 20:40:37 1990
X--------------------------
XPatching file execute.c using Plan A...
XHunk #1 succeeded at 11.
XHunk #2 succeeded at 91.
XHunk #3 succeeded at 111.
XHunk #4 succeeded at 138.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/global.c	Fri Oct  5 19:07:09 1990
X|--- global.c	Wed Oct 31 23:24:29 1990
X--------------------------
XPatching file global.c using Plan A...
XHunk #1 succeeded at 48.
XHunk #2 succeeded at 672.
XHunk #3 succeeded at 746.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/group.c	Fri Oct  5 19:07:10 1990
X|--- group.c	Fri Nov  2 19:39:20 1990
X--------------------------
XPatching file group.c using Plan A...
XHunk #1 succeeded at 188.
XHunk #2 succeeded at 358.
XHunk #3 succeeded at 738.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/init.c	Fri Oct  5 19:07:10 1990
X|--- init.c	Fri Nov  2 23:29:58 1990
X--------------------------
XPatching file init.c using Plan A...
XHunk #1 succeeded at 122.
XHunk #2 succeeded at 143.
XHunk #3 succeeded at 157.
XHunk #4 succeeded at 325.
XHunk #5 succeeded at 761.
XHunk #6 succeeded at 914.
XHunk #7 succeeded at 926.
XHunk #8 succeeded at 944.
XHunk #9 succeeded at 1076.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/keymap.c	Thu Jul 19 18:12:15 1990
X|--- keymap.c	Mon Oct 15 13:33:46 1990
X--------------------------
XPatching file keymap.c using Plan A...
XHunk #1 succeeded at 478.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/macro.c	Thu Jul 19 18:12:15 1990
X|--- macro.c	Thu Nov  1 21:06:01 1990
X--------------------------
XPatching file macro.c using Plan A...
XHunk #1 succeeded at 6.
XHunk #2 succeeded at 473.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/man/nn.1.A	Tue Sep 18 12:45:02 1990
X|--- man/nn.1.A	Wed Nov  7 12:29:49 1990
X--------------------------
XPatching file man/nn.1.A using Plan A...
XHunk #1 succeeded at 1111.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/man/nn.1.B	Tue Sep 18 12:45:05 1990
X|--- man/nn.1.B	Wed Nov  7 12:29:49 1990
X--------------------------
XPatching file man/nn.1.B using Plan A...
XHunk #1 succeeded at 29.
XHunk #2 succeeded at 158.
XHunk #3 succeeded at 192.
XHunk #4 succeeded at 249.
XHunk #5 succeeded at 721.
XHunk #6 succeeded at 797.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/man/nn.1.C	Fri Oct  5 19:07:12 1990
X|--- man/nn.1.C	Wed Nov  7 12:29:49 1990
X--------------------------
XPatching file man/nn.1.C using Plan A...
XHunk #1 succeeded at 137.
XHunk #2 succeeded at 162.
XHunk #3 succeeded at 256.
XHunk #4 succeeded at 279.
XHunk #5 succeeded at 408.
XHunk #6 succeeded at 471.
XHunk #7 succeeded at 532.
XHunk #8 succeeded at 643.
XHunk #9 succeeded at 674.
XHunk #10 succeeded at 719.
XHunk #11 succeeded at 801.
XHunk #12 succeeded at 926.
XHunk #13 succeeded at 1286.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/man/nn.1.D	Thu Jul 19 18:12:17 1990
X|--- man/nn.1.D	Wed Nov  7 12:29:49 1990
X--------------------------
XPatching file man/nn.1.D using Plan A...
XHunk #1 succeeded at 164.
XHunk #2 succeeded at 175.
XHunk #3 succeeded at 411.
XHunk #4 succeeded at 656.
XHunk #5 succeeded at 801.
XHunk #6 succeeded at 850.
XHunk #7 succeeded at 890.
XHunk #8 succeeded at 978.
XHunk #9 succeeded at 1096.
XHunk #10 succeeded at 1473.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/man/nnmaster.8	Mon Jun 25 15:46:47 1990
X|--- man/nnmaster.8	Wed Oct 31 22:22:12 1990
X--------------------------
XPatching file man/nnmaster.8 using Plan A...
XHunk #1 succeeded at 180.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/master.c	Tue Sep 18 12:45:07 1990
X|--- master.c	Wed Oct 31 23:24:29 1990
X--------------------------
XPatching file master.c using Plan A...
XHunk #1 succeeded at 60.
XHunk #2 succeeded at 128.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/more.c	Fri Oct  5 19:07:13 1990
X|--- more.c	Fri Nov  2 17:38:05 1990
X--------------------------
XPatching file more.c using Plan A...
XHunk #1 succeeded at 768.
XHunk #2 succeeded at 858.
XHunk #3 succeeded at 879.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/newsrc.c	Fri Oct  5 19:07:16 1990
X|--- newsrc.c	Mon Nov  5 15:59:30 1990
X--------------------------
XPatching file newsrc.c using Plan A...
XHunk #1 succeeded at 236.
XHunk #2 succeeded at 343.
XHunk #3 succeeded at 1000.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/nn.c	Tue Sep 18 12:45:10 1990
X|--- nn.c	Mon Nov  5 18:27:06 1990
X--------------------------
XPatching file nn.c using Plan A...
XHunk #1 succeeded at 151.
XHunk #2 succeeded at 214.
XHunk #3 succeeded at 221.
XHunk #4 succeeded at 258.
XHunk #5 succeeded at 293.
XHunk #6 succeeded at 301.
XHunk #7 succeeded at 331.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/nntp.c	Fri Oct  5 19:07:16 1990
X|--- nntp.c	Sat Nov  3 00:43:29 1990
X--------------------------
XPatching file nntp.c using Plan A...
XHunk #1 succeeded at 460.
XHunk #2 succeeded at 471.
XHunk #3 succeeded at 497.
XHunk #4 succeeded at 828.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/patchlevel.h	Fri Oct  5 19:07:17 1990
X|--- patchlevel.h	Tue Nov  6 17:55:28 1990
X--------------------------
XPatching file patchlevel.h using Plan A...
XHunk #1 succeeded at 22.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/variable.c	Fri Oct  5 19:07:21 1990
X|--- variable.c	Mon Nov  5 16:17:39 1990
X--------------------------
XPatching file variable.c using Plan A...
XHunk #1 succeeded at 8.
XHunk #2 succeeded at 130.
XHunk #3 succeeded at 325.
XHunk #4 succeeded at 1194.
XHmm...  The next patch looks like a new-style context diff to me...
XThe text leading up to this was:
X--------------------------
X|*** ./LAST/xmakefile	Fri Oct  5 19:07:22 1990
X|--- xmakefile	Fri Nov  2 20:54:15 1990
X--------------------------
XPatching file xmakefile using Plan A...
XHunk #1 succeeded at 150.
XHunk #2 succeeded at 179.
XHmm...  Ignoring the trailing garbage.
Xdone
SHAR_EOF
# ============= README ==============
echo "x - extracting README (Text)"
sed 's/^X//' << 'SHAR_EOF' > README &&
X			  INTRODUCTION TO NN
X			  ------------------
X
X			     RELEASE 6.4
X
X
Xnn is a menu based (point and shoot) netnews reader with a complete
Xset of features to satisfy both the expert and the novice user.  Since
Xits first release in Denmark in 1984 (!), in Europe in 1988, and the
Xglobal release in June 1989, it has replaced rn and other well-known
Xnews readers at many sites.
X
XSome of the key features of nn are:
X
X *  Menu-based article selection prior to reading the articles
X    with the articles sorted according to subject & posting time!
X
X    This significantly reduces the time spent on news reading.
X    No keystorkes are wasted on articles you don't want to read, and
X    only the articles selected on the menu will be read.
X
X *  Release 6.4 uses standard .newsrc, and can leave individual
X    articles unread!
X
X *  Digests are automatically split and presented as ordinary articles!
X    You can transparently save and respond to individual subarticles.
X
X *  Full folder support: read, save, and delete individual articles.
X
X *  Online help and manual.
X
X *  Built-in unshar and patch functions.
X
X *  Built-in uudecode function which will automatically unpack,
X    concatenate, and decode multi-part postings.
X
X *  Easy remapping of keys with advanced macro definition features.
X
X *  Automatic kill & selection of articles based on subject or author.
X
X *  User specified presentation sequence of news groups based on the
X    news group hierarchy.
X
X *  Whole classes of news groups can easily be unsubscribed
X    permanently, e.g. talk.all and all.politics
X
X *  Related groups can be merged and presented as a single group, e.g.
X    comp.emancs and all gnu.emacs groups.
X
X *  Blindingly fast 'search for subject'.  On my Texas S1500 system,
X    nn uses less than 20 seconds to find all articles on a specific
X    subject among 64000 articles in all groups!
X
X *  News collection and presentation is extremely fast, because nn
X    uses its own database on top of the standard news system.
X
X *  In a distributed environment, the database can be shared among all
X    hosts on the network.  Only one daemon is needed on the news server
X    for all hosts.  This works in a heterogenous environment as well.
X
X *  NNTP is also supported (using a local database for speed).
X
XBecause of the database, nn starts almost equally fast (in a few
Xseconds), no matter whether you have 100 or 10000 unread articles!
XThe database takes up some disk space, but dramatically improves speed
Xand functionality.  The amount of disk space consumed is approx. 1Mb
Xper 10000 articles.
X
X
X			     DISTRIBUTION
X			     ------------
X
XThe package is posted as 22 separate shar archives on comp.sources.unix.
XIt is unpacked by applying /bin/sh to each archive in turn.
XEverything is a little more than 1 Mbyte, including documentation.
X
XIt is also available via anonymous ftp from
X
X	host: dkuug.dk (129.142.96.41)
X	File: /pub/nn6.4.tar.Z (compressed tar)
X
X
X			      COPYRIGHT
X			      ---------
X
XCopyright (c) 1989, 1990 by Kim Fabricius Storm.  All rights reserved.
X
XNot derived from licensed software except as stated below.
X
XPermission is granted to anyone to use, modify, and reuse this
Xsoftware for any purpose on any computer system, and to redistribute
Xit freely, subject to the following restrictions:
X
X1. The author is not responsible for the consequences of use of this
X   software, no matter how awful, even if they arise from defects in it.
X
X2. The origin of this software must not be misrepresented, either by
X   explicit claim or by omission.
X
X3. Altered versions must be plainly marked as such, and must not be
X   misrepresented as being the original software.
X
X
XThe following code modules have been incorporated into nn, and the
Xabove copyright notice does not apply to these modules; they include
Xtheir own copyright notices (or have none):
X
Xregexp.c:	Copyright (c) 1986 by University of Toronto.
X	 	Written by Henry Spencer.
X
Xunshar.c:	No copyright notice.
X		Written by K. Greer, S. Shafer, and M. Mauldin
X
Xdecode.c:	Derived from a modified Berkeley original posted on
X		USENET.
X
Xfullname.c:	Copyright (c) 1986 by Rick Adams.
X		Derived from the Bnews distribution.
X
Xcontrib/*:	Various copyright notices.
X		The software available in the contrib/ directory was sent
X		to me for inclusion in the nn distribution, because
X		the authors think it might be useful to other nn users.
X		I have included it *as is*.
X
Xinews/*:	NNTP 1.5 mini-inews.  Copyrights for NNTP applies.
X		The software in the inews/ directory is a stand-alone
X		version of the NNTP 1.5.7 mini-inews which has been
X		slightly changed to ease configuration when used with nn.
X
XVarious pieces of code which may have their own copyright notices are
Xincluded in the contrib/ and inews/ directories.  This software has been
Xsent to me in the hope that it will be useful to somebody else.  I
Xhave included it in this spirit, but I take no responsibilities for
Xthis software, and I have no intentions to support it.
X
X
X			     INSTALLATION
X			     ------------
X
XThe following files are contained in the `doc' subdirectory:
X
XThe installation procedure is described in the file INSTALLATION.
X
XYou may also find useful information in the files PROBLEMS and NNTP.
X
XThe file NEWS-6.3 describes the major changes from release 6.1 to 6.3.
X
XThe file NEWS-6.4 describes the major changes from release 6.3 to 6.4.
X
X
X		     BUG REPORTS and SUGGESTIONS
X		     ---------------------------
X
XPlease send bug reports (and fixes) to the following address:
X	nn-bugs@dkuug.dk
X
XYou may also use nn-bugs for suggestions for improvements (missing
Xfeatures in nn are considered to be bugs :-)
X
XThe easiest way to send a bug report is by using the :bug command in nn.
X
X
X		      NN HAS ITS OWN NEWS GROUP
X		      -------------------------
X
XWe have an unmoderated news group dedicated to nn: news.software.nn
X
XThe news.software.nn group is used for discussion on all subjects
Xrelated to the nn news reader.  This includes, but is not limited to,
Xquestions, answers, ideas, hints, information from the development
Xgroup, patches, etc.
X
XThe news.software.nn group was created in January 1990 after an
Xofficial vote.  It may still be missing on parts of the net, so if you
Xdon't get it please check your news feed, and help propagating the
Xnews group to the entire net.
X
X
X			   ACKNOWLEDGEMENTS
X			   ----------------
X
XSince the development of nn is now on its fifth year, numerous persons
Xhave contributed to nn with ideas and critisism, have helped me debug
Xthe software by patiently using alpha and beta versions, have provided
Xbug fixes, small and big chunks of code, new configuration files, etc.
X
XMy warm thanks go to Rene Seindal and Wayne Davison for their many
Xcontributions, to Lloyd W. Taylor for his efforts counting the
Xvotes for news.software.nn, and to Paul D. Anderson for running the
Xrelease 6.3 patch server.
X
XI also thank the following persons for their help and contributions:
XPeter Andersen, Jonathan Bayer, Gardner Cohen, Bernie Cosell, P{r
XEmanuelsson, Steven Grady, Miek Grenier, Scott Hankin, Kareth, Mike
XKhaw, Edwin Kremer, Jean-Francois Lamy, Mark Moraes, A. E. Mossberg,
XMark Nagel, Rich Salz, Steve Simmons, Wietse Z. Venema, James A.
XWoods, and Pim Zandbergen.
X
XAnd of course I would like to thank the hundreds of other people who
Xhave reported bugs, given suggestions, provided information, etc.
XForgive me for not listing all your names here, but I hope you
Xunderstand, and that you will continue to contribute your
Xvaluable input to the continued developments.  Let us keep nn in the
Xlead!
X
X
XKim Fabricius Storm
XTexas Instruments A/S, Denmark
X
XEmail: storm@texas.dk
XSnail: Marielundvej 46E, DK-2730 Herlev, Denmark
Xtel:   +45 42 91 7400      fax:   +45 42 91 8400
SHAR_EOF
# ============= SPLITNN1 ==============
echo "x - extracting SPLITNN1 (Text)"
sed 's/^X//' << 'SHAR_EOF' > SPLITNN1 &&
X# split nn.1 in 4 parts
Xcd man
X
Xif [ ! -f nn.1 ] ; then
X	echo "nn.1 missing: cannot split it!"
X	exit 1
Xfi
Xrm -f nn.1.[ABCD]
X
Xsed -n \
X-e '/BEGINPART A/,/ENDPART A/w nn.1.A' \
X-e '/BEGINPART B/,/ENDPART B/w nn.1.B' \
X-e '/BEGINPART C/,/ENDPART C/w nn.1.C' \
X-e '/BEGINPART D/,/ENDPART D/w nn.1.D' nn.1
X
X# dont have to 'make' it
Xtouch nn.1
SHAR_EOF
# ============= account.c ==============
echo "x - extracting account.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > account.c &&
X/*
X *	(c) Copyright 1990, Kim Fabricius Storm.  All rights reserved.
X *
X *	Accounting for news reading.
X *
X *	The nnacct program is called by nn it three cases:
X *
X *	- on startup (-q) to check for permission to run nn (at this time)
X *	- when the :cost command is executed (-cUSAGE -r) to
X *	  produce a "cost sofar" report, and
X *	- at exit (-uUSAGE -r) to add the USAGE to the user's account
X *	  and print a "cost" report.
X *
X *	It can also be invoked by nnusage to print a usage and cost
X *	report for the current user (default), or by the super user
X *	to produce a usage and cost report for all users.
X *
X *	Accumulated accounting information is saved in the file $DB/acct.
X *
X *	If ACCTLOG is defined, a sequential log is maintained in $DB/acctlog.
X *
X *	You can define a COST_PER_MINUTE and a COST_UNIT to make
X *	the user get a cost calculation (maybe just for the fun of it -
X *	you can't imagine how expensive it is to read news here :-).
X *
X *	The COST_PER_MINUTE should be the price per minute multiplied
X *	by 100 (to allow prices like $0.03/minute).
X *	The definitions below corresponds to 1 Kroner per minute.
X *
X *	If COST_PER_MINUTE is not defined (you can #undef it in config.h),
X *	a "Time used" rather than a "Cost" report is produced.
X */
X
X#define ACCTLOG			/* */
X#define COST_PER_MINUTE	100	/* price(in UNITs)/min * 100 */
X#define COST_UNIT		"Cr."	/* Currency */
X
X#include "config.h"
X#include "options.h"
X#include "proto.h"
X#include <errno.h>
X
Ximport char *db_directory;
X
X
X/*
X * 	local authorization policy checking
X *
X *	return/exit values of policy_check (nnacct -P0) are:
X *
X *	0: access granted
X *	1: access granted, but cannot post
X *	2: access denied (not authorized)
X *	3: access denied (not allowed at this time of day)
X *	4: access denied (quota exceeded)
X */
X
X#define DENY_ACCESS	0
X#define FREE_ACCOUNT	1
X#define ALL_HOURS	2
X#define OFF_HOURS	3
X
X#define NO_POST		40	/* add if cannot post */
X
X/*
X *	DEFAULT POLICY AND QUOTA FOR NEW USERS
X *
X *	Notice that QUOTA is measued in hours.
X *	Both ACCOUNTING and AUTHORIZATION must be defined for
X *	the quota mechanism to work.
X */
X
X#define DEFAULT_POLICY 	ALL_HOURS	/* all time w/accounting */
X#define DEFAULT_QUOTA 	0		/* unlimited use */
X
X#ifdef AUTHORIZE
X
X#include <time.h>
X
Xstatic holiday(tm)
Xstruct tm *tm;
X{
X    if (tm->tm_mon == 3 && tm->tm_mday == 23) return 1;	/* my birthday */
X    if (tm->tm_mon == 11 && tm->tm_mday == 25) return 1;	/* another birthday */
X    /* ... */
X    return 0;
X}
X
Xstatic policy_check(policy)
Xint policy;
X{
X    struct tm *tm, *localtime();
X    time_t t;
X    int no_post = 0;
X
X    if (policy >= NO_POST) {
X	policy -= NO_POST;
X	no_post = 1;
X    }
X    
X    switch (policy % 10) {
X     case DENY_ACCESS:
X	return 2;
X
X     case ALL_HOURS:
X     case FREE_ACCOUNT:
X	break;
X
X     case OFF_HOURS:	/* adapt this to your local requirements */
X	time(&t);
X	tm = localtime(&t);
X	if (tm->tm_wday == 0) break;	/* Sunday */
X	if (tm->tm_wday == 6) break;	/* Saturday */
X	if (tm->tm_hour < 9) break;	/* morning */
X	if (tm->tm_hour > 16) break;	/* evening */
X	if (holiday(tm)) break;		/* holidays */
X	/* etc. */
X	return 3;
X
X     default:
X	return 2;
X    }
X
X    return no_post;
X}
X
X#endif
X
Xstatic int add_usage = -1;
Xstatic int show_cost = -1;
Xstatic int report = 0;
Xstatic int report_all = 0;
Xstatic int quiet = 0;
Xstatic char *acct_file = NULL;
Xstatic int ck_policy = -1;
Xstatic int new_policy = -1;
Xstatic int new_quota = -1;
Xstatic int who_am_caller = I_AM_ACCT;
Xstatic char *zero_accounts = NULL;
X
XOption_Description(acct_options) {
X    'C', Int_Option(show_cost),
X    'U', Int_Option(add_usage),
X    'W', Int_Option(who_am_caller),
X    'P', Int_Option(ck_policy),
X    'a', Bool_Option(report_all),
X    'f', String_Option(acct_file),
X    'p', Int_Option(new_policy),
X    'q', Int_Option(new_quota),
X    'r', Bool_Option(report),
X    'Q', Bool_Option(quiet),
X    'Z', String_Option(zero_accounts),
X    '\0',
X};
X
X/*
X *	Accounting information:
X *
X *	xxxxxxx 00000000 00000000 00 00000\n
X *
X *	login	time used last	 pol quota
X *	name	(minutes) active icy (hours)
X *
X *	See the printf/scanf formats later on.
X */
X
X
X#define INPUT_FMT	"%s %ld %lx %d %d\n"
X#define OUTPUT_FMT	"%s %08ld %08lx %02d %05d\n"
X
Xstruct account {
X    off_t ac_offset;	/* offset in acct file */
X    int ac_found;	/* present in acct file */
X    
X    char ac_user[24];	/* user name */
X    
X    long ac_total;	/* total usage */
X    time_t ac_last;	/* last active */
X    int ac_policy;	/* assigned policy */
X    int ac_quota;	/* time quota */
X};
X
Xstatic get_entry(acctf, user, ac)
XFILE *acctf;
Xchar *user;
Xstruct account *ac;
X{
X    char line[100];
X
X    if (acctf != NULL && user != NULL) 
X	rewind(acctf);
X	
X    ac->ac_found = 0;
X
X    for (;;) {
X	ac->ac_policy = DEFAULT_POLICY;
X	ac->ac_last = 0;
X	ac->ac_total = 0;
X	ac->ac_quota = DEFAULT_QUOTA;
X	ac->ac_user[0] = NUL;
X    
X	if (acctf == NULL) break;
X	
X	ac->ac_offset = ftell(acctf);
X
X	if (fgets(line, 100, acctf) == NULL) break;
X
X	sscanf(line, INPUT_FMT, 
X		   ac->ac_user, &ac->ac_total, &ac->ac_last, 
X		   &ac->ac_policy, &ac->ac_quota);
X
X	if (user == NULL) return 1;
X
X	if (strcmp(user, ac->ac_user) == 0) {
X	    ac->ac_found = 1;
X	    return 1;
X	}
X    }
X
X    if (user != NULL) strcpy(ac->ac_user, user);
X    return 0;
X}
X
Xput_entry(acctf, ac)
XFILE *acctf;
Xstruct account *ac;
X{
X    if (ac->ac_found)
X	fseek(acctf, ac->ac_offset, 0);
X    else
X	fseek(acctf, (off_t)0, 2);
X    
X    fprintf(acctf, OUTPUT_FMT, 
X	    ac->ac_user, ac->ac_total, ac->ac_last,
X	    ac->ac_policy, ac->ac_quota);
X}
X
Xstatic do_cost(ac, ses)
Xstruct account *ac;
Xint ses;
X{
X    long r;
X    
X#ifdef COST_PER_MINUTE
X#ifndef COST_UNIT
X#define COST_UNIT ""
X#endif
X    if (ses >= 0)
X	printf("Cost this session: %ld %s   Period total:",
X	       ((long)ses * COST_PER_MINUTE) / 100, COST_UNIT);
X    printf("%6ld %s",
X	   (ac->ac_total * COST_PER_MINUTE) / 100, COST_UNIT);
X#else
X    printf("Time used this session: %d.%02d   Period total: %ld.%02ld",
X	   ses/60, ses%60, ac->ac_total/60, ac->ac_total%60);
X#endif
X    if (ses >= 0 && ac->ac_quota > 0) {
X	r = ac->ac_quota - ac->ac_total/60;
X	printf("  Quota: %ld hour%s", r, plural(r));
X    }
X    fl;
X}
X
Xstatic do_report(ac, hdr)
Xstruct account *ac;
Xint hdr;
X{
X    if (hdr) {
X	printf("USER        USAGE  QUOTA  LAST_ACTIVE");
X#ifdef COST_PER_MINUTE
X	printf("   COST/PERIOD");
X#endif
X#ifdef AUTHORIZE
X	printf("   POLICY");
X#endif
X	putchar(NL);
X    }
X
X    printf("%-8.8s  %4ld.%02ld  %5d  %-12.12s  ",
X	   ac->ac_user,
X	   ac->ac_total/60, ac->ac_total%60,
X	   ac->ac_quota,
X	   ac->ac_last ? date_time(ac->ac_last) : "");
X#ifdef COST_PER_MINUTE
X    do_cost(ac, -1);
X#endif
X#ifdef AUTHORIZE
X    printf("     %2d  ", ac->ac_policy);
X#endif
X    printf("\n");
X}
X
Xstatic do_report_all(acctf)
XFILE *acctf;
X{
X    struct account ac;
X    int first = 1;
X    
X    while (get_entry(acctf, (char *)NULL, &ac)) {
X	do_report(&ac, first);
X	first = 0;
X    }
X}
X
Xstatic char *ZERO_STAMP = "(Zeroed)";
X
Xstatic do_zero()
X{
X    FILE *old, *new;
X    char *acct, bak[FILENAME];
X    struct account ac;
X    extern int errno;
X
X    acct = relative(db_directory, "acct");
X    old = open_file(acct, OPEN_READ);
X    if (old == NULL) goto err;
X
X    sprintf(bak, "%s.old", acct);
X    if (unlink(bak) < 0 && errno != ENOENT) goto err;
X    if (link(acct, bak) < 0) goto err;
X    if (unlink(acct) < 0) {
X	unlink(bak);
X	goto err;
X    }
X
X    umask(0177);
X    new = open_file(acct, OPEN_CREATE);
X    if (new == NULL) goto err2;
X    ac.ac_found = 0;
X    strcpy(ac.ac_user, ZERO_STAMP);
X    ac.ac_total = ac.ac_policy = ac.ac_quota = 0;
X    time(&(ac.ac_last));
X    put_entry(new, &ac);
X    
X    while (get_entry(old, (char *)NULL, &ac)) {
X	if (strcmp(ac.ac_user, ZERO_STAMP) == 0) continue;
X	ac.ac_total = 0;
X	ac.ac_found = 0;
X	put_entry(new, &ac);
X    }
X    fclose(old);
X    if (fclose(new) == EOF) goto err2;
X    return;
X    
X err2:
X    unlink(acct);
X    if (link(bak, acct) == 0) unlink(bak);
X err:
X    fprintf(stderr, "ZERO of accounts failed -- check permissions etc.\n");
X}
X
Xstatic news_admin(caller)
Xchar *caller;
X{
X    FILE *adm;
X    char line[80];
X    int len, ok;
X
X    adm = open_file(relative(lib_directory, "admins"), OPEN_READ);
X    if (adm == NULL) return 2;
X    len = strlen(caller);
X    ok = 0;
X
X    while (fgets(line, 80, adm)) {
X	if (line[len] != NL) continue;
X	line[len] = NUL;
X	if (strcmp(caller, line) == 0) {
X	    ok = 1;
X	    break;
X	}
X    }
X    fclose(adm);
X    return ok;
X}
X
Xmain(argc, argv)
Xint argc;
Xchar *argv[];
X{
X    char *caller, *getlogin();
X    FILE *acctf;
X    char *fname;
X    int users, i;
X    struct account ac, *actab;
X    
X    who_am_i = I_AM_ACCT;
X
X    init_global();
X
X    users = parse_options(argc, argv, (char *)NULL, acct_options, "");
X
X    if (zero_accounts && strcmp(zero_accounts, "ERO")) {
X	fprintf(stderr, "Must specify -ZERO to clear accounts\n");
X	exit(1);
X    }
X
X    if (user_id != 0) {
X	caller = user_name();
X	if (news_admin(caller) == 1) goto caller_ok;
X
X	if (report_all) {
X	    fprintf(stderr, "Only root can request complete reports\n");
X	    exit(9);
X	}
X	if (new_policy >= 0) {
X	    fprintf(stderr, "Only root can change user authorization\n");
X	    exit(9);
X	}
X	if (new_quota >= 0) {
X	    fprintf(stderr, "Only root can change user quotas\n");
X	    exit(9);
X	}
X	if (zero_accounts) {
X	    fprintf(stderr, "Only root can zero user accounts\n");
X	    exit(9);
X	}
X	if (users > 0) {
X	    fprintf(stderr, "Only root can request reports for other users\n");
X	    exit(9);
X	}
X    } else
X	caller = "root";
X
X caller_ok:
X    if ((new_policy >= 0 || new_quota >= 0) && users == 0) {
X	fprintf(stderr, "usage: %s -pPOLICY -qQUOTA user...\n", argv[0]);
X	exit(1);
X    }
X    
X    if (add_usage == 0 && report) {
X	show_cost = 0;
X	add_usage = -1;
X    }
X
X    if (zero_accounts || add_usage > 0 || new_policy >= 0 || new_quota >= 0) {
X	if (acct_file) {
X	    fprintf(stderr, "Can only update current acct file\n", acct_file);
X	    exit(2);
X	}
X
X	proto_lock(I_AM_ACCT, PL_SET_QUICK);
X    }
X
X    if (zero_accounts) {
X	do_zero();
X	proto_lock(I_AM_ACCT, PL_CLEAR);
X	exit(0);
X    }
X
X    if (acct_file) {
X	if ((acctf = open_file(acct_file, OPEN_READ)) == NULL)
X	    acctf = open_file(relative(db_directory, acct_file), OPEN_READ);
X	if (acctf == NULL) {
X	    fprintf(stderr, "Accounting file %s not found\n", acct_file);
X	    if (add_usage > 0 || new_policy >= 0 || new_quota >= 0)
X		proto_lock(I_AM_ACCT, PL_CLEAR);
X	    exit(1);
X	}
X    } else {
X	fname = relative(db_directory, "acct");
X        acctf = open_file(fname, OPEN_READ);
X    }
X
X    if (report_all) {
X	do_report_all(acctf);
X	fclose(acctf);
X	exit(0);
X    }
X    
X    if (ck_policy >= 0) {
X#ifdef AUTHORIZE
X	get_entry(acctf, caller, &ac);
X#ifdef ACCOUNTING
X	if (ac.ac_quota > 0 && ac.ac_quota < ac.ac_total/60) exit(4);
X#endif
X	exit(policy_check(ac.ac_policy));
X#else
X	exit(0);
X#endif
X    }
X    
X    if (show_cost >= 0) {
X	get_entry(acctf, caller, &ac);
X	if (ac.ac_policy == FREE_ACCOUNT) exit(0);
X	ac.ac_total += show_cost;
X	do_cost(&ac, show_cost);
X	exit(0);
X    }
X    
X    if (add_usage > 0) {
X	get_entry(acctf, caller, &ac);
X	if (ac.ac_policy == FREE_ACCOUNT) goto unlock;
X	ac.ac_total += add_usage;
X	time(&ac.ac_last);
X    } else
X    if (users > 0) {
X	actab = newobj(struct account, users + 1);
X	for (i = 1; i <= users; i++) {
X	    get_entry(acctf, argv[i], &actab[i]);
X	    if (new_policy >= 0 || new_quota >= 0) {
SHAR_EOF
echo "End of  part 1"
echo "File account.c is continued in part 2"
echo "2" > shar3_seq_.tmp
exit 0