home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / de / comp / sources / os9 / 2 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  44.0 KB

  1. Xref: sparky de.comp.sources.os9:2 comp.os.os9:1544
  2. Path: sparky!uunet!cs.utexas.edu!sun-barr!news2me.EBay.Sun.COM!seven-up.East.Sun.COM!sungy!stasys!stasys!not-for-mail
  3. From: frank.kaefer@stasys.sta.sub.org (Frank Kaefer)
  4. Newsgroups: de.comp.sources.os9,comp.os.os9
  5. Subject: MNews Prerelease Part01/09
  6. Message-ID: <1hafd2INNpsi@stasys.sta.sub.org>
  7. Date: 23 Dec 92 19:41:22 GMT
  8. Sender: news@stasys.sta.sub.org
  9. Followup-To: de.comp.sources.d
  10. Organization: Stasys News Server, Starnberg, Germany
  11. Lines: 1667
  12. Approved: frank.kaefer@stasys.sta.sub.org (Frank Kaefer)
  13. NNTP-Posting-Host: stasys.sta.sub.org
  14.  
  15. Submitted-by: Ulrich Dessauer <ud@Nightmare.ddt.sub.org>
  16. Archive-name: mnews/part01
  17.  
  18. : ----- Cut here ----- Cut here ----- Cut here ----- Cut here -----
  19. : Use  sh filename  to extract shell archive
  20. : This shell archive contains following files:
  21. :     'MANIFEST                                     5347 bytes'
  22. :     'Copyright                                     663 bytes'
  23. :     'inst.prf                                     6163 bytes'
  24. :     '8BIT                                        (Directory)'
  25. :     'INEWS                                       (Directory)'
  26. :     'LIB                                         (Directory)'
  27. :     'LOCK                                        (Directory)'
  28. :     'MAN                                         (Directory)'
  29. :     'MISC                                        (Directory)'
  30. :     'RNEWS                                       (Directory)'
  31. :     'SBATCH                                      (Directory)'
  32. :     'SH                                          (Directory)'
  33. :     'config.h                                     6195 bytes'
  34. :     'news.h                                       2624 bytes'
  35. :     'patchlevel.h                                   52 bytes'
  36. :     'xc                                            315 bytes'
  37. :     '8BIT/Makefile                                 400 bytes'
  38. :     '8BIT/c8type.c                                6247 bytes'
  39. :     '8BIT/c8type.h                                1416 bytes'
  40. :     '8BIT/conv.c                                  3469 bytes'
  41. :     '8BIT/inp.c                                   1516 bytes'
  42. :     'INEWS/Makefile                               2889 bytes'
  43. if test -f 'MANIFEST' ; then
  44.   echo 'File MANIFEST already exists, overwriting it'
  45.   del 'MANIFEST'
  46. fi
  47. echo Extracting \"'MANIFEST'\"
  48. sed "s/^X//" >'MANIFEST' <<'__END__OF__THIS__FILE__'
  49. XFilename                  Part   Description
  50. X----------------------------------------------------
  51. XMANIFEST                  1      This shipping list
  52. XCopyright                 1      Copyright notice
  53. Xinst.prf                  1      installation guide
  54. X8BIT                      1      Library for 8 bit support
  55. XINEWS                     1      The main news manager program
  56. XLIB                       1      Example files
  57. XLOCK                      1      Library for event locking
  58. XMAN                       1      Manual pages
  59. XMISC                      1      Some utilities
  60. XRNEWS                     1      Receive news
  61. XSBATCH                    1      Send batched news
  62. XSH                        1      Shellscripts for sh
  63. Xconfig.h                  1      Global configuration include file
  64. Xnews.h                    1      
  65. Xpatchlevel.h              1      
  66. Xxc                        1      
  67. X8BIT/Makefile             1      
  68. X8BIT/c8type.c             1      
  69. X8BIT/c8type.h             1      
  70. X8BIT/conv.c               1      
  71. X8BIT/inp.c                1      
  72. XINEWS/Makefile            1      
  73. XINEWS/RELS                2      
  74. XINEWS/achk.c              2      
  75. XINEWS/adm.c               2      
  76. XINEWS/alias.c             2      
  77. XINEWS/app.c               2      
  78. XINEWS/arc.c               2      
  79. XINEWS/build.c             2      
  80. XINEWS/ccan.c              2      
  81. XINEWS/cchk.c              2      
  82. XINEWS/cnew.c              2      
  83. XINEWS/crct.c              2      
  84. XINEWS/crm.c               2      
  85. XINEWS/crth.c              2      
  86. XINEWS/csme.c              3      
  87. XINEWS/cssys.c             3      
  88. XINEWS/csuu.c              3      
  89. XINEWS/csver.c             3      
  90. XINEWS/ctrl.c              3      
  91. XINEWS/dbg.c               3      
  92. XINEWS/ddst.c              3      
  93. XINEWS/delh.c              3      
  94. XINEWS/exp.c               3      
  95. XINEWS/ext.h               3      
  96. XINEWS/fcan.c              3      
  97. XINEWS/ffrom.c             3      
  98. XINEWS/ffup.c              3      
  99. XINEWS/getd.c              3      
  100. XINEWS/gfh.c               3      
  101. XINEWS/ghead.c             3      
  102. XINEWS/hact                3      
  103. XINEWS/hash.c              3      
  104. XINEWS/hist.h              3      
  105. XINEWS/ihead.c             3      
  106. XINEWS/inews.c             3      
  107. XINEWS/inews.h             3      
  108. XINEWS/inrd.c              4      
  109. XINEWS/limit.c             4      
  110. XINEWS/list.c              4      
  111. XINEWS/mail.c              4      
  112. XINEWS/makh.c              4      
  113. XINEWS/mcan.c              4      
  114. XINEWS/mhead.c             4      
  115. XINEWS/mid.c               4      
  116. XINEWS/misc.c              4      
  117. XINEWS/mit.c               4      
  118. XINEWS/oart.c              4      
  119. XINEWS/ohist.c             4      
  120. XINEWS/pargs.c             4      
  121. XINEWS/pit.c               4      
  122. XINEWS/pmail.c             4      
  123. XINEWS/psys.c              5      
  124. XINEWS/ract.c              5      
  125. XINEWS/retr.c              5      
  126. XINEWS/rhead.c             5      
  127. XINEWS/rsat.c              5      
  128. XINEWS/rsys.c              5      
  129. XINEWS/sect.c              5      
  130. XINEWS/shead.c             5      
  131. XINEWS/sinfo.c             5      
  132. XINEWS/sit.c               5      
  133. XINEWS/spch.c              5      
  134. XINEWS/store.c             5      
  135. XINEWS/tsys.c              5      
  136. XINEWS/uidummy.c           6      
  137. XINEWS/unln.c              6      
  138. XINEWS/wact.c              6      
  139. XINEWS/wgrp.c              6      
  140. XINEWS/wit.c               6      
  141. XLIB/Active                6      
  142. XLIB/Aliases               6      
  143. XLIB/Archive               6      
  144. XLIB/Checkgroups           6      
  145. XLIB/Convtable             6      
  146. XLIB/Distributions         6      
  147. XLIB/Followup              6      
  148. XLIB/Logfile               6      
  149. XLIB/Sys                   6      
  150. XLIB/send_uuname           6      
  151. XLOCK/Makefile             6      
  152. XLOCK/lock.c               6      
  153. XLOCK/lock.h               6      
  154. XMAN/8bit.prf              6      
  155. XMAN/Active.prf            6      
  156. XMAN/Checkgroups.prf       6      
  157. XMAN/Delold.prf            6      
  158. XMAN/Distributions.prf     6      
  159. XMAN/Followup.prf          6      
  160. XMAN/Inews.prf             6      
  161. XMAN/Manuals.t.Z.uu        6      
  162. XMAN/News_in.prf           7      
  163. XMAN/News_out.prf          7      
  164. XMAN/Rnews.prf             7      
  165. XMAN/Sbatch.prf            7      
  166. XMAN/Sys.prf               7      
  167. XMISC/Makefile             7      
  168. XMISC/decode.c             7      
  169. XMISC/delold.c             7      
  170. XMISC/encode.c             7      
  171. XMISC/news_in.c            7      
  172. XMISC/news_out.c           7      
  173. XMISC/nstat.c              7      
  174. XMISC/rot13.c              7      
  175. XMISC/unmap.c              7      
  176. XRNEWS/Makefile            7      
  177. XRNEWS/compr.c             7      
  178. XRNEWS/compr7.c            8      
  179. XRNEWS/conv.c              8      
  180. XRNEWS/logit.c             8      
  181. XRNEWS/mail.c              8      
  182. XRNEWS/rnews.c             8      
  183. XRNEWS/rnews.h             8      
  184. XRNEWS/send.c              8      
  185. XSBATCH/Makefile           8      
  186. XSBATCH/batch.c            8      
  187. XSBATCH/com.c              8      
  188. XSBATCH/com7.c             8      
  189. XSBATCH/conv.c             8      
  190. XSBATCH/exec.c             8      
  191. XSBATCH/file.c             8      
  192. XSBATCH/none.c             8      
  193. XSBATCH/sbatch.c           8      
  194. XSBATCH/sbatch.h           9      
  195. XSH/check.sh               9      
  196. XSH/install.sh             9      
  197. XSH/respool.sh             9      
  198. __END__OF__THIS__FILE__
  199. if test -f 'Copyright' ; then
  200.   echo 'File Copyright already exists, overwriting it'
  201.   del 'Copyright'
  202. fi
  203. echo Extracting \"'Copyright'\"
  204. sed "s/^X//" >'Copyright' <<'__END__OF__THIS__FILE__'
  205. X            ** ATTENTION **
  206. X
  207. X    The whole package is copyrighted by
  208. X
  209. X        Ulrich Dessauer
  210. X        Kerschensteinerstr. 45
  211. X        D-8034 Germering
  212. X
  213. X    Your are allowed to copy and modify the source to your
  214. X    wishes, but you aren't allowed to
  215. X    a.) sell parts or the whole package, so no part of source,
  216. X        documentation or other parts may be forwarded for profit.
  217. X    b.) use this in an enviroment for which you charge the users.
  218. X    c.) change the source and forward it without the original
  219. X    d.) redistribute the package without this copyright notice.
  220. X    e.) redistribute only parts of the package.
  221. X
  222. X    If you want to use the package for something mentioned above
  223. X    contact me for a special agreement.
  224. __END__OF__THIS__FILE__
  225. if test -f 'inst.prf' ; then
  226.   echo 'File inst.prf already exists, overwriting it'
  227.   del 'inst.prf'
  228. fi
  229. echo Extracting \"'inst.prf'\"
  230. sed "s/^X//" >'inst.prf' <<'__END__OF__THIS__FILE__'
  231. X.define rcs-log
  232. X$Log:    inst.prf_v $
  233. XRevision 1.1  90/08/31  13:58:57  ud
  234. XInitial revision
  235. X
  236. XCopyright (C) 1989, 1990 by Ulrich Dessauer, Germering, Germany.
  237. X.en
  238. X.m1 0
  239. X.m2 0
  240. X.nopaging
  241. X.offset 5
  242. X.rightmargin 70
  243. X.ec \
  244. X.ce
  245. XMNews - pre 2. Release
  246. X
  247. X.ul
  248. X1. Copyright
  249. X
  250. X.in +3
  251. X.ti +2
  252. XThis package is copyrighted by Ulrich Dessauer, Germering, Germany. 
  253. XYou may copy and redistribute this package in whole but only in source
  254. Xand this notice have to be included.  If you made changes then you have
  255. Xto redistribute the original source as well.  Everything else isn't
  256. Xpermitted by the athor; you must not sell the program for profit, you
  257. Xmust not use it in a commercial enviroment and everything else which
  258. Xisn't explicit allowed. 
  259. X
  260. X.ti +2
  261. XThe programs
  262. X.bold
  263. Xencode
  264. Xand
  265. X.bold
  266. Xdecode
  267. Xaren't copyright by me, they are normally part of the BNews 2.11
  268. Xdistribution and are only included to be compatible with this news
  269. Xsystem.
  270. X.in -3
  271. X
  272. X.ul
  273. X2. Installing
  274. X
  275. X.in +3
  276. X.ti +2
  277. XBefore installing the software itself you have to edit your sysinfo
  278. Xdatabase and add some entry for the package:
  279. X.ce 2
  280. Xlck.sbatch,l
  281. Xlck.inews,l
  282. X
  283. X.ti +2
  284. XThe news package needs an own account to run under this uid. I advice
  285. Xto use an user `news' with a group `news'. Remember the uid and gid of
  286. Xthis account; All binaries and configuration files have to be owned by
  287. Xthis account (the file and on modules also the module).
  288. X
  289. X.ti +2
  290. XYou should have unshared the package and find some subdirectories. The
  291. Xdirectory where this paper can be found is now called the root directory
  292. Xof the package. You can find a file `config.h' there; please edit it and
  293. Xadapt it to your local system. This will be everywhere included where it
  294. Xwill be useful.
  295. X
  296. X.ti +2
  297. XThen go through all subdirectories and glance through the makefiles to
  298. Xplace the binaries to proper places. Now compile the whole stuff and
  299. Xcreate the necessary directories. On default these are
  300. X.ce 7
  301. X/h0/USR/LIB/NEWS
  302. X/h0/USR/LIB/NEWS/HISTORY
  303. X/h0/SPOOL/NEWS
  304. X/h0/SPOOL/BATCH
  305. X/h0/SPOOL/RNEWS
  306. Xand
  307. X/h0/SPOOL/TNEWS
  308. X
  309. X.ti +2
  310. XCopy the files found in the `LIB' directory to /h0/USR/LIB/NEWS and
  311. Xedit them to reflect your system.  The format of the files are explained
  312. Xin the manual entries in the `MAN` subdirectory.  (Don't forget to
  313. Xchange the owner of all these directories and files!)
  314. X
  315. X.ti +2
  316. XNow log in as `news' (or just make `su news') and execute the
  317. Xfollowing commands:
  318. X.ce 2
  319. Xinews -c=newgroup:control -v </nil
  320. Xinews -c=newgroup:junk -v </nil
  321. X
  322. X.ti +2
  323. XYou should then create (or get) a file called newsgroups where all
  324. Xnewsgroups are listen (one per line) which you like to have on your
  325. Xsystem. Execute the following command:
  326. X.ce
  327. Xinews -c=checkgroups -v <newsgroups
  328. X
  329. X.ti +2
  330. XNow you can find a mail in the mailbox of the news account. The body
  331. Xof the mail can be fed to `shell' to create all desired newsgroups.
  332. XEverything of the package should now be installed correct. If you have
  333. Xhad some problems have a short look in the logfile in `/h0/USR/LIB/NEWS'
  334. Xwhere some hints may be found.
  335. X
  336. X.ti +2
  337. XOr try the shellscript
  338. X.bold
  339. Xinstall.sh
  340. Xto do the whole thing for you. I am not sure if it really does everthing
  341. Xokay, but it is a handy way to do all theses steps by a program. To run
  342. Xthis script, use `sh', not `shell' or `csh'!
  343. X.in -3
  344. X
  345. X.ul
  346. X3. Setting up the System
  347. X
  348. X.in +3
  349. X.ti +2
  350. XFor a regular use you need to install some entries for cron. First
  351. Xallow the user `news' to use cron (vcron users have to add news as a
  352. Xmember of the group `cron' in /h0/SYS/groups). For UUCP you have to
  353. Xallow the command `rnews' to be executed by a remote machine. For every
  354. Xsystem you feed news to you have to start the `sbatch' program before
  355. Xthis system calls you (or you call it). This will collect all new
  356. Xarticles and batch them for the remote system. If you like to use
  357. Xcompressed sending you need the `compress' program (not the OS-9 one, a
  358. Xgood working version can be found on TOP disks).
  359. X
  360. X.ti +2
  361. XThe more news you receive the faster the available free space on your
  362. Xharddisk will be eaten. So you need to delete old articles from time to
  363. Xtime. This can be done by running `inews' with proper options (refer to
  364. Xthe manual for the exact syntax of expire).
  365. X
  366. X.ti +2
  367. XIf you like, you can run the shell-script
  368. X.bold
  369. Xcheck.sh
  370. Xto glance over your installation and see if everything will be okay.
  371. X.in -3
  372. X
  373. X.ul
  374. X4. Reading and Writing News
  375. X
  376. X.in +3
  377. X.ti +2
  378. XThere are already some ports of newsreader for OS-9. The `NN' has been
  379. Xported, `tass' has been ported and maybe a lot of other readers.
  380. X
  381. X.ti +2
  382. XIf you like to write your own newsreader you can use the predefined
  383. Xuser interface. For details refer to the source.
  384. X.in -3
  385. X
  386. X.ul
  387. X5. Internal
  388. X
  389. X.in +3
  390. X.ti +2
  391. XFirst of all, the programs `rnews' and `sbatch' had originally be
  392. Xwritten for receiving compressed news to forward them to the notes
  393. Xsystem. So the source style may differ from the inews program, but I
  394. Xhope it is still understandable.
  395. X
  396. X.ti +2
  397. XMNews stores the articles as single files in a directory tree matching
  398. Xthe newsgroup of the article. All articles are found under
  399. X/h0/SPOOL/NEWS. Some examples for filenames for some newsgroups (I asume
  400. Xas the current number for each group a one; this will be increased on
  401. Xevery new article in this group):
  402. X.ce 3
  403. Xsub.sources.os9 --> sub/sources/os9/1
  404. Xjunk --> junk/1
  405. Xcomp.lang.c++ --> comp/lang/c__/1
  406. X
  407. X.ti +2
  408. XThe filename converting takes only on creating the filenames
  409. Xthemselves place; the name of the newsgroup aren't changed. A feature of
  410. Xnews are so called `crosspostings'. On UNIX(tm) systems the article in
  411. Xtheses groups are linked together. OS-9 doesn't (officially) supports
  412. Xlinks so MNews writes the article itself in the first newsgroup and in
  413. Xall other newsgroup there is only the filename of the original article,
  414. Xprefixed by some (hopefully) unique characters. In this release hardlinks
  415. Xare also supported. To use hardlinks you must have a call
  416. X.bold
  417. Xlink()
  418. Xanywhere and link it to the inews program. Some versions of this function
  419. Xare available and you may include one into your `os9lib.l'.
  420. X
  421. X.ti +2
  422. XSo if you want to adapt some software which is running on *IX you have
  423. Xto change the accesses on the files in the lib-directory and on the
  424. Xarticles themselves.
  425. X
  426. X.ce
  427. XEnjoy Usenet on OSK!
  428. __END__OF__THIS__FILE__
  429. if test -d '8BIT' ; then
  430.   echo 'Directory 8BIT already exists'
  431. else
  432.   echo Make directory \"'8BIT'\"
  433.   makdir '8BIT'
  434. fi
  435. if test -d 'INEWS' ; then
  436.   echo 'Directory INEWS already exists'
  437. else
  438.   echo Make directory \"'INEWS'\"
  439.   makdir 'INEWS'
  440. fi
  441. if test -d 'LIB' ; then
  442.   echo 'Directory LIB already exists'
  443. else
  444.   echo Make directory \"'LIB'\"
  445.   makdir 'LIB'
  446. fi
  447. if test -d 'LOCK' ; then
  448.   echo 'Directory LOCK already exists'
  449. else
  450.   echo Make directory \"'LOCK'\"
  451.   makdir 'LOCK'
  452. fi
  453. if test -d 'MAN' ; then
  454.   echo 'Directory MAN already exists'
  455. else
  456.   echo Make directory \"'MAN'\"
  457.   makdir 'MAN'
  458. fi
  459. if test -d 'MISC' ; then
  460.   echo 'Directory MISC already exists'
  461. else
  462.   echo Make directory \"'MISC'\"
  463.   makdir 'MISC'
  464. fi
  465. if test -d 'RNEWS' ; then
  466.   echo 'Directory RNEWS already exists'
  467. else
  468.   echo Make directory \"'RNEWS'\"
  469.   makdir 'RNEWS'
  470. fi
  471. if test -d 'SBATCH' ; then
  472.   echo 'Directory SBATCH already exists'
  473. else
  474.   echo Make directory \"'SBATCH'\"
  475.   makdir 'SBATCH'
  476. fi
  477. if test -d 'SH' ; then
  478.   echo 'Directory SH already exists'
  479. else
  480.   echo Make directory \"'SH'\"
  481.   makdir 'SH'
  482. fi
  483. if test -f 'config.h' ; then
  484.   echo 'File config.h already exists, overwriting it'
  485.   del 'config.h'
  486. fi
  487. echo Extracting \"'config.h'\"
  488. sed "s/^X//" >'config.h' <<'__END__OF__THIS__FILE__'
  489. X/*
  490. X *    configuration header file for the mnews package
  491. X *
  492. X * $Log:    config.h_v $
  493. X * Revision 1.2  91/05/21  17:12:51  ud
  494. X * Added defines for in memory operation (possibly a speedup if working on
  495. X * a harddisk) and for short message ids
  496. X * 
  497. X * Revision 1.1  90/08/31  13:58:20  ud
  498. X * Initial revision
  499. X *
  500. X */
  501. X/*
  502. X *    This is the default command to forward News to
  503. X *    another system. The News Articles will be written
  504. X *    on stdin of this program.
  505. X *    (%G will be replaced by the grading character, %S by
  506. X *    the system name)
  507. X */
  508. X/* # define    MNEWS_TRANSPORT        "uux -r - '%S!rnews'"        /* */
  509. X# define    MNEWS_TRANSPORT        "uux -r -g%G - '%S!rnews'"    /* */
  510. X
  511. X/*
  512. X *    This directory contains the list of filenames of new
  513. X *    articles (of ...) to be send to a remote system
  514. X */
  515. X# define    MNEWS_BATCHDIR        "/h0/SPOOL/BATCH"
  516. X
  517. X/*
  518. X *    This is the `root' directory of the news hirarchy
  519. X */
  520. X# define    MNEWS_NEWSDIR        "/h0/SPOOL/NEWS"
  521. X
  522. X/*
  523. X *    If rnews has problems when feeding an article to inews, it moves
  524. X *    this article to a special directory; this is the path of this
  525. X *    directory
  526. X */
  527. X# define    MNEWS_RNEWS_SPOOLDIR    "/h0/SPOOL/RNEWS"
  528. X
  529. X/*
  530. X *    This is the full pathname of the logfile for rnews. It will
  531. X *    only be written, if it already exists. To use it, touch this
  532. X *    file
  533. X */
  534. X# define    MNEWS_RNEWS_LOGFILE    "/h0/SPOOL/UUCP/.LOG/rnews.log"
  535. X
  536. X/*
  537. X *    in this directory are all config file for the news package
  538. X *    (Active, Sys, etc.)
  539. X */
  540. X# define    MNEWS_NEWSLIB        "/h0/USR/LIB/NEWS"
  541. X
  542. X/*
  543. X *    if the articles can't be inserted then store them temporarly
  544. X *    in this temp.spooldir.
  545. X */
  546. X# define    MNEWS_TSPOOLDIR        "/h0/SPOOL/TNEWS"
  547. X
  548. X/*
  549. X *    If you want to include your host including your
  550. X *    hostdomain in the `Path:' field you should define
  551. X *    this.
  552. X */
  553. X/* # define    USE_FULLHOST            /* */
  554. X
  555. X# ifdef        USE_FULLHOST
  556. X/*
  557. X *    If the full hostdomain should be used and no extra entry
  558. X *    for the hostname then define this
  559. X */
  560. X/* # define    USE_ONLY_FULLHOST        /* */
  561. X# endif        USE_FULLHOST
  562. X
  563. X/*
  564. X *    If you don't allow dots in the distribution field then
  565. X *    use this define (I received articles with the whole
  566. X *    group as distribution, this makes no sense...)
  567. X */
  568. X# define    NO_DOT_IN_DIST            /* */
  569. X
  570. X/*
  571. X *    If you like to have the sitename of your neighbor to be
  572. X *    a default distribution then define this
  573. X */
  574. X# define    ADD_SITENAME_AS_DISTRIBUTION    /* */
  575. X
  576. X/*
  577. X *    Headerlines may be split off to several lines,
  578. X *    started with a whitespace. If you prefer to concat
  579. X *    them to one line you should define this
  580. X */
  581. X/* # define    CAT_LINES            /* */
  582. X
  583. X/*
  584. X *    If you want to have the group `control' in the sys entry
  585. X *    for each system (as a default value), then define this
  586. X */
  587. X/* # define    DEFAULT_CTRL            /* */
  588. X
  589. X/*
  590. X *    If you are creating a control message and want always
  591. X *    to place the article in the group `control' too,
  592. X *    define this
  593. X */
  594. X/* # define    ALWAYS_CONTROL            /* */
  595. X
  596. X/*
  597. X *    If you like to automatically insert `world' as a distribution
  598. X *    for every entry in the sys file, define this.
  599. X */
  600. X/* # define    ALWAYS_DIST_WORLD        /* */
  601. X
  602. X/*
  603. X *    If you want to allow controlmessages like sendsys, version
  604. X *    and uuname are executed for world distribution, define this
  605. X */
  606. X# define    SEND_WORLD            /* */
  607. X
  608. X/*
  609. X *    If you don't want to have a group `junk' define this;
  610. X *    you should know what happens, if you have this defined,
  611. X *    so if you aren't sure, don't define this!
  612. X*/
  613. X/* # define    NO_JUNK                /* */
  614. X
  615. X/*
  616. X *    If you want to insert a local Xref: line (used by some
  617. X *    newsreaders) define this
  618. X */
  619. X# define    USE_XREF            /* */
  620. X
  621. X/*
  622. X *    In several cases a mail is send to someone
  623. X *    if you want that a copy of the mail is sent
  624. X *    to the local postmaster define this
  625. X */
  626. X# define    COPY_TO_POSTMASTER        /* */
  627. X
  628. X/*
  629. X *    If someone posts to a moderated group this article will
  630. X *    be send as a mail to the moderator. To disable this feature
  631. X *    define this
  632. X */
  633. X/* # define    NO_MAIL_TO_MODERATOR        /* */
  634. X
  635. X/*
  636. X *    If you want to allow a user to forward a written article
  637. X *    also as a mail, define this (you then also need to define
  638. X *    the command to invoke the mailer):
  639. X */
  640. X# define    CAN_MAIL            /* */
  641. X# ifdef        CAN_MAIL
  642. X# define    MAILCMD            "rmail"
  643. X# endif        /* CAN_MAIL */
  644. X
  645. X/*
  646. X *    If you want to execute a newgroup or a rmgroup control
  647. X *    message automatically then define this here:
  648. X */
  649. X/* # define    AUTO_NEWGROUP            /* */
  650. X/* # define    AUOT_RMGROUP            /* */
  651. X
  652. X/*
  653. X *    Define this if you want to store the history for newsarticle
  654. X *    in a ndbm-file instead of single files
  655. X *    To use dbm, you have to change the Makefile in INEWS. Add
  656. X *    the dbm-Library and increase the -M=<val> value to ensure
  657. X *    that there is enough stack for the dbm Routines (some NDBM
  658. X *    versions are using variables with 1, 2 or 4 kBytes in
  659. X *    local functions).
  660. X */
  661. X/* # define    USE_NDBM            /* */
  662. X
  663. X/*
  664. X *    If you prefer a short message id then define this. The short
  665. X *    message id _may_ cause some problems on systems which aren't
  666. X *    fully RFC 1036 compatible.
  667. X */
  668. X/* # define    SHORT_MSGID            /* */
  669. X
  670. X/*
  671. X *    If you want to speedup your system and you have enough
  672. X *    memory to do all operations in memory, define this
  673. X */
  674. X# define    IN_MEMORY            /* */
  675. X
  676. X/*
  677. X *    If you want to hold some files as datamodules in memory,
  678. X *    define this (not yet supported).
  679. X */
  680. X# define    FILES_IN_MEM            /* */
  681. X
  682. X/*
  683. X *    In some cases a hash search may be more effective than
  684. X *    a line by line search. If you prefer this search method
  685. X *    define this
  686. X */
  687. X# define    HASH_SEARCH            /* */
  688. X# ifdef        HASH_SEARCH
  689. X/*
  690. X *    These are the values for the hashtable size
  691. X *    HASH_ACTIVE    for the active file
  692. X */
  693. X# define    HASH_ACTIVE        37
  694. X# endif        /* HAS_SEARCH */
  695. X
  696. X/*
  697. X *    Normally MNews uses the Sysinfo library for locking purpose.
  698. X *    If you want to use events instead define this. This may cause
  699. X *    problems if inews dies unconditional, but under normal
  700. X *    conditions it's the better solution (IMHO). (currently un-
  701. X *    tested!)
  702. X */
  703. X/* # define    EVENT_LOCK            /* */
  704. X
  705. X/*
  706. X *    If you want to use "hard" links undefine this. Hardlinks aren't
  707. X *    yet offical supported by Microware and the use of them
  708. X *    !!!!! MAY DAMAGE YOUR DISK !!!!!
  709. X */
  710. X/* # define    SOFT_LINKS            /* */
  711. X
  712. X/*
  713. X *    The directory to place temp.files
  714. X */
  715. X# define    TEMPDIR            "/dd/TMP"
  716. X
  717. X# ifndef    OSK
  718. X/*
  719. X *    This can only be defined on OSK to replace some routines by
  720. X *    an assembler version to increase performance
  721. X */
  722. X# define    USE_ASM                /* */
  723. X# endif        /* OSK */
  724. __END__OF__THIS__FILE__
  725. if test -f 'news.h' ; then
  726.   echo 'File news.h already exists, overwriting it'
  727.   del 'news.h'
  728. fi
  729. echo Extracting \"'news.h'\"
  730. sed "s/^X//" >'news.h' <<'__END__OF__THIS__FILE__'
  731. X/*
  732. X *    General headerfile used by several parts of the
  733. X *    whole distribution
  734. X *
  735. X * $Log:    news.h_v $
  736. X * Revision 1.2  91/05/21  17:12:14  ud
  737. X * Added a struct to support in memory handling of the newssystem
  738. X * 
  739. X * Revision 1.1  90/08/31  13:59:15  ud
  740. X * Initial revision
  741. X * 
  742. X */
  743. Xextern char        *malloc ();
  744. Xextern char        *realloc ();
  745. Xextern int        os9forkc ();
  746. X
  747. Xextern int        errno;
  748. Xextern char        **environ;
  749. X
  750. X# include        "config.h"
  751. X
  752. X# define    FATAL        (1 << 1)
  753. X# define    SIMPLE        (1 << 0)
  754. X
  755. X# ifndef    TRUE
  756. X# define    TRUE        1
  757. X# define    FALSE        0
  758. X# endif        /* TRUE */
  759. X
  760. X# ifndef    NULL
  761. X# define    NULL        0
  762. X# endif        /* NULL */
  763. X
  764. X# define    BATCHHEAD    "#! rnews"
  765. X# define    BATCHLEN    8
  766. X# define    COMHEAD        "#! cunbatch"
  767. X# define    COMLEN        11
  768. X# define    COM7HEAD    "#! c7unbatch"
  769. X# define    COM7LEN        12
  770. X# define    FREHEAD        "#! funbatch"
  771. X# define    FRELEN        11
  772. X# define    FRE7HEAD    "#! f7unbatch"
  773. X# define    FRE7LEN        12
  774. X
  775. X# define    NONE        0
  776. X# define    BATCH        1
  777. X# define    COM        2
  778. X# define    COM7        3
  779. X# define    FRE        4
  780. X# define    FRE7        5
  781. X# define    DEL_ART        6
  782. X
  783. X# define    NEWSINPUT    "newsinput"
  784. X# define    INEWS        "inews"
  785. X# define    UNCOMPRESS    "uncompress"
  786. X# define    MELT        "melt"
  787. X# define    DECODE        "decode"
  788. X
  789. X# define    COMPRESS    "compress"
  790. X# define    FREEZE        "freeze"
  791. X# define    ENCODE        "encode"
  792. X# define    TRANSPORT    "mnews.transport"
  793. X# define    TRANSPORT_DFLT    MNEWS_TRANSPORT
  794. X
  795. X# define    BATCHDIR    "MNEWS.BATCH"
  796. X# define    DEF_BATCHDIR    MNEWS_BATCHDIR
  797. X
  798. X# define    NEWSDIR        "MNEWS.DIR"
  799. X# define    DEF_NEWSDIR    MNEWS_NEWSDIR
  800. X# define    LIBDIR        "MNEWS.LIB"
  801. X# define    DEF_LIBDIR    MNEWS_NEWSLIB
  802. X
  803. X# define    TSPOOLDIR    "MNEWS.TSPOOL"
  804. X# define    DEF_TSPOOLDIR    MNEWS_TSPOOLDIR
  805. X
  806. X# define    NEWS_OWNER    "news"
  807. X
  808. X/*
  809. X *    ID for "linked" Files (used by other programs, too)
  810. X */
  811. X# define    LINK_ID        "%(#)$ "
  812. X
  813. X/*
  814. X *    Some macros for speedup
  815. X */
  816. X# define    Streql(s,d)    (((*(s)) == (*(d))) && (!strcmp ((s), (d))))
  817. X# define    Strieql(s,d)    ((tolower (*(s)) == tolower (*(d))) && (!_strccmp ((s), (d))))
  818. X# define    Strcmp(s,d)    (((*(s)) != (*(d))) || strcmp ((s), (d)))
  819. X# define    Stricmp(s,d)    ((tolower (*(s)) != tolower (*(d))) || _strccmp ((s), (d)))
  820. X
  821. X# define    Strneql(s,d,n)    (((*(s)) == (*(d))) && (!strncmp ((s), (d), (n))))
  822. X# define    Strnieql(s,d,n)    ((tolower (*(s)) == tolower (*(d))) && (!_strnccmp ((s), (d), (n))))
  823. X# define    Strncmp(s,d,n)    (((*(s)) != (*(d))) || strncmp ((s), (d), (n)))
  824. X# define    Strnicmp(s,d,n)    ((tolower (*(s)) != tolower (*(d))) || _strnccmp ((s), (d), (n)))
  825. X
  826. X# ifdef        IN_MEMORY
  827. X/*
  828. X *    We need an alternative for temp.files - so store them in this
  829. X *    structure
  830. X */
  831. Xtypedef struct _list {
  832. X    char    *text;
  833. X    int    siz;
  834. X    int    len;
  835. X    struct _list    *next;
  836. X} list;
  837. X# endif        /* IN_MEMORY */
  838. X
  839. X# ifdef        HASH_SEARCH
  840. Xtypedef unsigned long    hash_t;
  841. X# endif        /* HASH_SEARCH */
  842. __END__OF__THIS__FILE__
  843. if test -f 'patchlevel.h' ; then
  844.   echo 'File patchlevel.h already exists, overwriting it'
  845.   del 'patchlevel.h'
  846. fi
  847. echo Extracting \"'patchlevel.h'\"
  848. sed "s/^X//" >'patchlevel.h' <<'__END__OF__THIS__FILE__'
  849. X/*
  850. X *    Current patchlevel
  851. X */
  852. X# define    PATCHLEVEL        0
  853. __END__OF__THIS__FILE__
  854. if test -f 'xc' ; then
  855.   echo 'File xc already exists, overwriting it'
  856.   del 'xc'
  857. fi
  858. echo Extracting \"'xc'\"
  859. sed "s/^X//" >'xc' <<'__END__OF__THIS__FILE__'
  860. X$ echo "Version: $Id: xc_v 1.1 90/08/31 13:59:38 ud Exp $"
  861. X$ echo "Copyright (C) 1989, 1990 by Ulrich Dessauer, Germering, Germany."
  862. X$ echo "Making rnews..."
  863. X$ chd RNEWS;make
  864. X$ echo "Making sbatch..."
  865. X$ chd SBATCH;make
  866. X$ echo "Making inews..."
  867. X$ chd INEWS;make
  868. X$ echo "Making MISC..."
  869. X$ chd MISC;make encode decode
  870. __END__OF__THIS__FILE__
  871. if test -f '8BIT/Makefile' ; then
  872.   echo 'File 8BIT/Makefile already exists, overwriting it'
  873.   del '8BIT/Makefile'
  874. fi
  875. echo Extracting \"'8BIT/Makefile'\"
  876. sed "s/^X//" >'8BIT/Makefile' <<'__END__OF__THIS__FILE__'
  877. X# $Log:    Makefile_v $
  878. X# Revision 1.2  91/05/21  17:16:49  ud
  879. X# Add c8type.c
  880. X# 
  881. X# Revision 1.1  90/08/31  13:47:17  ud
  882. X# Initial revision
  883. X# 
  884. X#
  885. X# $Id: Makefile_v 1.2 91/05/21 17:16:49 ud Exp $
  886. X#
  887. XG=    -g
  888. XCC=    cc
  889. XCFLAGS=    -qt=/dd/TMP -V=. $G
  890. XOBJS=    inp.r conv.r c8type.r
  891. XHDRS=    /dd/DEFS/c8type.h
  892. XLIBDIR=    /dd/LIB
  893. X
  894. X$(LIBDIR)/8bit.l:    $(OBJS) $(HDRS)
  895. X    merge $(OBJS) >-$@
  896. X
  897. X$(HDRS):    c8type.h
  898. X    copy -r $? $@
  899. X    touch $@
  900. __END__OF__THIS__FILE__
  901. if test -f '8BIT/c8type.c' ; then
  902.   echo 'File 8BIT/c8type.c already exists, overwriting it'
  903.   del '8BIT/c8type.c'
  904. fi
  905. echo Extracting \"'8BIT/c8type.c'\"
  906. sed "s/^X//" >'8BIT/c8type.c' <<'__END__OF__THIS__FILE__'
  907. X/*
  908. X * $Log:    c8type.c_v $
  909. X * Revision 1.1  91/05/21  17:20:28  ud
  910. X * Initial revision
  911. X * 
  912. X */
  913. X# ifndef    LINT
  914. Xstatic char rcsid[] = "$Id: c8type.c_v 1.1 91/05/21 17:20:28 ud Exp $";
  915. X# endif        LINE
  916. X# include    "c8type.h"
  917. X
  918. Xchar8    _ch8codes[256] = {
  919. X    _CONTROL,                /* ^@ */
  920. X    _CONTROL,                /* ^A */
  921. X    _CONTROL,                /* ^B */
  922. X    _CONTROL,                /* ^C */
  923. X    _CONTROL,                /* ^D */
  924. X    _CONTROL,                /* ^E */
  925. X    _CONTROL,                /* ^F */
  926. X    _CONTROL,                /* ^G */
  927. X    _CONTROL,                /* ^H */
  928. X    _CONTROL | _WHITE,            /* ^I */
  929. X    _CONTROL | _WHITE,            /* ^J */
  930. X    _CONTROL,                /* ^K */
  931. X    _CONTROL | _WHITE,            /* ^L */
  932. X    _CONTROL | _WHITE,            /* ^M */
  933. X    _CONTROL,                /* ^N */
  934. X    _CONTROL,                /* ^O */
  935. X    _CONTROL,                /* ^P */
  936. X    _CONTROL,                /* ^Q */
  937. X    _CONTROL,                /* ^R */
  938. X    _CONTROL,                /* ^S */
  939. X    _CONTROL,                /* ^T */
  940. X    _CONTROL,                /* ^U */
  941. X    _CONTROL,                /* ^V */
  942. X    _CONTROL,                /* ^W */
  943. X    _CONTROL,                /* ^X */
  944. X    _CONTROL,                /* ^Y */
  945. X    _CONTROL,                /* ^Z */
  946. X    _CONTROL,                /* ^[ */
  947. X    _CONTROL,                /* ^\ */
  948. X    _CONTROL,                /* ^] */
  949. X    _CONTROL,                /* ^~ */
  950. X    _CONTROL,                /* ^_ */
  951. X    _WHITE | _PUNCT,            /*   */
  952. X    _PUNCT,                    /* ! */
  953. X    _PUNCT,                    /* " */
  954. X    _PUNCT,                    /* # */
  955. X    _PUNCT,                    /* $ */
  956. X    _PUNCT,                    /* % */
  957. X    _PUNCT,                    /* & */
  958. X    _PUNCT,                    /* ' */
  959. X    _PUNCT,                    /* ( */
  960. X    _PUNCT,                    /* ) */
  961. X    _PUNCT,                    /* * */
  962. X    _PUNCT,                    /* + */
  963. X    _PUNCT,                    /* , */
  964. X    _PUNCT,                    /* - */
  965. X    _PUNCT,                    /* . */
  966. X    _PUNCT,                    /* / */
  967. X    _DIGIT | _HEXDIG,            /* 0 */
  968. X    _DIGIT | _HEXDIG,            /* 1 */
  969. X    _DIGIT | _HEXDIG,            /* 2 */
  970. X    _DIGIT | _HEXDIG,            /* 3 */
  971. X    _DIGIT | _HEXDIG,            /* 4 */
  972. X    _DIGIT | _HEXDIG,            /* 5 */
  973. X    _DIGIT | _HEXDIG,            /* 6 */
  974. X    _DIGIT | _HEXDIG,            /* 7 */
  975. X    _DIGIT | _HEXDIG,            /* 8 */
  976. X    _DIGIT | _HEXDIG,            /* 9 */
  977. X    _PUNCT,                    /* : */
  978. X    _PUNCT,                    /* ; */
  979. X    _PUNCT,                    /* < */
  980. X    _PUNCT,                    /* = */
  981. X    _PUNCT,                    /* > */
  982. X    _PUNCT,                    /* ? */
  983. X    _PUNCT,                    /* @ */
  984. X    _UPPER | _HEXDIG,            /* A */
  985. X    _UPPER | _HEXDIG,            /* B */
  986. X    _UPPER | _HEXDIG,            /* C */
  987. X    _UPPER | _HEXDIG,            /* D */
  988. X    _UPPER | _HEXDIG,            /* E */
  989. X    _UPPER | _HEXDIG,            /* F */
  990. X    _UPPER,                    /* G */
  991. X    _UPPER,                    /* H */
  992. X    _UPPER,                    /* I */
  993. X    _UPPER,                    /* J */
  994. X    _UPPER,                    /* K */
  995. X    _UPPER,                    /* L */
  996. X    _UPPER,                    /* M */
  997. X    _UPPER,                    /* N */
  998. X    _UPPER,                    /* O */
  999. X    _UPPER,                    /* P */
  1000. X    _UPPER,                    /* Q */
  1001. X    _UPPER,                    /* R */
  1002. X    _UPPER,                    /* S */
  1003. X    _UPPER,                    /* T */
  1004. X    _UPPER,                    /* U */
  1005. X    _UPPER,                    /* V */
  1006. X    _UPPER,                    /* W */
  1007. X    _UPPER,                    /* X */
  1008. X    _UPPER,                    /* Y */
  1009. X    _UPPER,                    /* Z */
  1010. X    _PUNCT,                    /* [ */
  1011. X    _PUNCT,                    /* \ */
  1012. X    _PUNCT,                    /* ] */
  1013. X    _PUNCT,                    /* ^ */
  1014. X    _PUNCT,                    /* _ */
  1015. X    _PUNCT,                    /* ` */
  1016. X    _LOWER | _HEXDIG,            /* a */
  1017. X    _LOWER | _HEXDIG,            /* b */
  1018. X    _LOWER | _HEXDIG,            /* c */
  1019. X    _LOWER | _HEXDIG,            /* d */
  1020. X    _LOWER | _HEXDIG,            /* e */
  1021. X    _LOWER | _HEXDIG,            /* f */
  1022. X    _LOWER,                    /* g */
  1023. X    _LOWER,                    /* h */
  1024. X    _LOWER,                    /* i */
  1025. X    _LOWER,                    /* j */
  1026. X    _LOWER,                    /* k */
  1027. X    _LOWER,                    /* l */
  1028. X    _LOWER,                    /* m */
  1029. X    _LOWER,                    /* n */
  1030. X    _LOWER,                    /* o */
  1031. X    _LOWER,                    /* p */
  1032. X    _LOWER,                    /* q */
  1033. X    _LOWER,                    /* r */
  1034. X    _LOWER,                    /* s */
  1035. X    _LOWER,                    /* t */
  1036. X    _LOWER,                    /* u */
  1037. X    _LOWER,                    /* v */
  1038. X    _LOWER,                    /* w */
  1039. X    _LOWER,                    /* x */
  1040. X    _LOWER,                    /* y */
  1041. X    _LOWER,                    /* z */
  1042. X    _PUNCT,                    /* { */
  1043. X    _PUNCT,                    /* | */
  1044. X    _PUNCT,                    /* } */
  1045. X    _PUNCT,                    /* ~ */
  1046. X    _CONTROL,                /* ^? */
  1047. X/* 8 bit */
  1048. X    _CONTROL,                /* 80 */
  1049. X    _CONTROL,                /* 81 */
  1050. X    _CONTROL,                /* 82 */
  1051. X    _CONTROL,                /* 83 */
  1052. X    _CONTROL,                /* 84 */
  1053. X    _CONTROL,                /* 85 */
  1054. X    _CONTROL,                /* 86 */
  1055. X    _CONTROL,                /* 87 */
  1056. X    _CONTROL,                /* 88 */
  1057. X    _CONTROL,                /* 89 */
  1058. X    _CONTROL,                /* 8a */
  1059. X    _CONTROL,                /* 8b */
  1060. X    _CONTROL,                /* 8c */
  1061. X    _CONTROL,                /* 8d */
  1062. X    _CONTROL,                /* 8e */
  1063. X    _CONTROL,                /* 8f */
  1064. X    _CONTROL,                /* 90 */
  1065. X    _CONTROL,                /* 91 */
  1066. X    _CONTROL,                /* 92 */
  1067. X    _CONTROL,                /* 93 */
  1068. X    _CONTROL,                /* 94 */
  1069. X    _CONTROL,                /* 95 */
  1070. X    _CONTROL,                /* 96 */
  1071. X    _CONTROL,                /* 97 */
  1072. X    _CONTROL,                /* 98 */
  1073. X    _CONTROL,                /* 99 */
  1074. X    _CONTROL,                /* 9a */
  1075. X    _CONTROL,                /* 9b */
  1076. X    _CONTROL,                /* 9c */
  1077. X    _CONTROL,                /* 9d */
  1078. X    _CONTROL,                /* 9e */
  1079. X    _CONTROL,                /* 9f */
  1080. X    _WHITE | _PUNCT,            /* a0 */
  1081. X    _PUNCT,                    /* a1 */
  1082. X    _PUNCT,                    /* a2 */
  1083. X    _PUNCT,                    /* a3 */
  1084. X    _PUNCT,                    /* a4 */
  1085. X    _PUNCT,                    /* a5 */
  1086. X    _PUNCT,                    /* a6 */
  1087. X    _PUNCT,                    /* a7 */
  1088. X    _PUNCT,                    /* a8 */
  1089. X    _PUNCT,                    /* a9 */
  1090. X    _PUNCT,                    /* aa */
  1091. X    _PUNCT,                    /* ab */
  1092. X    _PUNCT,                    /* ac */
  1093. X    _PUNCT,                    /* ad */
  1094. X    _PUNCT,                    /* ae */
  1095. X    _PUNCT,                    /* af */
  1096. X    _PUNCT,                    /* b0 */
  1097. X    _PUNCT,                    /* b1 */
  1098. X    _PUNCT,                    /* b2 */
  1099. X    _PUNCT,                    /* b3 */
  1100. X    _PUNCT,                    /* b4 */
  1101. X    _LOWER,                    /* b5 */
  1102. X    _PUNCT,                    /* b6 */
  1103. X    _PUNCT,                    /* b7 */
  1104. X    _PUNCT,                    /* b8 */
  1105. X    _PUNCT,                    /* b9 */
  1106. X    _PUNCT,                    /* ba */
  1107. X    _PUNCT,                    /* bb */
  1108. X    _PUNCT,                    /* bc */
  1109. X    _PUNCT,                    /* bd */
  1110. X    _PUNCT,                    /* be */
  1111. X    _PUNCT,                    /* bf */
  1112. X    _UPPER,                    /* c0 */
  1113. X    _UPPER,                    /* c1 */
  1114. X    _UPPER,                    /* c2 */
  1115. X    _UPPER,                    /* c3 */
  1116. X    _UPPER,                    /* c4 */
  1117. X    _UPPER,                    /* c5 */
  1118. X    _UPPER,                    /* c6 */
  1119. X    _UPPER,                    /* c7 */
  1120. X    _UPPER,                    /* c8 */
  1121. X    _UPPER,                    /* c9 */
  1122. X    _UPPER,                    /* ca */
  1123. X    _UPPER,                    /* cb */
  1124. X    _UPPER,                    /* cc */
  1125. X    _UPPER,                    /* cd */
  1126. X    _UPPER,                    /* ce */
  1127. X    _UPPER,                    /* cf */
  1128. X    _UPPER,                    /* d0 */
  1129. X    _UPPER,                    /* d1 */
  1130. X    _UPPER,                    /* d2 */
  1131. X    _UPPER,                    /* d3 */
  1132. X    _UPPER,                    /* d4 */
  1133. X    _UPPER,                    /* d5 */
  1134. X    _UPPER,                    /* d6 */
  1135. X    _PUNCT,                    /* d7 */
  1136. X    _UPPER,                    /* d8 */
  1137. X    _UPPER,                    /* d9 */
  1138. X    _UPPER,                    /* da */
  1139. X    _UPPER,                    /* db */
  1140. X    _UPPER,                    /* dc */
  1141. X    _UPPER,                    /* dd */
  1142. X    _UPPER,                    /* de */
  1143. X    _UPPER,                    /* df */
  1144. X    _LOWER,                    /* e0 */
  1145. X    _LOWER,                    /* e1 */
  1146. X    _LOWER,                    /* e2 */
  1147. X    _LOWER,                    /* e3 */
  1148. X    _LOWER,                    /* e4 */
  1149. X    _LOWER,                    /* e5 */
  1150. X    _LOWER,                    /* e6 */
  1151. X    _LOWER,                    /* e7 */
  1152. X    _LOWER,                    /* e8 */
  1153. X    _LOWER,                    /* e9 */
  1154. X    _LOWER,                    /* ea */
  1155. X    _LOWER,                    /* eb */
  1156. X    _LOWER,                    /* ec */
  1157. X    _LOWER,                    /* ed */
  1158. X    _LOWER,                    /* ee */
  1159. X    _LOWER,                    /* ef */
  1160. X    _LOWER,                    /* f0 */
  1161. X    _LOWER,                    /* f1 */
  1162. X    _LOWER,                    /* f2 */
  1163. X    _LOWER,                    /* f3 */
  1164. X    _LOWER,                    /* f4 */
  1165. X    _LOWER,                    /* f5 */
  1166. X    _LOWER,                    /* f6 */
  1167. X    _PUNCT,                    /* f7 */
  1168. X    _LOWER,                    /* f8 */
  1169. X    _LOWER,                    /* f9 */
  1170. X    _LOWER,                    /* fa */
  1171. X    _LOWER,                    /* fb */
  1172. X    _LOWER,                    /* fc */
  1173. X    _LOWER,                    /* fd */
  1174. X    _LOWER,                    /* fe */
  1175. X    _LOWER                    /* ff */
  1176. X};
  1177. X
  1178. Xchar8
  1179. X_to8lower (c)
  1180. Xregister char8 c;
  1181. X{
  1182. X    return (is8upper (c) ? c | 0x20 : c);
  1183. X}
  1184. X
  1185. Xchar8
  1186. X_to8upper (c)
  1187. Xregister char8 c;
  1188. X{
  1189. X    return (is8lower (c) ? c & (~ 0x20) : c);
  1190. X}
  1191. X
  1192. __END__OF__THIS__FILE__
  1193. if test -f '8BIT/c8type.h' ; then
  1194.   echo 'File 8BIT/c8type.h already exists, overwriting it'
  1195.   del '8BIT/c8type.h'
  1196. fi
  1197. echo Extracting \"'8BIT/c8type.h'\"
  1198. sed "s/^X//" >'8BIT/c8type.h' <<'__END__OF__THIS__FILE__'
  1199. X/*
  1200. X * $Log:    c8type.h_v $
  1201. X * Revision 1.1  91/05/21  17:20:02  ud
  1202. X * Initial revision
  1203. X * 
  1204. X */
  1205. X# ifndef    _C8TYPE_H
  1206. X# define    _C8TYPE_H
  1207. X# ifndef    isascii
  1208. X# include    <ctype.h>
  1209. X# endif        /* isascii */
  1210. X
  1211. Xtypedef unsigned char    char8;
  1212. X
  1213. Xextern char8    _ch8codes[];
  1214. X
  1215. X# define    is8ascii(c)    (((char8) (c)) <= 0x7f)
  1216. X# define    is8alpha(c)    (_ch8codes[(char8) (c)] & (_UPPER | _LOWER))
  1217. X# define    is8upper(c)    (_ch8codes[(char8) (c)] & _UPPER)
  1218. X# define    is8lower(c)    (_ch8codes[(char8) (c)] & _LOWER)
  1219. X# define    is8digit(c)    (_ch8codes[(char8) (c)] & _DIGIT)
  1220. X# define    is8xdigit(c)    (_ch8codes[(char8) (c)] & _HEXDIG)
  1221. X# define    is8space(c)    (_ch8codes[(char8) (c)] & _WHITE)
  1222. X# define    is8punct(c)    (_ch8codes[(char8) (c)] & _PUNCT)
  1223. X# define    is8alnum(c)    (_ch8codes[(char8) (c)] & (_UPPER | _LOWER | _DIGIT))
  1224. X# define    is8print(c)    (_ch8codes[(char8) (c)] & (_PUNCT | _UPPER | _LOWER | _DIGIT))
  1225. X# define    is8cntrl(c)    (_ch8codes[(char8) (c)] & _CONTROL)
  1226. X
  1227. Xextern char8    _to8upper ();
  1228. Xextern char8    _to8lower ();
  1229. X
  1230. X# define    to8upper(c)    _to8upper ((char8) (c))
  1231. X# define    to8lower(c)    _to8lower ((char8) (c))
  1232. X
  1233. X/*
  1234. X *    conversion functions
  1235. X */
  1236. Xextern void    setup_convtable ();
  1237. Xextern void    conv_charset ();
  1238. Xextern char8    conv_char ();
  1239. X
  1240. X/*
  1241. X *    I/O functions with character conversion
  1242. X */
  1243. Xextern int    c8read (), c8readln ();
  1244. Xextern int    c8write (), c8writeln ();
  1245. Xextern char8    *c8fgets ();
  1246. Xextern int    c8fputs ();
  1247. Xextern int    c8getc ();
  1248. Xextern int    c8putc ();
  1249. X
  1250. X# endif        /* _C8TYPE_H */
  1251. __END__OF__THIS__FILE__
  1252. if test -f '8BIT/conv.c' ; then
  1253.   echo 'File 8BIT/conv.c already exists, overwriting it'
  1254.   del '8BIT/conv.c'
  1255. fi
  1256. echo Extracting \"'8BIT/conv.c'\"
  1257. sed "s/^X//" >'8BIT/conv.c' <<'__END__OF__THIS__FILE__'
  1258. X/*
  1259. X *    this small library is used to convert between different
  1260. X *    international character sets into a unique (ISO 8859/1)
  1261. X *    one. See Manualpage for details.
  1262. X *
  1263. X * $Log:    conv.c_v $
  1264. X * Revision 1.2  91/05/21  17:14:46  ud
  1265. X * Used my ctype for 8 bit access
  1266. X * 
  1267. X * Revision 1.1  90/08/31  13:47:50  ud
  1268. X * Initial revision
  1269. X * 
  1270. X */
  1271. X# ifndef    LINT
  1272. Xstatic char rcsid[] = "$Id: conv.c_v 1.2 91/05/21 17:14:46 ud Exp $";
  1273. Xstatic char copyright[] = "Copyright (C) 1989, 1990 by Ulrich Dessauer, Germering, Germany.\n";
  1274. X# endif        /* LINT */
  1275. X
  1276. X# include    <c8type.h>
  1277. X# include    <modes.h>
  1278. X
  1279. X# define    TRUE        1
  1280. X# define    FALSE        0
  1281. X
  1282. X# define    CHARSET_LIB    "/h0/USR/LIB/CHARSET"
  1283. X
  1284. Xextern char    *getenv ();
  1285. Xextern char    *malloc ();
  1286. X
  1287. Xstatic char    ttab[256];
  1288. Xstatic int    doconv;
  1289. X
  1290. X/*
  1291. X *    Convert a string containing a number to any base up to 16
  1292. X *    to a decimal number
  1293. X */
  1294. Xstatic int
  1295. Xconv_value (s, base)
  1296. Xregister char *s;
  1297. Xregister int base;
  1298. X{
  1299. X    register int    ret;
  1300. X
  1301. X    ret = 0;
  1302. X    while (*s) {
  1303. X        ret *= base;
  1304. X        if (index ("0123456789", *s))
  1305. X            ret += (*s - '0');
  1306. X        else if (index ("ABCDEF", *s))
  1307. X            ret += (*s - 'A' + 10);
  1308. X        else if (index ("abcdef", *s))
  1309. X            ret += (*s - 'a' + 10);
  1310. X        ++s;
  1311. X    }
  1312. X    return (ret);
  1313. X}
  1314. X
  1315. X/*
  1316. X *    parses an expression which represents a charcter between 0..255
  1317. X */
  1318. Xstatic int
  1319. Xget_value (s)
  1320. Xregister char *s;
  1321. X{
  1322. X    int    t;
  1323. X
  1324. X    switch (*s++) {
  1325. X        default:
  1326. X            --s;
  1327. X        case '\'':
  1328. X            t = *s;
  1329. X            break;
  1330. X        case '$':
  1331. X            t = conv_value (s, 16);
  1332. X            break;
  1333. X        case '1': case '2': case '3': case '4': case '5':
  1334. X        case '6': case '7': case '8': case '9':
  1335. X            --s;
  1336. X        case '#':
  1337. X            t = conv_value (s, 10);
  1338. X            break;
  1339. X        case '0':
  1340. X            if (*s == 'x') {
  1341. X                ++s;
  1342. X                t = conv_value (s, 16);
  1343. X            } else
  1344. X                t = conv_value (s, 8);
  1345. X            break;
  1346. X        case '%':
  1347. X            t = conv_value (s, 2);
  1348. X            break;
  1349. X    }
  1350. X    t &= 0xff;
  1351. X    return (t);
  1352. X}
  1353. X
  1354. X/*
  1355. X *    Reads in the translation table
  1356. X */            
  1357. Xstatic int
  1358. Xget_convtable (type, rev)
  1359. Xchar *type;
  1360. Xint rev;
  1361. X{
  1362. X    char        *buf;
  1363. X    int        n;
  1364. X    int        fd;
  1365. X    int        in, out;
  1366. X    register char    *pin, *pout;
  1367. X
  1368. X    if (!(buf = malloc (256)))
  1369. X        return (FALSE);
  1370. X    if (!info_str ("CHARSET.LIB", buf, 200))
  1371. X        strcpy (buf, CHARSET_LIB);
  1372. X    strcat (buf, "/");
  1373. X    strcat (buf, type);
  1374. X    if ((fd = open (buf, S_IREAD)) != -1) {
  1375. X        while ((n = readln (fd, buf, 256)) > 0) {
  1376. X            buf[n - 1] = '\0';
  1377. X            if ((n == 1) || (buf[0] == '#'))
  1378. X                continue;
  1379. X            pin = buf;
  1380. X            pout = buf;
  1381. X            while (*pout && (!is8space (*pout)))
  1382. X                ++pout;
  1383. X            if (*pout) {
  1384. X                *pout++ = '\0';
  1385. X                while (is8space (*pout))
  1386. X                    ++pout;
  1387. X            }
  1388. X            if (!*pout)
  1389. X                continue;
  1390. X            in = get_value (pin);
  1391. X            out = get_value (pout);
  1392. X            if ((in >= 0) && (in < 256) && (out >= 0) && (out < 256))
  1393. X                if (rev)
  1394. X                    ttab[out] = (char) in;
  1395. X                else
  1396. X                    ttab[in] = (char) out;
  1397. X        }
  1398. X        close (fd);
  1399. X    }
  1400. X    free (buf);
  1401. X    return (fd != -1);
  1402. X}
  1403. X
  1404. X/*
  1405. X *    have to be called as one of the first functions in a program
  1406. X *    which uses the library
  1407. X */
  1408. Xvoid
  1409. Xsetup_convtable (doit, rev)
  1410. Xint doit;
  1411. Xint rev;
  1412. X{
  1413. X    register int    t;
  1414. X    char        *ptr;
  1415. X
  1416. X    ptr = getenv ("CHARSET");
  1417. X    if ((!doit) || (!ptr)) {
  1418. X        doconv = FALSE;
  1419. X        return;
  1420. X    }
  1421. X    for (t = 0; t < 256; ++t)
  1422. X        ttab[t] = (char) t;
  1423. X    doconv = get_convtable (ptr, rev);
  1424. X}
  1425. X
  1426. X/*
  1427. X *    this function converts a string using the stored
  1428. X *    translation table (siz is the length of the string
  1429. X *    to convert)
  1430. X */
  1431. Xvoid
  1432. Xconv_charset (buf, siz)
  1433. Xregister char8 *buf;
  1434. Xregister int siz;
  1435. X{
  1436. X    register char    *_ttab;
  1437. X
  1438. X    if (!doconv)
  1439. X        return;
  1440. X    _ttab = ttab;
  1441. X    while (siz-- > 0) {
  1442. X        *buf = _ttab[*buf];
  1443. X        ++buf;
  1444. X    }
  1445. X}
  1446. X
  1447. X/*
  1448. X *    converts just one character
  1449. X */
  1450. Xchar8
  1451. Xconv_char (c)
  1452. Xchar8 c;
  1453. X{
  1454. X    return (doconv ? ttab[c] : c);
  1455. X}
  1456. __END__OF__THIS__FILE__
  1457. if test -f '8BIT/inp.c' ; then
  1458.   echo 'File 8BIT/inp.c already exists, overwriting it'
  1459.   del '8BIT/inp.c'
  1460. fi
  1461. echo Extracting \"'8BIT/inp.c'\"
  1462. sed "s/^X//" >'8BIT/inp.c' <<'__END__OF__THIS__FILE__'
  1463. X/*
  1464. X * $Log$
  1465. X * 
  1466. X */
  1467. X# ifndef    LINT
  1468. Xstatic char rcsid[] = "$Id$";
  1469. X# endif        /* LINT */
  1470. X
  1471. X# include    <stdio.h>
  1472. X# include    <c8type.h>
  1473. X
  1474. Xint
  1475. Xc8read (fd, buf, cnt)
  1476. Xregister int fd;
  1477. Xregister char8 *buf;
  1478. Xregister unsigned int cnt;
  1479. X{
  1480. X    register int    n;
  1481. X
  1482. X    if ((n = read (fd, (char *) buf, cnt)) > 0)
  1483. X        conv_charset (buf, n);
  1484. X    return (n);
  1485. X}
  1486. X
  1487. Xint
  1488. Xc8readln (fd, buf, cnt)
  1489. Xregister int fd;
  1490. Xregister char8 *buf;
  1491. Xregister unsigned int cnt;
  1492. X{
  1493. X    register int    n;
  1494. X
  1495. X    if ((n = readln (fd, (char *) buf, cnt)) > 0)
  1496. X        conv_charset (buf, n);
  1497. X    return (n);
  1498. X}
  1499. X
  1500. Xint
  1501. Xc8write (fd, buf, cnt)
  1502. Xregister int fd;
  1503. Xregister char8 *buf;
  1504. Xregister unsigned int cnt;
  1505. X{
  1506. X    register int    n;
  1507. X
  1508. X    conv_charset (buf, cnt);
  1509. X    return (write (fd, (char *) buf, cnt));
  1510. X}
  1511. X
  1512. Xint
  1513. Xc8writeln (fd, buf, cnt)
  1514. Xregister int fd;
  1515. Xregister char8 *buf;
  1516. Xregister unsigned int cnt;
  1517. X{
  1518. X    register int    n;
  1519. X
  1520. X    conv_charset (buf, cnt);
  1521. X    return (writeln (fd, (char *) buf, cnt));
  1522. X}
  1523. X
  1524. Xchar8 *
  1525. Xc8fgets (buf, cnt, fp)
  1526. Xregister char8 *buf;
  1527. Xregister int cnt;
  1528. Xregister FILE *fp;
  1529. X{
  1530. X    if (fgets ((char *) buf, cnt, fp)) {
  1531. X        conv_charset (buf, strlen (buf));
  1532. X        return (buf);
  1533. X    }
  1534. X    return (NULL);
  1535. X}
  1536. X
  1537. Xint
  1538. Xc8fputs (buf, fp)
  1539. Xregister char8 *buf;
  1540. Xregister FILE *fp;
  1541. X{
  1542. X    conv_charset (buf, strlen (buf));
  1543. X    return (fputs ((char *) buf, fp));
  1544. X}
  1545. X
  1546. Xint
  1547. Xc8getc (fp)
  1548. Xregister FILE *fp;
  1549. X{
  1550. X    register int    ch;
  1551. X
  1552. X    if ((ch = getc (fp)) >= 0)
  1553. X        return (conv_char (ch & 0xff) & 0xff);
  1554. X    return (ch);
  1555. X}
  1556. X
  1557. Xint
  1558. Xc8putc (ch, fp)
  1559. Xregister int ch;
  1560. Xregister FILE *fp;
  1561. X{
  1562. X    register int    ch;
  1563. X
  1564. X    ch = conv_char (ch & 0xff) & 0xff;
  1565. X    return (putc (ch, fp));
  1566. X}
  1567. __END__OF__THIS__FILE__
  1568. if test -f 'INEWS/Makefile' ; then
  1569.   echo 'File INEWS/Makefile already exists, overwriting it'
  1570.   del 'INEWS/Makefile'
  1571. fi
  1572. echo Extracting \"'INEWS/Makefile'\"
  1573. sed "s/^X//" >'INEWS/Makefile' <<'__END__OF__THIS__FILE__'
  1574. X# $Id: Makefile_v 1.4 91/09/11 18:16:06 ud Exp $
  1575. X#
  1576. X# $Log:    Makefile_v $
  1577. X# Revision 1.4  91/09/11  18:16:06  ud
  1578. X# Added pmail.[cr]
  1579. X# 
  1580. X# Revision 1.3  91/01/02  21:27:07  ud
  1581. X# Added optional ndbm support
  1582. X# Added optional profiling options
  1583. X# 
  1584. X# Revision 1.2  90/12/01  15:50:22  ud
  1585. X# Inserted two new files (adm.c and arc.c)
  1586. X# 
  1587. X# Revision 1.1  90/08/31  15:05:15  ud
  1588. X# Initial revision
  1589. X# 
  1590. X#
  1591. X# LIBDIR: where to find the converting library and (if desired) dbm-lib
  1592. XLIBDIR=    /dd/LIB
  1593. X#
  1594. X# If you use NDBM for history, then enter here the name of your library
  1595. X# DBMLIB=    -l=$(LIBDIR)/sdbm.l
  1596. XDBMLIB=
  1597. X#
  1598. X# If you are using event locking use this library and include-directory
  1599. X# EVLIB=    -l=$(LIBDIR)/lock.l
  1600. X# EVDIR=    -v=../LOCK
  1601. XEVLIB=
  1602. XEVDIR=
  1603. X#
  1604. X# ODIR: where to place the binary
  1605. XRDIR=    RELS
  1606. XODIR=    /h0/ETC/CMDS
  1607. XCC=    cc
  1608. XG=    -g
  1609. XCFLAGS=    $G -qt=/dd/TMP -v=.. -v=../8BIT $(EVDIR)
  1610. XLIBS=    -l=/dd/LIB/os9lib.l -l=$(LIBDIR)/8bit.l \
  1611. X    $(DBMLIB) $(EVLIB)
  1612. X#CURSES=    -l=/dd/LIB/ncurses.l
  1613. XCURSES=    -l=.../MLIB/menulib.l -l=/dd/LIB/termlib.l
  1614. XLFLAGS=    $G -m=10 -q $(LIBS)
  1615. X
  1616. XREV=    1.7
  1617. XSTATE=    Exp
  1618. XCI=    ci -wud -u$(REV) -s$(STATE)
  1619. X
  1620. XSCTRL=    ctrl.c ccan.c cnew.c crm.c cssys.c csuu.c csver.c cchk.c csme.c \
  1621. X    getd.c mcan.c
  1622. XSUTIL=    limit.c list.c store.c ohist.c oart.c dbg.c pmail.c gfh.c hash.c
  1623. XSHEAD=    delh.c ghead.c makh.c ihead.c mhead.c rhead.c shead.c spch.c app.c
  1624. XSHEAD2=    ddst.c alias.c
  1625. XSACT=    achk.c ract.c wact.c
  1626. XSSYS=    psys.c rsys.c tsys.c
  1627. XSADM=    adm.c arc.c build.c crct.c exp.c retr.c sect.c
  1628. XSMISC=    ffrom.c ffup.c mail.c mid.c misc.c sinfo.c unln.c rsat.c inrd.c
  1629. XSINEWS=    inews.c pargs.c wgrp.c wit.c sit.c pit.c crth.c
  1630. X
  1631. XINEWSSRC=$(SINEWS) $(SCTRL) $(SUTIL) $(SHEAD) $(SHEAD2) $(SACT) $(SSYS) \
  1632. X    $(SADM) $(SMISC)
  1633. XIUSERSRC=uidummy.c
  1634. XMNEWSSRC=$(SINEWS) $(SCTRL) $(SUTIL) $(SHEAD) $(SHEAD2) $(SACT) $(SSYS) \
  1635. X    $(SADM) $(SMISC)
  1636. XMNEWSSRC=
  1637. XHEADS=    ext.h inews.h hist.h
  1638. XFILES=    $(INEWSSRC) $(HEADS) Makefile
  1639. X
  1640. XOCTRL=    ctrl.r ccan.r cnew.r crm.r cssys.r csuu.r csver.r cchk.r csme.r \
  1641. X    getd.r mcan.r
  1642. XOUTIL=    limit.r list.r store.r ohist.r oart.r dbg.r pmail.r gfh.r hash.r
  1643. XOHEAD=    delh.r ghead.r makh.r ihead.r mhead.r rhead.r shead.r spch.r app.r
  1644. XOHEAD2=    ddst.r alias.r
  1645. XOACT=    achk.r ract.r wact.r
  1646. XOSYS=    psys.r rsys.r tsys.r
  1647. XOADM=    adm.r arc.r build.r crct.r exp.r retr.r sect.r
  1648. XOMISC=    ffrom.r ffup.r mail.r mid.r misc.r sinfo.r unln.r rsat.r inrd.r
  1649. XOINEWS=    inews.r pargs.r wgrp.r wit.r sit.r pit.r crth.r
  1650. X
  1651. XINEWS=    $(OINEWS) $(OUTIL) $(OCTRL) $(OHEAD) $(OHEAD2) $(OACT) $(OSYS) \
  1652. X    $(OADM) $(OMISC)
  1653. XIUSER=    ../uidummy.r
  1654. XMNEWS=    $(OINEWS) $(OUTIL) $(OCTRL) $(OHEAD) $(OHEAD2) $(OACT) $(OSYS) \
  1655. X    $(OADM) $(OMISC)
  1656. XMUSER=
  1657. X
  1658. X$(ODIR)/inews:    $(INEWS) $(IUSER)
  1659. X    chd $(RDIR);$(CC) *.r $(IUSER) -f=$@ $(LFLAGS)
  1660. X    fixmod -uo2.39 -ua8002 $(ODIR)/inews
  1661. X
  1662. Xinews.r:    inews.c inews.h
  1663. X
  1664. X$(IUSER):    $(IUSERSRC)
  1665. X    $(CC) $(CFLAGS) -r=. $(IUSERSRC)
  1666. X
  1667. Xinews.tags:
  1668. X    ctags $(INEWSSRC)
  1669. X
  1670. Xmnews:    $(MNEWS)
  1671. X    $(CC) $(MNEWS) $(MUSER) UI/*.r -f=mnews $(CURSES) $(LFLAGS)
  1672. X
  1673. Xrcs:
  1674. X    $(CI) $(FILES)
  1675. __END__OF__THIS__FILE__
  1676. exit 0
  1677. : end of shell archive
  1678.  
  1679. -- 
  1680. Frank Kaefer # fkk@stasys.sta.sub.org # Starnberg, Germany
  1681.