home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume19 / nn / part01 next >
Encoding:
Internet Message Format  |  1989-06-22  |  51.6 KB

  1. Subject:  v19i062:  NN, a Usenet news reader, Part01/15
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: storm@texas.dk (Kim F. Storm)
  7. Posting-number: Volume 19, Issue 62
  8. Archive-name: nn/part01
  9.  
  10. This distribution contains release 6.3 of nn.
  11.  
  12. nn is a menu based (point and shoot) netnews reader with a complete
  13. set of features to satisfy both the expert and the novice user.  Since
  14. its first release in Denmark in 1984 (!) and in Europe in 1988, it has
  15. replaced rn and other well-known news readers at many sites.
  16.  
  17. Some of the key features of nn are:
  18.  
  19.  *  Menu-based article selection prior to reading the articles
  20.     with the articles sorted according to subject & posting time!
  21.  
  22.     Significantly reduces the time spent on news reading.  
  23.     No keystorkes are wasted on articles you don't want to read, and 
  24.     only the articles selected on the menu will be read.
  25.  
  26.  *  Digests are automatically split and presented as ordinary articles!
  27.     You can transparently save and respond to individual subarticles.
  28.  
  29.  *  Full folder support: read, save, and delete individual articles.
  30.  
  31.  *  Online help and manual.
  32.     
  33.  *  Built-in unshar and patch functions.
  34.  
  35.  *  Easy remapping of keys with advanced macro definition features.
  36.  
  37.  *  Automatic kill & selection of articles based on subject or author.
  38.  
  39.  *  User specified presentation sequence of news groups based on the
  40.     news group hierarchy.
  41.  
  42.  *  Whole classes of news groups can easily be unsubscribed
  43.     permanently, e.g. talk.all and all.politics
  44.  
  45.  *  Blindingly fast 'search for subject'.  On my Texas S1500 system, 
  46.     nn uses less than 20 seconds to find all articles on a specific
  47.     subject among 64000 articles in all groups!
  48.  
  49.  *  News collection and presentation is extremely fast, because nn
  50.     uses its own database on top of the standard news system.
  51.  
  52.  *  In a distributed environment, the database can be shared among all 
  53.     hosts on the network.  Only one daemon is needed on the news server
  54.     for all hosts.  This works in a heterogenous environment as well.
  55.  
  56.  *  NNTP is also supported (using a local database for speed).
  57.  
  58. Because of the database, nn starts almost equally fast (in a few
  59. seconds), no matter whether you have 100 or 10000 unread articles!
  60. The database takes up some disk space, but dramatically improves speed
  61. and functionality.  The amount of disk space consumed is approx. 1Mb
  62. per 10000 articles.
  63.  
  64.  
  65. #!/bin/sh
  66. # shar:    Shell Archiver  (v1.22)
  67. #
  68. # This is part 1 of a multipart archive                                    
  69. # do not concatenate these parts, unpack them in order with /bin/sh        
  70. #
  71. #    Run the following text with /bin/sh to create:
  72. #      README
  73. #      INSTALLATION
  74. #      MANIFEST
  75. #      NEWS-6.3
  76. #      NNTP
  77. #      PROBLEMS
  78. #      Makefile
  79. #      active.c
  80. #      admin.c
  81. #      answer.c
  82. #      articles.c
  83. #      articles.h
  84. #      aux.sh
  85. #      back_act.sh
  86. #      collect.c
  87. #      config.h-dist
  88. #      cvt-help.c
  89. #      data.h
  90. #      date_regexp.c
  91. #      db.c
  92. #      db.h
  93. #      debug.h
  94. #      digest.c
  95. #      execute.c
  96. #      expire.c
  97. #      folder.c
  98. #      global.c
  99. #      global.h
  100. #      group.c
  101. #      help.commands
  102. #      help.extended
  103. #      help.help
  104. #      help.map
  105. #      help.menu
  106. #      help.more
  107. #      help.read
  108. #      help.set
  109. #      help.show
  110. #      help.variables
  111. #      help.welcome
  112. #      init.c
  113. #      init.sample
  114. #      install_aux
  115. #      keymap.c
  116. #      keymap.h
  117. #      kill.c
  118. #      log_entry.c
  119. #      m-att3b.h
  120. #      m-dec3100.h
  121. #      m-gould.h
  122. #      m-hp9000.h
  123. #      m-m680x0.h
  124. #      m-sparc.h
  125. #      m-sun.h
  126. #      m-sun386i.h
  127. #      m-template.h
  128. #      m-vax.h
  129. #      macro.c
  130. #      master.c
  131. #      match.c
  132. #      match.h
  133. #      menu.c
  134. #      menu.h
  135. #      mk_online_man
  136. #      more.c
  137. #      news.c
  138. #      news.h
  139. #      nn.1
  140. #      nn.c
  141. #      nnadmin.1m
  142. #      nncheck.1
  143. #      nngoback.1
  144. #      nngoback.sh
  145. #      nngrep.1
  146. #      nngrep.sh
  147. #      nnmail.c
  148. #      nnmaster.1m
  149. #      nnquery.sh
  150. #      nntidy.1
  151. #      nntidy.sh
  152. #      nntp.c
  153. #      nntp.h
  154. #      nnusage.1m
  155. #      nnusage.sh
  156. #      options.c
  157. #      options.h
  158. #      pack_date.c
  159. #      pack_name.c
  160. #      pack_subject.c
  161. #      patchlevel.h
  162. #      prefix.sh
  163. #      rc.c
  164. #      regexp.c
  165. #      regexp.h
  166. #      reroute.c
  167. #      routes.sample
  168. #      s-bsd4-2.h
  169. #      s-bsd4-3.h
  170. #      s-hpux.h
  171. #      s-hpux2-1.h
  172. #      s-sunos3.h
  173. #      s-sunos4-0.h
  174. #      s-template.h
  175. #      s-tower32.h
  176. #      s-usg3-1.h
  177. #      save.c
  178. #      selection.c
  179. #      sequence.c
  180. #      term.c
  181. #      term.h
  182. #      unshar.c
  183. #      update.c
  184. #      update.h
  185. #      vararg.h
  186. #      variable.c
  187. #      xmakefile
  188. #
  189. if test -r s2_seq_.tmp
  190. then echo "Must unpack archives in sequence!"
  191.      next=`cat s2_seq_.tmp`; echo "Please unpack part $next next"
  192.      exit 1; fi
  193. echo "x - extracting README (Text)"
  194. sed 's/^X//' << 'NO_NEWS_IS_GOOD_NEWS' > README &&
  195. XINTRODUCTION TO NN
  196. X------------------
  197. X
  198. XThis distribution contains release 6.3 of nn.
  199. X
  200. Xnn is a menu based (point and shoot) netnews reader with a complete
  201. Xset of features to satisfy both the expert and the novice user.  Since
  202. Xits first release in Denmark in 1984 (!) and in Europe in 1988, it has
  203. Xreplaced rn and other well-known news readers at many sites.
  204. X
  205. XSome of the key features of nn are:
  206. X
  207. X *  Menu-based article selection prior to reading the articles
  208. X    with the articles sorted according to subject & posting time!
  209. X
  210. X    Significantly reduces the time spent on news reading.  
  211. X    No keystorkes are wasted on articles you don't want to read, and 
  212. X    only the articles selected on the menu will be read.
  213. X
  214. X *  Digests are automatically split and presented as ordinary articles!
  215. X    You can transparently save and respond to individual subarticles.
  216. X *  Full folder support: read, save, and delete individual articles.
  217. X
  218. X *  Online help and manual.
  219. X    
  220. X *  Built-in unshar and patch functions.
  221. X *  Easy remapping of keys with advanced macro definition features.
  222. X *  Automatic kill & selection of articles based on subject or author.
  223. X
  224. X *  User specified presentation sequence of news groups based on the
  225. X    news group hierarchy.
  226. X
  227. X *  Whole classes of news groups can easily be unsubscribed
  228. X    permanently, e.g. talk.all and all.politics
  229. X
  230. X *  Blindingly fast 'search for subject'.  On my Texas S1500 system, 
  231. X    nn uses less than 20 seconds to find all articles on a specific
  232. X    subject among 64000 articles in all groups!
  233. X
  234. X *  News collection and presentation is extremely fast, because nn
  235. X    uses its own database on top of the standard news system.
  236. X *  In a distributed environment, the database can be shared among all 
  237. X    hosts on the network.  Only one daemon is needed on the news server
  238. X    for all hosts.  This works in a heterogenous environment as well.
  239. X *  NNTP is also supported (using a local database for speed).
  240. XBecause of the database, nn starts almost equally fast (in a few
  241. Xseconds), no matter whether you have 100 or 10000 unread articles!
  242. XThe database takes up some disk space, but dramatically improves speed
  243. Xand functionality.  The amount of disk space consumed is approx. 1Mb
  244. Xper 10000 articles.
  245. X
  246. X
  247. XDISTRIBUTION
  248. X------------
  249. X
  250. XThe package is posted as 15 separate shar archives on comp.sources.unix.
  251. XIt is unpacked by applying /bin/sh to each archive in turn.  
  252. XEverything is a little less than 730Kb, including documentation.
  253. X
  254. XIt is also available via anonymous ftp from 
  255. X
  256. X    host: freja.diku.dk (129.142.96.1) 
  257. X    file: /pub/misc/nn-6.3.tar.Z    (compressed tar)
  258. X
  259. X
  260. X
  261. XCOPYRIGHT
  262. X---------
  263. X
  264. XCopyright (c) 1989 by Kim Fabricius Storm.
  265. X
  266. XNot derived from licensed software.
  267. X
  268. XPermission is granted to anyone to use, modify, and reuse this
  269. Xsoftware for any purpose on any computer system, and to redistribute
  270. Xit freely, subject to the following restrictions:
  271. X
  272. X1. The author is not responsible for the consequences of use of this
  273. X   software, no matter how awful, even if they arise from defects in
  274. X   it.
  275. X
  276. X2. The origin of this software must not be misrepresented, either by
  277. X   explicit claim or by omission.
  278. X
  279. X3. Altered versions must be plainly marked as such, and must not be
  280. X   misrepresented as being the original software.
  281. X
  282. X
  283. XThe following code modules have been incorporated into nn, and the
  284. Xabove copyright notice does not apply to these modules; they include
  285. Xtheir own copyright notices (or have none):
  286. X
  287. Xregexp.c:    Copyright (c) 1986 by University of Toronto.
  288. X         Written by Henry Spencer.
  289. X
  290. Xunshar.c:    No copyright notice.
  291. X        Written by K. Greer, S. Shafer, and M. Mauldin
  292. X
  293. X
  294. XINSTALLATION
  295. X------------
  296. X
  297. XThe installation procedure is described in the file INSTALLATION.
  298. X
  299. XYou may also find useful information in the files PROBLEMS and NNTP.
  300. X
  301. XThe file NEWS-6.3 describes the major changes from release 6.1 to 6.3.
  302. X
  303. X
  304. XBUGS and MAILING LIST
  305. X---------------------
  306. X
  307. XPlease send bug reports (and fixes) to the following address:
  308. X    nn-bugs@dkuug.dk
  309. X
  310. XYou may also use nn-bugs for suggestions for improvements (missing
  311. Xfeatures in nn are considered to be bugs :-)
  312. X
  313. XWe have a moderated mailing list for users of nn.  Its address is
  314. X    nn-info@dkuug.dk
  315. X
  316. XIf you like to join the nn mailing list, send a request to
  317. X    nn-info-request@dkuug.dk
  318. X
  319. X
  320. XACKNOWLEDGEMENTS
  321. X----------------
  322. X
  323. XMy thanks goes to Rene' Seindal for his help before and after the
  324. Xfirst major release of nn in Europe.  He did intensive testing & bug
  325. Xfixing & ported it to BSD 4.3 & SunOS, he is administering the nn-info
  326. Xlist, and he has also written the NNTP code for nn.
  327. X
  328. XSince the development of nn is now on its fifth year, many persons
  329. Xhave contributed to nn with ideas and critisism, have helped me debug
  330. Xthe software by patiently using alpha and beta versions, have provided
  331. Xbug fixes, and have helped porting it to other systems:
  332. X
  333. XJan H. Andersen, Norman H. Azadian, P{r Emanuelsson, Bruce Fisher,
  334. XMatthias Frei, S|ren O. Jensen, Poul-Henning Kamp, Michael Knudsen,
  335. XTor Lillqvist, Kim Chr. Madsen, Lars Mathiesen, Dennis Olsson,
  336. XCarl-Lykke Pedersen (when he finishes the GNU-emacs front-end :-),
  337. XAlan Rooks, Rene' Seindal, Keld Simonsen, Jon Vos, Johan Vromans, Tom
  338. XVijlbrief, Per Westerlund.
  339. X
  340. XI would like this list to be complete, but it is impossible for me
  341. Xto remember all the names of the people who have contributed to the
  342. Xevolution of nn.  My excuses to those who are not on the list.
  343. X
  344. X
  345. X
  346. XKim Fabricius Storm
  347. XTexas Instruments, Denmark
  348. X
  349. XEmail: storm@texas.dk   
  350. XSnail: Marielundvej 46E, DK-2730 Herlev, Denmark
  351. Xtel:   +45 429 17 400      fax:   +45 429 18 400
  352. NO_NEWS_IS_GOOD_NEWS
  353. chmod 0644 README || echo "restore of README fails"
  354. set `wc -c README`;Sum=$1
  355. if test "$Sum" != "5549"
  356. then echo original size 5549, current size $Sum;fi
  357. echo "x - extracting INSTALLATION (Text)"
  358. sed 's/^X//' << 'NO_NEWS_IS_GOOD_NEWS' > INSTALLATION &&
  359. XCONFIGURATION AND INSTALLATION OF NN
  360. X------------------------------------
  361. X
  362. XThis file describes the necessary steps to configure and install nn.
  363. XYou are advised to read this file before proceeding with the
  364. Xinstallation.  
  365. X
  366. XIf you want to use NNTP (accessing news from a remote host), you must
  367. Xalso read the file NNTP.
  368. X
  369. XThe file PROBLEMS contains descriptions of problems previously seen
  370. Xwhen installing nn.  If you run into problems, consult that file
  371. Xbefore mailing us about it.
  372. X
  373. XThe '#' prompts are used in the examples when super user privileges are
  374. Xrequired to execute the command.
  375. X
  376. X
  377. XCONFIGURATION OF MAKEFILE
  378. X-------------------------
  379. X
  380. XCheck the 'Makefile' file and supply the proper values for the
  381. Xfollowing parameters:
  382. X
  383. XCC    The command to invoke the C compiler
  384. X
  385. XCPP    The command to invoke the C preprocessor with the result
  386. X    written to the standard output stream.
  387. X
  388. XCFLAGS    Flags to the C compiler  (e.g. -O or -g)
  389. X
  390. X
  391. XCREATE CONFIGURATION FILE config.h
  392. X----------------------------------
  393. X
  394. X    $ cp config.h-dist config.h
  395. X
  396. X
  397. XEDIT config.h TO REFLECT YOUR SYSTEM
  398. X------------------------------------
  399. X
  400. XThe config.h file contains verbose comments explaining the meaning
  401. Xof each parameter in the file.  Follow the instructions carefully.
  402. X
  403. X
  404. XAmong the things you have to select are two system and machine
  405. Xdependent files.  The following system files are delivered with nn:
  406. X
  407. X    s-bsd4-2.h    For 4.2 BSD and Ultrix systems
  408. X    s-bsd4-3.h    For 4.3 BSD systems
  409. X    s-hpux.h    For HPUX (series 320)
  410. X    s-hpux2-1.h    For HPUX 2.1 (series 800)
  411. X    s-sunos3.h    For SunOS 3
  412. X    s-sunos4-0.h    For SunOS 4.0
  413. X    s-tower32.h    For NCR tower
  414. X    s-usg3-1.h    For most system V systems (also 2.2)
  415. X
  416. XThe following machine description files are delivered with nn:
  417. X
  418. X    m-att3b.h    For AT&T 3b2 (with s-usg3-1.h)
  419. X    m-dec3100.h    For DECstation 3100 (with s-bsd4-2.h)
  420. X    m-gould.h    For Gould PN6000 (with s-bsd4-3.h)
  421. X    m-hp9000.h    For HP9000 series 320 and 800 (at least)
  422. X    m-m680x0.h    For 68000 family processors
  423. X    m-sparc.h    For SPARC processors
  424. X    m-sun.h        For 680x0 based SUNs
  425. X    m-sun386i.h    For 80386 based SUNs
  426. X    m-vax.h        For VAX family
  427. X
  428. XIf you cannot use one of these configuration files, create your own 
  429. Xbased on the following template files (send the new system and/or
  430. Xmachine files to nn-bugs@dkuug.dk):
  431. X
  432. X    s-template.h
  433. X    m-template.h
  434. X
  435. X
  436. XThe following directories must be defined in config.h:
  437. X
  438. XBIN_DIRECTORY
  439. X    The directory where you want the user programs to be
  440. X    installed.  The following programs will be installed in that 
  441. X    directory:
  442. X
  443. X    nn        The news reader program
  444. X    nnadmin        The administration program (link to nn)
  445. X    nncheck        Check for unread articles (link to nn)
  446. X    nngoback    Mark older articles as unread
  447. X    nngrep        Grep for news groups
  448. X    nntidy        Cleans up the rc file
  449. X    nnquery        Show which users read which groups
  450. X    nnusage        Show usage statistics
  451. X    nnmail        A mailer that understands domain addressing.
  452. X
  453. X    If you already run a domain based mailer, nnmail will not be
  454. X    installed!
  455. X
  456. X    
  457. XLIB_DIRECTORY
  458. X    The directory where nn's auxiliary programs and files will
  459. X    be installed.  Since it contains binary files and per system
  460. X    data, it should not be shared in a network environment without
  461. X    some considerations.  The programs in this directory are:
  462. X
  463. X    aux    The shell script used in connection with replies etc.
  464. X        It knows about common editors like vi and gnu emacs to
  465. X        have them position the cursor appropriately.  To add
  466. X        support for your own favourite editor, you should edit
  467. X        the file aux.sh, not the compiled `aux' script!
  468. X
  469. X    back_act
  470. X        Program to make daily copies of the active file to
  471. X        allow nngoback to work.
  472. X        
  473. X    date_regexp
  474. X        Program used by nngoback to extract information from
  475. X        the history file (it builds a big regexp for egrep).
  476. X
  477. X    log_entry
  478. X        Program to make entries in the Log file.
  479. X
  480. X    nnmaster
  481. X        The program building and maintaining nn's database.
  482. X
  483. X
  484. XDB_DIRECTORY 
  485. X    The directory where nn's private database (containing
  486. X    extracted article header information) can reside.  This
  487. X    directory is intended to be shared together with the news
  488. X    spool directory in a networked environment provided that
  489. X    NETWORK_DATABASE is defined in config.h.
  490. X
  491. X    This directory requires some disk space to hold the necessary
  492. X    information.  On average about 100 bytes per article in the
  493. X    system, or about 5% of the space allocated to the news articles.
  494. X    
  495. X    If you share /usr/spool/news via NFS or RFS, you can set DB to
  496. X    something like /usr/spool/news/.nn to share it as well.
  497. X
  498. X
  499. XConsult the file NNTP for a description of how to use NNTP with nn.
  500. X
  501. XThe files config.h and NNTP describes how to share the database
  502. Xbetween several machines (also when you don't use NNTP).
  503. X
  504. X
  505. XCOMPILE THE SOFTWARE
  506. X--------------------
  507. X
  508. XIf you are making a complete package with both master and client, do
  509. X
  510. X    $ make all
  511. X
  512. XIf you want to share a database which resides on another host (through
  513. XNFS/RFS/rdist), you don't need a master on the local system, so you
  514. Xcan do the following instead:
  515. X
  516. X    $ make client
  517. X
  518. X
  519. XINSTALL THE SOFTWARE
  520. X--------------------
  521. X
  522. XUnless you have defined yourself as the owner of the nn package and
  523. Xhave write permission on all the necessary directories, you will need
  524. Xto be superuser to install nn, so start with
  525. X
  526. X    $ su
  527. X
  528. XTo install a complete package do
  529. X
  530. X    # make install
  531. X
  532. XIf you are only installing an nn client which is accessing a remote
  533. Xdatabase through NFS (no local nnmaster) do
  534. X
  535. X    # make install.client
  536. X
  537. XNotice that every time you install the package, the file update.h is
  538. Xmodified to make a new update level for the version in the source
  539. Xdirectory.  This means that doing make install twice in a row will
  540. Xcause make to relink all the programs during the second install.
  541. X
  542. XWhen you have installed the package, you are ready to generate the
  543. Xonline manual.  The following command will install the generated
  544. Xmanual directly in the LIB_DIRECTORY, but you can move it manually to
  545. XDB_DIRECTORY if you want to share it on the network (nn will look for
  546. Xit in both directories):
  547. X
  548. X    # make online
  549. X
  550. X
  551. XINITIALIZE DATABASE
  552. X-------------------
  553. X
  554. XIf you installed a complete package, you now have to initialize the
  555. Xdatabase:
  556. X
  557. X    $ su         -- also as superuser
  558. X    # make initdb
  559. X
  560. XIf something goes wrong in this step, e.g. problems with the active
  561. Xfile, you will have to execute the following command to repeat the
  562. Xinitialization of the database:
  563. X
  564. X    # LIB_DIRECTORY/nnmaster -I
  565. X
  566. X
  567. XSTART THE MASTER PROCESS
  568. X------------------------
  569. X
  570. XWhen the database is ready, start nnmaster to enter the existing
  571. Xarticles into the database.  If you use the following command,
  572. Xnnmaster will fork and return immediately; its background child will
  573. Xcontinue to update the database whenever new articles arrive:
  574. X
  575. X    $ LIB_DIRECTORY/nnmaster -r -C -E
  576. X
  577. XNOTICE:  It may take quite a while before all existing articles have
  578. Xbeen entered into the database.  You can use the nnadmin program's
  579. XUpdate and Stat commands to trace the progress and the Log command to
  580. Xsee if it has finished (a C entry will occur).
  581. X
  582. X
  583. XPREPARE TO START THE NNMASTER PROGRAM WHEN THE SYSTEM IS BOOTED
  584. X---------------------------------------------------------------
  585. X
  586. XPlace the following commands in a file which is executed at boot time:
  587. X
  588. X    rm -f LIB_DIRECTORY/MPID
  589. X    LIB_DIRECTORY/nnmaster -r -C -E
  590. X
  591. XDepending on the organization of start-up scripts on your system, you
  592. Xmay have to create a new file for these commands
  593. X    /etc/rc.d/start.nn
  594. Xor you simply place them in a suitable place in the file
  595. X    /etc/rc
  596. X
  597. XAlternatively, you can arrange for cron to run the master regularly.
  598. XIn this case, you should not use the -r and -C options.  Instead, you
  599. Xshould let cron execute the command 'nnadmin Z' once a day to
  600. Xvalidate the database.
  601. X
  602. XWARNING: If you share the database via NFS or RFS, nnmaster should run
  603. X     only on the system where the database actually resides!!
  604. X
  605. X
  606. XSETUP EXPIRE ON THE DATABASE
  607. X----------------------------
  608. X
  609. XTo run expire on the database, you simply have to execute the
  610. Xfollowing command (with sufficient privileges):
  611. X
  612. X    BIN_DIRECTORY/nnadmin EW
  613. X
  614. XYou should arrange for expire to be run on nn's database whenever you
  615. Xhave run expire on the news directories.
  616. X
  617. XSupposing you run the expire from your crontab, you may simply add the
  618. Xabove command to the crontab at an appropriate time when you are
  619. Xcertain that news' expire is completed.
  620. X
  621. X
  622. XINITIATE SAVING A COPY OF THE ACTIVE FILE ONCE A DAY
  623. X----------------------------------------------------
  624. X
  625. XThe nngoback program will operate faster and in all environments (also
  626. XNNTP and shared databases) when the program LIB_DIRECTORY/back_act is
  627. Xexecuted once (and only once) every day to maintain suitable copies of
  628. Xthe active files for the last 14 days.  In a network environment, it
  629. Xshould execute on the same host as the nnmaster.
  630. X
  631. XSimply arrange for back_act to be invoked by cron once a day
  632. X(preferably just before the batch of news for `today' arrives).  For
  633. Xexample, assuming the news is received just before midnight (syntax
  634. Xand location of crontab entry may vary):
  635. X
  636. XIn /usr/spool/cron/crontabs/news (System V):
  637. X    00 23 * * * LIB_DIRECTORY/back_act
  638. Xor in /usr/lib/crontab (BSD):
  639. X    00 23 * * * su - news LIB_DIRECTORY/back_act
  640. X
  641. X
  642. XINSTALL AND EDIT GLOBAL FILES
  643. X-----------------------------
  644. X
  645. XDepending on your needs, you should create the following files in the
  646. XLIB_DIRECTORY on each host running nn:
  647. X
  648. Xinit
  649. X    The global init file for all users on the system.
  650. X    You should at least put a global presentation sequence here.
  651. X
  652. X    You may use init.sample as a starting point.
  653. X
  654. Xroutes
  655. X    Configuration file for the domain address remapping
  656. X    done by nn in reply addresses and the nnmail program.
  657. X    You may use routes.sample as a starting point (it briefly
  658. X    describes how to build a routes file).
  659. X    It should NOT be created if you already run a domain based
  660. X    mailer, i.e. when HAVE_ROUTING is defined in config.h.
  661. X
  662. X    NB: nnmail is not a supported part of nn - if you really want
  663. X        to run a domain-based mailer, get smail 2.5 or later.
  664. X    
  665. X"NNTP_SERVER"  (location & name is defined in config.h)
  666. X    Contains the host name of the NNTP-server when NNTP is used.
  667. X
  668. X
  669. XUPDATING THE SOFTWARE
  670. X---------------------
  671. X
  672. XPatches to this software will be distributes as context diff's which
  673. Xcan be applied using Larry Wall's `patch' program.
  674. X
  675. XAfter applying the patches, you will need to redo the compilation and
  676. Xinstallation steps:
  677. X
  678. X    $ patch < PATCH_FILE    (or use nn's :patch command)
  679. X    $ make all
  680. X    $ su
  681. X    # make install
  682. X
  683. XTo be able to install a new nnmaster, the currently running master (if
  684. Xany) will be stopped automatically, and it has to be started manually
  685. Xwhen the installation is complete (unless it is setup to be run by cron).
  686. X
  687. XNotice that unless it is explicitly required in the patch, there is no
  688. Xneed to reinitialize the database after applying the patch.
  689. NO_NEWS_IS_GOOD_NEWS
  690. chmod 0644 INSTALLATION || echo "restore of INSTALLATION fails"
  691. set `wc -c INSTALLATION`;Sum=$1
  692. if test "$Sum" != "10601"
  693. then echo original size 10601, current size $Sum;fi
  694. echo "x - extracting MANIFEST (Text)"
  695. sed 's/^X//' << 'NO_NEWS_IS_GOOD_NEWS' > MANIFEST &&
  696. XREADME
  697. XINSTALLATION
  698. XMANIFEST
  699. XNEWS-6.3
  700. XNNTP
  701. XPROBLEMS
  702. XMakefile
  703. Xactive.c
  704. Xadmin.c
  705. Xanswer.c
  706. Xarticles.c
  707. Xarticles.h
  708. Xaux.sh
  709. Xback_act.sh
  710. Xcollect.c
  711. Xconfig.h-dist
  712. Xcvt-help.c
  713. Xdata.h
  714. Xdate_regexp.c
  715. Xdb.c
  716. Xdb.h
  717. Xdebug.h
  718. Xdigest.c
  719. Xexecute.c
  720. Xexpire.c
  721. Xfolder.c
  722. Xglobal.c
  723. Xglobal.h
  724. Xgroup.c
  725. Xhelp.commands
  726. Xhelp.extended
  727. Xhelp.help
  728. Xhelp.map
  729. Xhelp.menu
  730. Xhelp.more
  731. Xhelp.read
  732. Xhelp.set
  733. Xhelp.show
  734. Xhelp.variables
  735. Xhelp.welcome
  736. Xinit.c
  737. Xinit.sample
  738. Xinstall_aux
  739. Xkeymap.c
  740. Xkeymap.h
  741. Xkill.c
  742. Xlog_entry.c
  743. Xm-att3b.h
  744. Xm-dec3100.h
  745. Xm-gould.h
  746. Xm-hp9000.h
  747. Xm-m680x0.h
  748. Xm-sparc.h
  749. Xm-sun.h
  750. Xm-sun386i.h
  751. Xm-template.h
  752. Xm-vax.h
  753. Xmacro.c
  754. Xmaster.c
  755. Xmatch.c
  756. Xmatch.h
  757. Xmenu.c
  758. Xmenu.h
  759. Xmk_online_man
  760. Xmore.c
  761. Xnews.c
  762. Xnews.h
  763. Xnn.1
  764. Xnn.c
  765. Xnnadmin.1m
  766. Xnncheck.1
  767. Xnngoback.1
  768. Xnngoback.sh
  769. Xnngrep.1
  770. Xnngrep.sh
  771. Xnnmail.c
  772. Xnnmaster.1m
  773. Xnnquery.sh
  774. Xnntidy.1
  775. Xnntidy.sh
  776. Xnntp.c
  777. Xnntp.h
  778. Xnnusage.1m
  779. Xnnusage.sh
  780. Xoptions.c
  781. Xoptions.h
  782. Xpack_date.c
  783. Xpack_name.c
  784. Xpack_subject.c
  785. Xpatchlevel.h
  786. Xprefix.sh
  787. Xrc.c
  788. Xregexp.c
  789. Xregexp.h
  790. Xreroute.c
  791. Xroutes.sample
  792. Xs-bsd4-2.h
  793. Xs-bsd4-3.h
  794. Xs-hpux.h
  795. Xs-hpux2-1.h
  796. Xs-sunos3.h
  797. Xs-sunos4-0.h
  798. Xs-template.h
  799. Xs-tower32.h
  800. Xs-usg3-1.h
  801. Xsave.c
  802. Xselection.c
  803. Xsequence.c
  804. Xterm.c
  805. Xterm.h
  806. Xunshar.c
  807. Xupdate.c
  808. Xupdate.h
  809. Xvararg.h
  810. Xvariable.c
  811. Xxmakefile
  812. NO_NEWS_IS_GOOD_NEWS
  813. chmod 0644 MANIFEST || echo "restore of MANIFEST fails"
  814. set `wc -c MANIFEST`;Sum=$1
  815. if test "$Sum" != "1137"
  816. then echo original size 1137, current size $Sum;fi
  817. echo "x - extracting NEWS-6.3 (Text)"
  818. sed 's/^X//' << 'NO_NEWS_IS_GOOD_NEWS' > NEWS-6.3 &&
  819. XNew features in release 6.3 (compared to release 6.1.5):
  820. X--------------------------------------------------------
  821. X
  822. XMajor improvements:
  823. X    NNTP support
  824. X    nn can now use/update .newsrc (to a limited extent)
  825. X    Presentation of article header can be customized
  826. X    Full macro support
  827. X    Full folder maintenance
  828. X    Completion help available using '?' key
  829. X    Backup of rc file works!
  830. X    Much faster nngoback - not based on history file.
  831. X
  832. XChanges in standard key mappings:
  833. X    reading mode Z -> goto-menu
  834. X    reading mode N -> next-group
  835. X    reading mode p -> previous (was print)
  836. X    reading mode P -> print (was previous)
  837. X
  838. XNew commands:
  839. X    leave-article
  840. X    :define
  841. X    :man
  842. X    :map both ...
  843. X    :patch
  844. X    :pwd
  845. X    :rmail
  846. X    :show groups unsub
  847. X    
  848. XNew variables:
  849. X    backup        (New functionality! It is set by default)
  850. X    confirm-append
  851. X    default-save-file
  852. X    delay-redraw
  853. X    header-lines
  854. X    mail
  855. X    mail-format
  856. X    mark-overlap
  857. X    newsrc
  858. X    overlap
  859. X    patch-cmd
  860. X    quick-save
  861. X    retry-on-error
  862. X    save-report
  863. X    word-key
  864. X
  865. XNew options:
  866. X    -m
  867. X    -s/    (regexp matching)
  868. X
  869. XDescription of new features (in mixed order):
  870. X---------------------------------------------
  871. X
  872. XNNTP support has been added (thanks to Rene Seindal @ diku.dk).
  873. X
  874. XOnline manual.
  875. X
  876. XRegular expression search in reading mode:  / and .
  877. X
  878. XRegular expression matching for subjects in -s/ option and G=/ command.
  879. X
  880. XArticles can be saved in a mail compatible format by setting the
  881. Xmail-format variable.
  882. X
  883. XThe article selection save files are now kept in network format if
  884. XNETWORK_DATABASE is defined, so reading news from different machines
  885. Xshould now work in a heterogeneous environment.
  886. X
  887. XAdded $F which expands to the group name with / instead of .  E.g. $F
  888. Xin rec.music.synth produces rec/music/synth
  889. X
  890. XFolder name "+" is expanded to the file name found in the new
  891. Xdefault-save-file variable (default +$F).
  892. X
  893. XWhen saving articles, the prompting for a file name can be disabled by
  894. Xsetting the quick-save variable (saving will be done in the default
  895. Xsave file).
  896. X
  897. Xnn will ask for confirmation before appending to existing files when
  898. Xconfirm-append is set.
  899. X
  900. XThe message after each save can be disabled by unsetting the
  901. Xsave-report variable.
  902. X
  903. XThe manual has been corrected to use the proper names for the
  904. Xmail-record and news-record variables.
  905. X
  906. X:unshar will create the directory if is does not exist.
  907. X
  908. XCustomized article header presentation through setting of header-lines
  909. Xvariable.
  910. X
  911. XComplete variable settings are now shown by :set
  912. X
  913. XFull macro support - you can now bind any sequence of commands to a
  914. Xsingle key (see the define command).
  915. X
  916. XIndividual articles in a folder can now be cancelled!  I.e. folders
  917. Xare now fully supported:  you can save, print, respond to, and cancel
  918. Xseparate articles in the folders created by nn. (Try the G +folder command).
  919. X
  920. XA global init file is now supported rather than just a global sequence file.
  921. X(You should avoid using the sequence file, because it might go away in
  922. Xa future release.)
  923. X
  924. XNn will now remember which articles you have seen on the menu (but not
  925. Xnecessarily selected) when you quit.  Confirming the question "use old
  926. Xselections" now also implies that nn will start on the same menu page
  927. Xas the one you quitted on.
  928. X
  929. XThere is a retry-on-error variable which can be set to a number of
  930. Xtimes attempts to open an article should be done before giving up.
  931. X
  932. XYou can now specify per group default save files in the init file (in
  933. Xthe group sequence).
  934. X
  935. XS+ is an addition to the old S* command which saves all the selected
  936. Xarticles in the group!
  937. X
  938. XWhen you have given a command that clears the screen, the screen is
  939. Xnow redrawn by default when the command terminates.  To get the 6.1
  940. Xbehaviour (prompt for a new : command), you must set the delay-redraw
  941. Xvariable.  
  942. X
  943. XWhen input completion is possible, you can now use the ? key to get a
  944. Xlist of the possible completions.
  945. X
  946. XCompletion is now possible when entering an extended command
  947. X(:command) - both for the command name itself and the arguments.
  948. X(The only exception is when entering the VALUE of a variable.)
  949. X
  950. XThe 'backup' variable now works "the right way": It makes a backup of
  951. Xthe rc file on start-up.  nn can then update the rc file after reading
  952. Xeach group (increased security), and still restore the old rc file
  953. Xwith the :q! command.  The backup variable is now set by default.
  954. X
  955. XYou can set the 'mail' variable to make nn check for the arrival of
  956. Xmail, and you can use the ':rmail' command to read the mail!  (But it
  957. Xis not a full mail interface, e.g. you cannot delete messages, cc:
  958. Xfields are not supported if you reply to a message, etc.)
  959. X
  960. Xnn will now synchronize with the .newsrc file if the "newsrc" variable
  961. Xis set.  However, it does NOT understand about individual articles
  962. Xthat are marked as unread (e.g. 5-8 in 1-4,9-24) - it will silently
  963. Xmark such articles as read (e.g. read the above as 1-24).
  964. X  I don't know anybody who uses this, but if somebody wants to improve
  965. Xon it, feel free to do it.  If you just want to to use rn from time to
  966. Xtime, the current support will be sufficient if you always read all
  967. Xthe articles in a group once you have started reading it (or you read
  968. Xthe articles in the normal article number order).
  969. X
  970. XWhen saving an article with a full or partial header in a folder,
  971. Xlegal article header lines in the body of the article are now 
  972. Xescaped with a tilde, e.g. ~From: ....., to avoid having the
  973. Xarticles split improperly when the folder is later opened by nn.
  974. X
  975. XThere is a new C)onf command to nnadmin to print the current
  976. Xconfiguration (directories, files, network, etc.).
  977. X
  978. XThe G (goto-group) command now allows you to jump to an unread group
  979. Xin the group sequence without entering a new recursive menu level.
  980. X
  981. XThe manual nn.1 has been clarified regarding the effect of options:
  982. XThe init file is read prior to parsing the options, and the options
  983. Xwill TOGGLE the CURRENT value of boolean variables.
  984. X
  985. X
  986. XRemoved backwards compatibility
  987. X-------------------------------
  988. X
  989. XSupport for upgrading from release 3, 4, or 5 has been removed, since
  990. Xthe sites using these releases have all updated to 6.1.
  991. X
  992. XAlso the support for pre 2.11 news has been removed (OLD_NEWS).
  993. X
  994. NO_NEWS_IS_GOOD_NEWS
  995. chmod 0644 NEWS-6.3 || echo "restore of NEWS-6.3 fails"
  996. set `wc -c NEWS-6.3`;Sum=$1
  997. if test "$Sum" != "6040"
  998. then echo original size 6040, current size $Sum;fi
  999. echo "x - extracting NNTP (Text)"
  1000. sed 's/^X//' << 'NO_NEWS_IS_GOOD_NEWS' > NNTP &&
  1001. XNNTP SUPPORT
  1002. X------------
  1003. X
  1004. XThis file describes the NNTP support available in nn release 6.3.
  1005. XThe NNTP support was implemented by Rene Seindal, seindal@diku.dk
  1006. X
  1007. X
  1008. XPREREQUISITES
  1009. X-------------
  1010. X
  1011. XBefore you can use the NNTP part of nn, you need to get and install
  1012. Xthe nntp-1.5 distribution with patches 1-3.  It is available from
  1013. Xseveral ftp-sites in the USA.  It is also available on freja.diku.dk
  1014. X(ip 129.142.96.1) together with the nn 6.3 distribution.
  1015. X
  1016. XYou also need read-access to an NNTP-server.
  1017. X
  1018. X
  1019. XHOW IT WORKS
  1020. X------------
  1021. X
  1022. XNNTP is supported both in nn and nnmaster.  When NNTP is used, the
  1023. Xdatabase with the header information used by nn is still maintained on
  1024. Xthe local system (because NNTP does not know about the nn database
  1025. X(yet?)).
  1026. X
  1027. XWhen the master is set up to use NNTP, it will connect to the NNTP-
  1028. Xserver in each iteration of the collection (the interval set with -r),
  1029. Xget a copy of the active file, and incorporate the new articles into
  1030. Xthe database.  To do this, the master will temporarily transfer one
  1031. Xarticle at a time from the NNTP-server to the local system.
  1032. X
  1033. XWhen the articles are read with nn, it will use the local database to
  1034. Xpresent the menus, and fetch the articles from the NNTP-server as they
  1035. Xare requested by the user.  It will connect to the NNTP server the
  1036. Xfirst time it is necessary to fetch an article.
  1037. X
  1038. XNeither nnmaster, nor nn will use NNTP if they run on the NNTP-server
  1039. Xitself (they will directly access the news files).
  1040. X
  1041. XBoth nn and nnmaster access the server in reading mode.  The master
  1042. Xand all client MUST use the same server at all times, since the local
  1043. Xdatabase contains article numbers, that are only unique for each
  1044. XNNTP-server.
  1045. X
  1046. X
  1047. XSHARING THE DATABASE
  1048. X--------------------
  1049. X
  1050. XYou must also decide whether you want to share the database between
  1051. Xyour local news clients, and how you are going to do it.
  1052. X
  1053. XThe database will take up some disk space, normally about 1Mb per
  1054. X10.000 articles.  There are several ways to manage this space.
  1055. X
  1056. XThis simplest solution, is to let each client run it own master,
  1057. Xi.e., have its own database.  This means, of course, no sharing.
  1058. X
  1059. XAlternatively, one host can run the master, and distribute the
  1060. Xdatabase to the others via e.g., rdist.  This doesn't save disk space,
  1061. Xbut saves load on the NNTP-server.
  1062. X
  1063. XLast, the database can be shared with NFS/RFS (see the description of
  1064. XNETWORK_DATABASE in the config.h file).
  1065. X
  1066. XThe possibility of making a `nndb-server' stands open.  It could be
  1067. Xrealized either as a separate server, running under inetd, or it could
  1068. Xbe incorporated into nntpd.  It has not been implemented, but might be
  1069. Xpart of a future release (any volunteers?).
  1070. X
  1071. X
  1072. XCONFIGURATION
  1073. X-------------
  1074. X
  1075. XTo use NNTP in nn, you must edit the relevant parts of config.h:
  1076. X
  1077. XNNTP
  1078. X    You enable the use of NNTP by defining the macro NNTP.
  1079. X
  1080. XNNTP_SERVER 
  1081. X    Both the master and the clients will look up their NNTP-server
  1082. X    in the file given by the macro NNTP_SERVER.  If the name is
  1083. X    not an absolute path name, it is taken to be relative to
  1084. X    LIB_DIRECTORY.
  1085. X    
  1086. X    The format of the file is compatible with the one used in
  1087. X    clientlib.c in the nntp-1.5 distribution, i.e., the first
  1088. X    non-blank line, not starting with '#' is taken to be the name
  1089. X    of the NNTP-server.  This file MUST be present, and must
  1090. X    contain a valid host name.
  1091. X
  1092. X
  1093. XTuning
  1094. X------
  1095. X
  1096. XBoth the server and each client maintains a cache of recently accessed
  1097. Xarticles, to minimize communication with the server (mainly to avoid
  1098. Xfetching large digests continuously).  The master needs the cache when
  1099. Xit splits digests, and the clients need it, because nn has a tendency
  1100. Xto reopen the articles several times.
  1101. X
  1102. XThe master's cache is kept in LIB_DIRECTORY, and each client's cache
  1103. Xare kept in the users .nn directory.  The constant NNTPCACHE (defined
  1104. Xin nntp.c but can be redefined in config.h) defines the size of the
  1105. Xcache, whose optimal size depends on the amount of news kept on line
  1106. Xon the NNTP-server.  Values of 5-10 gives reasonable results.  The
  1107. Xeffect is most striking when reading digested news.
  1108. X
  1109. X
  1110. XINSTALLATION
  1111. X------------
  1112. X
  1113. XMaking and installing nn using NNTP does not differ from a non-NNTP nn
  1114. Xinstallation, except for the differences in the configuration and the
  1115. Xneed to specify the NNTP server in the NNTP_SERVER file.
  1116. X
  1117. XNotice however, that the NNTP_SERVER file must be properly initialized
  1118. Xbefore doing the 'make initdb'.
  1119. X
  1120. XIf something goes wrong in the initialization of the database, you
  1121. Xwill have to run 'nnmaster -I' again by hand.
  1122. X
  1123. X
  1124. XPROBLEMS
  1125. X--------
  1126. X
  1127. XThere are some problems with the current implementation, mostly in
  1128. Xconnection with error conditions.  Almost any error will cause a
  1129. Xpanic-like reaction.  The master simply closes the connection and
  1130. Xreturns to the main loop, and nn terminates the session.
  1131. X
  1132. XThe client program, nn, has a simple attitude towards such accidents.
  1133. XIt prints a message, clears the cache, and exits.  This means that you
  1134. Xcan't have an nn suspended for very long before the connection times
  1135. Xout, and nn will exit the next time you try to access an article.
  1136. XThis is clearly wrong.  It should at least just close the connection,
  1137. Xand reopen it the next time a request to the server comes in.
  1138. X
  1139. XIn spite of these drawbacks, in general it works ok.  The NNTP code
  1140. Xhas been in use for several months now, in a generally satisfying
  1141. Xmanner.
  1142. X
  1143. XAlternative implementations can be conceived, especially in the
  1144. Xmaster.  The master normally collects articles by rereading the active
  1145. Xfile, looking for changed article numbers.  For each group with new
  1146. Xarticles, it reads the new articles and adds them to the database.
  1147. XThis scheme has been kept in the NNTP-based master, to keep the
  1148. Xchanges at a minimum.
  1149. X
  1150. XAn alternative solution could be to use NEWNEWS to get a list of new
  1151. Xarticles since last collect, and fetch each article in sequence.  This
  1152. Xrequires the NNTP-server to return the article number in the response
  1153. Xto an ARTICLE request (as required in rfc 977), but apparently version
  1154. X1.5 of the NNTP-server does not do this.
  1155. X
  1156. XSuggestions and improvements are very much welcome.  Send your
  1157. Xcontributions to nn-bugs@dkuug.dk.
  1158. NO_NEWS_IS_GOOD_NEWS
  1159. chmod 0644 NNTP || echo "restore of NNTP fails"
  1160. set `wc -c NNTP`;Sum=$1
  1161. if test "$Sum" != "6063"
  1162. then echo original size 6063, current size $Sum;fi
  1163. echo "x - extracting PROBLEMS (Text)"
  1164. sed 's/^X//' << 'NO_NEWS_IS_GOOD_NEWS' > PROBLEMS &&
  1165. XHere is a collection of some of the problems people have had with
  1166. Xinstallation and operation of nn in the past.
  1167. X
  1168. X
  1169. XFILE PERMISSIONS
  1170. X----------------
  1171. X
  1172. XYou should run as root when installing the package & db, because some
  1173. Xdirectories might be created in places where ordinary users are not
  1174. Xallowed to write, and secondly because it is not allowed to change the
  1175. Xowner of a file (nnmaster) on some systems.
  1176. X
  1177. XThis might be the cause of your problems.
  1178. X
  1179. XIn general, the permissions and ownership of the various programs
  1180. Xshould be set to allow the following access:
  1181. X
  1182. X- To let the nnmaster READ the news directory (no problem since
  1183. X  /usr/spool/news normally has mode 755),
  1184. X  
  1185. X- To let the nnmaster WRITE in the db-directory and files
  1186. X  
  1187. X- To let ordinary users programs (i.e. nn) READ the db-directory.
  1188. X  
  1189. XFor example,
  1190. X              owner   group   mode
  1191. X  db-directory & files:    news    news    755
  1192. X  nnmaster:        news    news    6755 (suid)
  1193. X  nn etc:        storm    other    755
  1194. X
  1195. X
  1196. XEXPIRED ARTICLES STILL SHOW UP ON THE MENUS
  1197. X-------------------------------------------
  1198. X
  1199. XThis common problem is caused by the way the nnmaster "detects" that
  1200. Xexpire has been run on a news group: It compares the number of the
  1201. Xfirst article in the active file with the first article in the data
  1202. Xbase.  As long as they are identical, nnmaster believes that expire
  1203. Xhas not been run.
  1204. X
  1205. XHowever, if the first article has an expiration date sometime in the
  1206. Xfuture it is not removed, although many of the following articles may
  1207. Xvery well have been removed.
  1208. X
  1209. XTo overcome this problem, you can instruct the nnmaster to recollect
  1210. Xall groups once a week, or after expire has been run.  You do this by
  1211. Xinserting the following command in the crontab to be executed at a
  1212. Xsuitable time (with permissions of the owner of nnmaster):
  1213. X
  1214. X    /usr/local/bin/nnadmin I
  1215. X
  1216. X
  1217. XABOUT BLOCKED GROUPS
  1218. X--------------------
  1219. X
  1220. XA group is blocked while the nnmaster is collecting new articles in
  1221. Xthat group.  In a newly initialized database, all groups will be
  1222. Xblocked until the nnmaster has collected them the first time, which
  1223. Xmay take an hour or so the first time you run nnmaster -r.
  1224. X
  1225. XThis means that there may not be any news to read for a while after
  1226. Xyou have just started the nnmaster the first time.
  1227. X  
  1228. X  
  1229. XPROBLEMS SENDING MAIL
  1230. X---------------------
  1231. X
  1232. XSome people have experienced problems sending mail.
  1233. X
  1234. XIn one case, the recmail program was corrupted.
  1235. X
  1236. XIn another case, uux was not silent causing the trace file (in the aux
  1237. Xscript) to be non-empty which fooled nn to think that nothing had been
  1238. Xsent (although it did).  If you get failed reply/follow-up messages
  1239. Xlook for a line saying something like "uucp job XXXXX" - This is
  1240. Xcaused by the environment setting JOBNO=ON.
  1241. X  
  1242. XAlso notice that some recmail programs may treat a line consisting of
  1243. Xa single period in the first position as end-of-file.
  1244. X
  1245. X
  1246. XACCESSING NEWS REMOTELY  
  1247. X-------------------------
  1248. X
  1249. XI have received the following problem description which seems to
  1250. Xindicate a network problem.  You can now set the variable
  1251. X    retry-on-error
  1252. Xto the number of times nn should try to open an article (you may
  1253. Xwant to do this in the global init file!):
  1254. X  
  1255. X   We are running on a VAXstation 2000, with the news accessed
  1256. X   remotely, so I get a lot of "can't read" errors.  It seems to
  1257. X   me these errors should ALWAYS require acknowledgement before
  1258. X   clearing the message, and should offer the possibility to
  1259. X   re-try the operation (which usually then works for us).
  1260. X
  1261. X
  1262. X
  1263. XECHOING TYPED CHARACTERS
  1264. X------------------------
  1265. X
  1266. Xnn does not echo the characters you type except when you are entering
  1267. Xa string, e.g. a file name.  Instead it attempts to make a significant
  1268. Xchange to the data displayed on the screen.  On a slow system this may
  1269. Xbe seen as a drawback; on fast systems it is an intended feature!
  1270. X
  1271. Xnn uses raw mode when reading from the keyboard and cooked mode when
  1272. Xprinting on the screen (it flips forth and back).  This has caused
  1273. Xproblems on some systems (e.g. the 3B2) where the tty driver is
  1274. Xlocated on a dedicated IOprocessor, which for some reason handles
  1275. Xioctl's "out of band".  I have tried to work around these problems by
  1276. Xoutputting \r\n sequences where \n should have been sufficient.
  1277. X
  1278. Xnn also intentionally discards type-ahead at certain points.
  1279. X
  1280. XOn some systems, TCSETAF also flushes the output queue; you may try to
  1281. Xreplace it by TCSETAW followed by TCFLSH.
  1282. X
  1283. X
  1284. XNNMASTER WILL NOT START
  1285. X-----------------------
  1286. X
  1287. XIf no nnmaster is running, and nnmaster refuses to start up, you
  1288. Xshould check for the existence of the MPID file in the LIB directory,
  1289. XIf it exists, it should be removed.
  1290. X
  1291. X
  1292. XWARNINGS DURING COMPILATION
  1293. X---------------------------
  1294. X
  1295. XIf you get a syntax error when compiling the folder.c file, you
  1296. Xprobably have defined HAVE_DIRECTORY in the s- file, but even though
  1297. Xthe include file exists, it does not define the DIR type.  Either get
  1298. Xhold of a public domain directory package (look in the gnu
  1299. Xdistribution), or just undefine HAVE_DIRECTORY which causes nn to use
  1300. X(much slower) shell commands for file name completion (and disables
  1301. Xthe ?-help for file names).
  1302. X
  1303. XIf the linker complains about not finding the function `strcspn'
  1304. X(whice should be in most standard libraries these days), define the
  1305. Xsymbol STRCSPN in config.h to use the version in regexp.c.
  1306. X
  1307. X
  1308. XFORMATTING THE MANUALS
  1309. X----------------------
  1310. X
  1311. XMany versions of the -man package may have problems handling the `@'
  1312. Xcharacters as hanging tags (.TP).  Fix your man package by
  1313. Xsubstituting ALL occurrences of the @ character in tmac.an (or perhaps
  1314. Xtmac.an.new) by a BEL (^G) character.
  1315. X
  1316. X
  1317. XRESIZING
  1318. X--------
  1319. X
  1320. XResizing only works with termcap (on BSD systems)!
  1321. X
  1322. XIf resizing occurs while reading an article, the article is repositioned
  1323. Xon the first page of the article.
  1324. X
  1325. X
  1326. XNNMASTER AND NN DOES NOT FIND ANY NEWS
  1327. X--------------------------------------
  1328. X
  1329. XThis problem has been seen on some Xenix ports.  I have not had the
  1330. Xtime to dig further into this problem.  If you succeeds in porting nn
  1331. Xto Xenix (286/386), send me the patches + s- and m- files.
  1332. X
  1333. XIn release 6.3, some changes to the way files are opened may solve
  1334. Xthis problem, but I have not tested 6.3 on Xenix.
  1335. X
  1336. X
  1337. XTHE DATABASE BECOMES CORRUPTED FOR NO APPARENT REASON
  1338. X-----------------------------------------------------
  1339. X
  1340. XThis has been seen on some systems in the past.
  1341. XThree causes for these problems have been identified:
  1342. X
  1343. X- There was a serious bug in rel. 6.1 which was solved by patch # 5.
  1344. X  Actually, there were no errors in the database, but nn misinterpreted
  1345. X  some information, and reported that the database was corrupted.
  1346. X
  1347. X- Some .o files had not been recompiled by make after modifying the
  1348. X  config.h file (this happened on SunOS 4.0 which seems to forget to
  1349. X  update file modification times for some files (has anybody seen this
  1350. X  before?)).
  1351. X      
  1352. X- There may still be a bug in the default expire code (when nnmaster
  1353. X  is invoked WITHOUT the -E option) which causes the master to lose
  1354. X  either the first or the last article in the group.  Until we have
  1355. X  this problem sorted out (or determined that there isn't a bug), the
  1356. X  use of -E on the nnmaster is recommended.
  1357. X
  1358. X  
  1359. X8 BIT SUPPORT
  1360. X-------------
  1361. X
  1362. XI am rather embarrassed to admit that a program leaving Denmark in
  1363. X1989 does not support 8 bit character sets - however, that is the
  1364. Xplain truth.  Currently, all characters typed on the keyboard are
  1365. Xstripped to 7 bits, and only printable characters in the 7 bit ASCII
  1366. Xcharacter set are (normally) displayed on the screen.  (You can set
  1367. X'monitor' to see all the characters in an article).
  1368. X
  1369. XAnyway, ISO 8859/1 support is next on my agenda.
  1370. X
  1371. X
  1372. XMAIL RECORDS
  1373. X------------
  1374. X
  1375. XThere are some things you have to consider in connection with the mail
  1376. Xand news record files:
  1377. X
  1378. X - When you :mail to yourself, a copy is not saved in the mail-record.
  1379. X
  1380. X - If the mail/post fails, the message is saved in ~/dead.letter instead
  1381. X
  1382. X - Since the posting is performed in the background and it may take
  1383. X   upto a minute to complete posting an article, updating news-record
  1384. X   will not happen instantly.
  1385. X        
  1386. X - In previous releases the mail header created by nn in the record
  1387. X   files are not recognized by the digest splitting code in nn, i.e.
  1388. X   the always appear to contain a single article.  This is fixed in
  1389. X   release 6.3, but you may have old folders which nn will not be able
  1390. X   to split (there is no From: line).
  1391. X
  1392. X   
  1393. XNNTP PROBLEMS
  1394. X-------------
  1395. X
  1396. XA few problems with the current NNTP support are described in the NNTP
  1397. Xfile. 
  1398. X
  1399. X
  1400. XOTHER PROBLEMS (you might call them bugs)
  1401. X-----------------------------------------
  1402. X
  1403. XThe 'master flags' set on a group with nnadmin are forgotten if the
  1404. Xdatabase is reinitialized with nnmaster -I.
  1405. X
  1406. XThe article selections saved between sessions are kept in a machine
  1407. Xdependent format, so if a user reads news on different architectures
  1408. Xthe selection files may be misinterpreted if they cannot be ignored
  1409. X(there is a magic number in them).
  1410. NO_NEWS_IS_GOOD_NEWS
  1411. chmod 0644 PROBLEMS || echo "restore of PROBLEMS fails"
  1412. set `wc -c PROBLEMS`;Sum=$1
  1413. if test "$Sum" != "8837"
  1414. then echo original size 8837, current size $Sum;fi
  1415. echo "x - extracting Makefile (Text)"
  1416. sed 's/^X//' << 'NO_NEWS_IS_GOOD_NEWS' > Makefile &&
  1417. X#
  1418. X# Makefile for nn release 6.3
  1419. X#
  1420. X# Specify your favourite compiler, preprocessor, and compiler flags:
  1421. X#
  1422. X# Some alternatives for CPP might be /lib/cpp and $(CC) -P
  1423. X# Common values for CFLAGS are '-O -s' or '-g'
  1424. X#
  1425. X
  1426. XCC =        cc
  1427. XCPP =        $(CC) -E
  1428. XCFLAGS =    
  1429. XMAKE =        make
  1430. X
  1431. X#
  1432. X# Before compiling, read the instructions in the file INSTALLATION!
  1433. X# -----------------------------------------------------------------
  1434. X#
  1435. X#    make all    compile programs
  1436. X#    make install    install programs
  1437. X#    make initdb    initialize database
  1438. X#    make clean    remove all make'd files from source directory
  1439. X#
  1440. X# no changes are needed below this line
  1441. X#
  1442. X
  1443. XSHELL = /bin/sh
  1444. X
  1445. Xall: ymakefile
  1446. X    $(MAKE) $(MFLAGS) -f ymakefile all
  1447. X
  1448. Xlint: ymakefile
  1449. X    $(MAKE) -f ymakefile lint
  1450. X
  1451. Xinstall: ymakefile
  1452. X    $(MAKE) $(MFLAGS) -f ymakefile install
  1453. X
  1454. Xinitdb: ymakefile
  1455. X    $(MAKE) $(MFLAGS) -f ymakefile initdb
  1456. X
  1457. Xonline: ymakefile
  1458. X    $(MAKE) $(MFLAGS) -f ymakefile online.manual
  1459. X
  1460. Xclient: ymakefile
  1461. X    $(MAKE) $(MFLAGS) -f ymakefile client
  1462. X
  1463. Xinstall.client: ymakefile
  1464. X    $(MAKE) $(MFLAGS) -f ymakefile install.client
  1465. X
  1466. Xymakefile: Makefile xmakefile config.h
  1467. X    cp xmakefile MF.c
  1468. X    $(CPP) -DCOMPILER="$(CC)" -DPREPROC="$(CPP)" \
  1469. X           -DCDEBUG="$(CFLAGS)" MF.c | \
  1470. X    sed -e '1,/MAKE WILL CUT HERE/d' \
  1471. X        -e '/^#/d' \
  1472. X        -e '/^[ \f    ]$$/d' \
  1473. X        -e '/^[ /]*[*]/d' | \
  1474. X    sed -n -e '/^..*$$/p' > ymakefile
  1475. X    rm -f MF.c
  1476. X
  1477. X#
  1478. X# clean up 
  1479. X#    Will remove object and executeable files.
  1480. X#
  1481. X
  1482. Xclean:    ymakefile
  1483. X    make -f ymakefile clean
  1484. X    rm -f *.o *~ ymakefile
  1485. X
  1486. X#
  1487. X# distribution
  1488. X#
  1489. X
  1490. Xdistrib:
  1491. X    [ ! -d DIST ]
  1492. X    mkdir DIST
  1493. X    cp `cat MANIFEST` DIST
  1494. X    echo '#define UPDATE 0' > DIST/update.h
  1495. X    cd DIST ; shar -v -s -d'NO_NEWS_IS_GOOD_NEWS' \
  1496. X          -onn-6.3. -l50 `cat MANIFEST`
  1497. X
  1498. X
  1499. NO_NEWS_IS_GOOD_NEWS
  1500. chmod 0644 Makefile || echo "restore of Makefile fails"
  1501. set `wc -c Makefile`;Sum=$1
  1502. if test "$Sum" != "1661"
  1503. then echo original size 1661, current size $Sum;fi
  1504. echo "x - extracting active.c (Text)"
  1505. sed 's/^X//' << 'NO_NEWS_IS_GOOD_NEWS' > active.c &&
  1506. X/*
  1507. X * read/update incore copy of active file
  1508. X */
  1509. X
  1510. X#include "config.h"
  1511. X
  1512. X#ifdef NNTP
  1513. Xchar news_active[FILENAME];
  1514. X#else
  1515. Xchar news_active[] = NEWS_ACTIVE;
  1516. X#endif
  1517. X
  1518. Xvisit_active_file()
  1519. X{
  1520. X    FILE *act;
  1521. X    char line[512];
  1522. X    register char *cp, *name;
  1523. X    register group_header *gh;
  1524. X    group_header *add_new_group();
  1525. X
  1526. X#ifdef NNTP
  1527. X    FILE *nntp_act;
  1528. X    
  1529. X    nntp_act = NULL;
  1530. X
  1531. X    if (use_nntp)
  1532. X    nntp_get_active();
  1533. X    else
  1534. X    if (is_master)        /* copy 'active' to DB/ACTIVE */
  1535. X        nntp_act = open_file(relative(db_directory, "ACTIVE"), OPEN_CREATE | MUST_EXIST);
  1536. X#endif
  1537. X
  1538. X    act = open_file(news_active, OPEN_READ|MUST_EXIST);
  1539. X    
  1540. X    while (fgets(line, 512, act)) {
  1541. X#ifdef NNTP
  1542. X    if (nntp_act != NULL)
  1543. X        fputs(line, nntp_act);
  1544. X#endif    
  1545. X    cp = line;
  1546. X    while (*cp && isspace(*cp)) cp++; /* eat blank lines */
  1547. X    if (*cp == NUL || *cp == '#') continue;
  1548. X    
  1549. X    /* cp -> NAME space 00888 ... nl */
  1550. X    name = cp;
  1551. X    while (*cp != ' ') cp++;
  1552. X    *cp++ = NUL;
  1553. X    
  1554. X    gh = lookup(name);
  1555. X    if (gh == NULL) {
  1556. X        /* new group */
  1557. X        gh = add_new_group(name);
  1558. X        if (gh == NULL) continue;
  1559. X    }
  1560. X    
  1561. X    while (*cp && isspace(*cp)) cp++;
  1562. X    gh->last_article = atol(cp);
  1563. X
  1564. X    while (*cp && isdigit(*cp)) cp++;
  1565. X    while (*cp && isspace(*cp)) cp++;
  1566. X    
  1567. X    if (*cp == NUL) {
  1568. X        log_entry('E', "Error in active file for entry %s", name);
  1569. X        continue;
  1570. X    }
  1571. X
  1572. X    gh->first_article = atol(cp);
  1573. X    if (gh->first_article == 0) gh->first_article = 1;
  1574. X
  1575. X    while (*cp && isdigit(*cp)) cp++;
  1576. X    while (*cp && isspace(*cp)) cp++;
  1577. X    if (*cp == NUL) continue;
  1578. X    
  1579. X    if (*cp == 'm') 
  1580. X        gh->group_flag |= G_MODERATED;
  1581. X    else
  1582. X        gh->group_flag &= ~G_MODERATED;
  1583. X    }
  1584. X
  1585. X    fclose(act);
  1586. X#ifdef NNTP
  1587. X    if (nntp_act != NULL)
  1588. X    fclose(nntp_act);
  1589. X#endif    
  1590. X}
  1591. X
  1592. NO_NEWS_IS_GOOD_NEWS
  1593. chmod 0644 active.c || echo "restore of active.c fails"
  1594. set `wc -c active.c`;Sum=$1
  1595. if test "$Sum" != "1677"
  1596. then echo original size 1677, current size $Sum;fi
  1597. echo "x - extracting admin.c (Text)"
  1598. sed 's/^X//' << 'NO_NEWS_IS_GOOD_NEWS' > admin.c &&
  1599. X/*
  1600. X * nnadmin - nn administator program
  1601. X */
  1602. X
  1603. X#include <signal.h>
  1604. X#include <errno.h>
  1605. X#include "config.h"
  1606. X#include "db.h"
  1607. X#include "term.h"
  1608. X
  1609. Xstatic char *pre_input;
  1610. Xstatic int verbose = 1;
  1611. X
  1612. Xextern int group_completion();
  1613. X
  1614. X
  1615. Xstatic get_cmd(prompt1, prompt2)
  1616. Xchar *prompt1, *prompt2;
  1617. X{
  1618. X    char c;
  1619. X
  1620. X    if (s_hangup) {
  1621. X    printf("\nnnmaster hangup\n");
  1622. X    nn_exit(0);
  1623. X    }
  1624. X
  1625. X    if (pre_input) {
  1626. X    if ((c = *pre_input++) == NUL)
  1627. X        nn_exit(0);
  1628. X    } else {
  1629. X    if (prompt1) printf("%s\n", prompt1);
  1630. X    if (prompt2) printf("%s >>>", prompt2);
  1631. X    fl;
  1632. X        raw();
  1633. X    c = get_c();
  1634. X    no_raw();
  1635. X    printf("%c\n\n\r", c);
  1636. X    }
  1637. X    
  1638. X    if (islower(c)) 
  1639. X    c = toupper(c);
  1640. X    
  1641. X    return c;
  1642. X}
  1643. X
  1644. X
  1645. Xstatic long get_entry(prompt_str, min_val, max_val)
  1646. Xchar *prompt_str;
  1647. Xlong min_val, max_val;
  1648. X{
  1649. X    char buf[100];
  1650. X    int val;
  1651. X    
  1652. X loop:
  1653. X    
  1654. X    printf("%s %ld..%ld (or all): ", prompt_str, min_val, max_val);
  1655. X    fl;
  1656. X    gets(buf);
  1657. X    if (buf[0] == 'a')
  1658. X    return -1;
  1659. X
  1660. X    val =  atol(buf);
  1661. X    if (val < min_val || val > max_val) goto loop;
  1662. X    
  1663. X    return val;
  1664. X}
  1665. X
  1666. X
  1667. Xstatic admin_confirm(action)
  1668. Xchar *action;
  1669. X{
  1670. X    char buffer[100];
  1671. X
  1672. X    if (pre_input) return 1;
  1673. X    
  1674. X    sprintf(buffer, "Confirm %s  Y)es N)o", action);
  1675. X    
  1676. X    return get_cmd((char *)NULL, buffer) == 'Y';
  1677. X}
  1678. X
  1679. X
  1680. Xadmin_mode(input_string)
  1681. Xchar *input_string;
  1682. X{
  1683. X    if (input_string && *input_string) {
  1684. X    pre_input = input_string;
  1685. X    } else {
  1686. X    pre_input = NULL;
  1687. X    printf("\nMaster is%s running\n",
  1688. X           access(relative(lib_directory, "MPID"), 0) ? " NOT" : "");
  1689. X    }
  1690. X    
  1691. X    for (;;) {
  1692. X    switch(get_cmd(
  1693. X"\nU)pdate W)akeup M)aster G)roups L)og S)tat C)onf E)xpire I)nit V)alidate Q)uit",
  1694. X"ADMIN")) {
  1695. X        
  1696. X     case 'M':
  1697. X        master_admin();
  1698. X        break;
  1699. X
  1700. X     case 'W':
  1701. X        kill_master_1(SIGALRM);
  1702. X        break;
  1703. X        
  1704. X     case 'E':
  1705. X        if (admin_confirm("Expire All Groups"))
  1706. X        send_master('X', -1L, 0L);
  1707. X        break;
  1708. X
  1709. X     case 'I':
  1710. X        if (admin_confirm("INITIALIZATION, i.e. recollect all groups"))
  1711. X        send_master('R', -1L, 0L);
  1712. X        break;
  1713. X
  1714. X     case 'G':
  1715. X        group_admin();
  1716. X        break;
  1717. X        
  1718. X     case 'L':
  1719. X        log_admin();
  1720. X        break;
  1721. X        
  1722. X     case 'S':
  1723. X        master_status();
  1724. X        break;
  1725. X
  1726. X     case 'C':
  1727. X        show_config();
  1728. X        break;
  1729. X        
  1730. X     case 'U':
  1731. X        update_master();
  1732. X        break;
  1733. X
  1734. X     case 'Z':
  1735. X        verbose = 0;
  1736. X        /* FALL THRU */
  1737. X     case 'V':
  1738. X        validate_groups();
  1739. X        verbose = 1;
  1740. X        break;
  1741. X
  1742. X     case '=':
  1743. X        verbose = !verbose;
  1744. X        break;
  1745. X        
  1746. X     case 'Q':
  1747. X        return;
  1748. X    }
  1749. X    }    
  1750. X}
  1751. X
  1752. Xstatic update_master()
  1753. X{
  1754. X    extern FILE *master_file;
  1755. X    register group_header *gh;
  1756. X    int ngp;
  1757. X    
  1758. X    ngp = master.number_of_groups;
  1759. X    
  1760. X    rewind(master_file);
  1761. X    db_read_master(master_file, &master);
  1762. X    
  1763. X    if (master.number_of_groups != ngp) {
  1764. X    printf("\nNumber of groups changed from %d to %d\n",
  1765. X           ngp, master.number_of_groups);
  1766. NO_NEWS_IS_GOOD_NEWS
  1767. echo "End of part 1"
  1768. echo "File admin.c is continued in part 2"
  1769. echo "2" > s2_seq_.tmp
  1770. exit 0
  1771. ---
  1772. Kim F. Storm        storm@texas.dk        Tel +45 429 174 00
  1773. Texas Instruments, Marielundvej 46E, DK-2730 Herlev, Denmark
  1774.       No news is good news, but nn is better!
  1775.  
  1776.