home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume31 / mbox / part10 < prev    next >
Encoding:
Text File  |  1992-07-09  |  60.1 KB  |  2,071 lines

  1. Newsgroups: comp.sources.misc
  2. From: Volker.Schuermann@unnet.w.open.de@unnet (Volker Schuermann)
  3. Subject:  v31i026:  mbox - A BBS for UNIX and MINIX v1.6 PL10, Part10/11
  4. Message-ID: <1992Jul10.050515.27860@sparky.imd.sterling.com>
  5. X-Md4-Signature: 315841a031b722ba6895c0f4d7e5abda
  6. Date: Fri, 10 Jul 1992 05:05:15 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Volker.Schuermann@unnet.w.open.de@unnet (Volker Schuermann)
  10. Posting-number: Volume 31, Issue 26
  11. Archive-name: mbox/part10
  12. Environment: MINIX, ISC, ESIX, SVR3
  13. Supersedes: mbox: Volume 29, Issue 63-72
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then feed it
  17. # into a shell via "sh file" or similar.  To overwrite existing files,
  18. # type "sh file -c".
  19. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  20. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  21. # Contents:  Announcement FAQ etc/alias.sh etc/english.befehl
  22. #   etc/help.befehle etc/logo~ etc/mbox.games etc/mbox.packers
  23. #   etc/mbox.udc etc/rmail.sh etc/sysinfo etc/xmd.alias rz.cdiff
  24. #   src/CROSSREF src/HISTORY src/baudrate.c src/befehl.c src/control.c
  25. #   src/ctrlx.c src/derror.c src/faces.c src/games.c src/getch.c
  26. #   src/help.c src/nerror.c src/outdial.c src/weiterl.c
  27. # Wrapped by kent@sparky on Thu Jul  9 23:26:04 1992
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. echo If this archive is complete, you will see the following message:
  30. echo '          "shar: End of archive 10 (of 11)."'
  31. if test -f 'Announcement' -a "${1}" != "-c" ; then 
  32.   echo shar: Will not clobber existing file \"'Announcement'\"
  33. else
  34.   echo shar: Extracting \"'Announcement'\" \(1121 characters\)
  35.   sed "s/^X//" >'Announcement' <<'END_OF_FILE'
  36. XThis is the ix/MBox BBS for MINIX-386 (1.5.10 patched by BDE) and other
  37. XUNIX-Systems (SYSV/Sys7) without 64k segment limitation.
  38. X
  39. XRead the ANNOUNCEMENT (Message-ID: <295A0201.18@unnet.w.open.de> 26. Dec. 91)
  40. Xto get further information.
  41. X
  42. XHow to unpack:
  43. X
  44. X1. UUD the following 5 articles (you should get 'mbox.xa*')
  45. X2. Use the script ...
  46. X
  47. X--- cut here  ---
  48. X
  49. Xcat mbox.x* > mbox.tar.Z
  50. Xmkdir /mbox            # Use this directory to minimize problems
  51. Xcp *.Z /mbox            
  52. Xcd /mbox
  53. Xuncompress *.Z
  54. Xtar ovx *.tar
  55. X. Quick.Start
  56. X
  57. X--- cut again ---
  58. X
  59. XDon't blame me for not using SHAR etc. ... primary this source was made and
  60. Xposted for MINIX-Freaks and so I use pure MINIX-Stuff to offer this package!
  61. X
  62. XRegard(s|less), Volker
  63. X
  64. X---------------------------------------------------------------------------
  65. X
  66. XSat Jun 6 14:11:01 CET 1992, Volker Schuermann <volkers@unnet.w.open.DE>
  67. X
  68. Xix/MBox 1.6 PL10a::
  69. X
  70. X -  Der Befehl "BRETT !" wurde erweitert: Er zeigt jetzt neben dem
  71. X    Namen eines Brettes auch den entsprechenden Informationstext an
  72. X
  73. X -  Es gibt jetzt eine Moeglichkeit externe Kommandos direkt in die
  74. X    Befehls-Struktur der MBox einzubinden
  75. X
  76. END_OF_FILE
  77.   if test 1121 -ne `wc -c <'Announcement'`; then
  78.     echo shar: \"'Announcement'\" unpacked with wrong size!
  79.   fi
  80.   # end of 'Announcement'
  81. fi
  82. if test -f 'FAQ' -a "${1}" != "-c" ; then 
  83.   echo shar: Will not clobber existing file \"'FAQ'\"
  84. else
  85.   echo shar: Extracting \"'FAQ'\" \(2295 characters\)
  86.   sed "s/^X//" >'FAQ' <<'END_OF_FILE'
  87. XFAQs // ix/MBox BBS 1.6 PL 10e // 04.07.1992
  88. X
  89. X
  90. XQ: Why does the BBS 'core', when I try to start it the FIRST time?
  91. XA: Maybe you've forgotten to 'make world' first?
  92. X
  93. XQ: Why does the BBS speak german?
  94. XA: You have to 'make english' to get the english version.
  95. X
  96. XQ: Why doesn't the BBS report any boards with OLD articles?
  97. XA: Type in 'mb-daemon all -x' and be patient ... (you have to be ROOT !)
  98. X   Check your 'Boards'-Entry with the 'admin' command!
  99. X
  100. XQ: Why doesn't the BBS report any boards with NEW articles?
  101. XA: Check your scanner-date. Use 'setup'!
  102. X
  103. XQ: Why do I always get problems if I try to mail or write something?
  104. XA: It sounds like you've forgotten to use SETUID root.root for [mbox].
  105. X
  106. XQ: Why does the BBS terminate everytime I try to get in as ROOT?
  107. XA: You've defined the ONE AND ONLY terminal, which ROOT may use, in
  108. X   [mbox.h], do you remember??
  109. X
  110. XQ: Why do I never see new NEWS in the boards of BBS?
  111. XA: Maybe you never start MB-DAEMON by cron!?
  112. X
  113. XQ: Why do I have trillions of mails in postmasters maildrop?
  114. XA: You should start XMD by cron hourly!
  115. X
  116. XQ: Why does XMD crash instead of delivering mails?
  117. XA: It has to be owned by 'root.root'!
  118. X
  119. XQ: Why seems MB-DAEMON to be sooooo slow?
  120. XA: Spend a TMP-directory on the same FS as HOME|MBOXHOME!
  121. X
  122. XQ: Why do I get addresses like this in UUCP-Spoolfiles:
  123. X   From: unnet!Volker.Schuermann@unnet.w.open.DE
  124. XA: It's a problem with RMAIL. Have a look at README.addrpatch to fix it!
  125. X
  126. XQ: How can I include ELM etc. to the BBS command set?
  127. XA: Have a look at README, Section: User defined Commands!
  128. X
  129. XQ: Why does the BBS blow up, when I use C-NEWS?
  130. XA: Maybe I haven't implemented the aliasing mechanism correct - please
  131. X   tell me, how it works!
  132. X
  133. XQ: Is there any risk to loose one of my system-files?
  134. XA: Yes, If you play around with MB-DAEMON, you may destroy [~/news/active]!
  135. X   Be clever: Copy first, destroy later ;-)
  136. X
  137. XQ: Why does my SMAIL create a second Message-ID & Received-Field ?
  138. XA: Just set the SMAIL-Flag "-received_field". To make live easier, append
  139. X   the flag "error_copy_postmaster", too! 
  140. X
  141. XQ: It it possible to port the BBS to system XYZ?
  142. XA: Just try it :-) If you've done so, send the DIFFs to me!
  143. X
  144. XQ: Are there any plans to develope further versions of this BBS?
  145. XA: Surely! Join our Mailing-List to stay put - see README how to do that!
  146. X
  147. X
  148. END_OF_FILE
  149.   if test 2295 -ne `wc -c <'FAQ'`; then
  150.     echo shar: \"'FAQ'\" unpacked with wrong size!
  151.   fi
  152.   # end of 'FAQ'
  153. fi
  154. if test -f 'etc/alias.sh' -a "${1}" != "-c" ; then 
  155.   echo shar: Will not clobber existing file \"'etc/alias.sh'\"
  156. else
  157.   echo shar: Extracting \"'etc/alias.sh'\" \(907 characters\)
  158.   sed "s/^X//" >'etc/alias.sh' <<'END_OF_FILE'
  159. X#---------------------------------------------------------------------------
  160. X#
  161. X#                       ix/MBox  A L I A S . S H
  162. X#          Mailbox-Programm fuer UNIX(-Derivate)
  163. X#            
  164. X#               Volker Schuermann
  165. X#              Wuppertal, FRG, 08.12.1991
  166. X#
  167. X#---------------------------------------------------------------------------
  168. X# Dieses Script fuegt einen Eintrag fuer jeden neuen User der ix/MBox an die
  169. X# Alias-Datei von SMAIL (etc.) an und erzeugt einen neue Alias-Datenbank. 
  170. X#
  171. X# Wird UMAIL statt SMAIL verwendet, sollten alle Zeilen dieses Scripts' aus-
  172. X# kommentiert werden.
  173. X#---------------------------------------------------------------------------
  174. X# Parameter:
  175. X#
  176. X# $1  ->  Name des neuen Users im Format "Vorname.Nachname"
  177. X# 
  178. X# Beispiel:
  179. X#
  180. X# echo $1 "        " \"\|/usr/bin/xmd $1 -\" >> /usr/lib/smail/aliases
  181. X# /usr/bin/mkaliases
  182. X
  183. Xecho $1 "        " \"\|/usr/bin/xmd $1 -\" >> /usr/lib/smail/aliases
  184. X/usr/bin/mkaliases
  185. END_OF_FILE
  186.   if test 907 -ne `wc -c <'etc/alias.sh'`; then
  187.     echo shar: \"'etc/alias.sh'\" unpacked with wrong size!
  188.   fi
  189.   # end of 'etc/alias.sh'
  190. fi
  191. if test -f 'etc/english.befehl' -a "${1}" != "-c" ; then 
  192.   echo shar: Will not clobber existing file \"'etc/english.befehl'\"
  193. else
  194.   echo shar: Extracting \"'etc/english.befehl'\" \(2128 characters\)
  195.   sed "s/^X//" >'etc/english.befehl' <<'END_OF_FILE'
  196. X/***************************************************************************/
  197. X/* Please make changes to this file VERY wisely! Remember that you have to */
  198. X/* list D(ir) before DA(te) and M(ail) before MA(cro) to stay conform with */
  199. X/* GEONET etc. ...                               */
  200. X/*                                           */
  201. X/*                 Description                           */
  202. X/* ======================================================================= */
  203. X/* ID            - Number of command (see 'loop.c')               */
  204. X/* Intern        - Need Userlevel X to execute the command           */
  205. X/* Extern        - Oldfashioned diff between int. & ext. access           */
  206. X/* Prototyp      - If this value is '1', the command is shown in helpfile  */
  207. X/* Befehl        - That's the name of the command               */
  208. X/*                                       */
  209. X/*                                       */
  210. X/* NOTE: Leave ONE blank line between this comment-box and the ID-Line!    */
  211. X/***************************************************************************/
  212. X
  213. XID    Intern  Extern  Prototyp  Befehl 
  214. X===============================================
  215. X110    0    0    1    +
  216. X120    0    0    1    -
  217. X260    0    0    1    Account
  218. X125    9    9    0    Admin
  219. X460    0    0    1    Area
  220. X150    0    0    1    Board
  221. X170    0    0    1    Chat
  222. X200    0    0    1    Dir
  223. X370    0    0    1    Date
  224. X220    1    1    1    Delete
  225. X440    0    0    1    Download
  226. X150    0    0    0    Cd
  227. X400     0       0       1       Direction
  228. X180    0    0    0    End
  229. X480      1    1    1    Edit
  230. X300    1    1    1    Finger
  231. X340    1    1    1    Forward
  232. X390     0    0    1    Games
  233. X180    0    0    1    Goodbye
  234. X180    0    0    0    Quit
  235. X180    0    0    0    Bye
  236. X190    0    0    1    Help
  237. X160    0    2    1    Mail
  238. X330     0       0       1       Macro
  239. X140    0    0    1    Message
  240. X240    6    6    1    Minix
  241. X240    6    6    0    Execute
  242. X450     7    7    0    Outdial
  243. X270    0    0    1    Portinfo
  244. X130    0    0    1    Protocol
  245. X250    0    0    1    PM
  246. X210    0    0    1    Read
  247. X280    0    0    1    Setup
  248. X470    0    0    1    Sysinfo
  249. X280    0    0    0    Password
  250. X280    0    0    0    Ansi
  251. X280    0    0    0    Bell
  252. X280    0    0    0    Address
  253. X310    1    0    1    Signature
  254. X290    0    0    1    State
  255. X410     0       0       1       Statistics
  256. X430     1       1       1       Search
  257. X380    0    0    1    Time
  258. X300    0    0    1    Users
  259. X320    0    0    1    Version        
  260. X230    0    5    1    Write
  261. X270    0    0    0    Who
  262. X420    0    0    0    RING
  263. X195    0    1    0    ~PD
  264. X215    0    0    0    Level
  265. X275    9    9    0    Relogin
  266. X350     0       0       0       Sleep
  267. X360     0       0       0       Keypressed
  268. X230     0       5       1       Upload
  269. X180     0       0       0       RING
  270. X998    2    2    0    ~MAIL_DUMMY
  271. END_OF_FILE
  272.   if test 2128 -ne `wc -c <'etc/english.befehl'`; then
  273.     echo shar: \"'etc/english.befehl'\" unpacked with wrong size!
  274.   fi
  275.   # end of 'etc/english.befehl'
  276. fi
  277. if test -f 'etc/help.befehle' -a "${1}" != "-c" ; then 
  278.   echo shar: Will not clobber existing file \"'etc/help.befehle'\"
  279. else
  280.   echo shar: Extracting \"'etc/help.befehle'\" \(2848 characters\)
  281.   sed "s/^X//" >'etc/help.befehle' <<'END_OF_FILE'
  282. X/***************************************************************************/
  283. X/* Wer diese Datei aendert sollte GENAU wissen was er tut. Die Reihen-     */
  284. X/* folge der Befehle ist NICHT willkuerlich festgelegt worden, sondern     */
  285. X/* entspricht der Vorgabe fuer GEOnet-Befehle und deren Abkuerzungen.      */
  286. X/*                                       */
  287. X/* S(chreiben) kommt vor SE(tup) und L(esen) vor LOE(schen) etc. ... wer   */
  288. X/* sich nicht voellig sicher ist, sollte die Datei einfach im Urzustand    */
  289. X/* belassen.                                   */
  290. X/*                                           */
  291. X/*                 Die Bedeutung der versch. Spalten                */
  292. X/* ======================================================================= */
  293. X/* ID            - Nummer des Befehls (siehe "loop()")               */
  294. X/* Intern        - Benoetigtes Userlevel                   */
  295. X/* Extern        - Bei einigen Befehle wird unterscheiden zwischen intern  */
  296. X/*           und extern. Z.B. beim Befehl "schreiben" wird diese     */
  297. X/*           Regelung angewendet, damit User zwar an die lokalen     */
  298. X/*           Bretter senden duerfen, nicht aber an die externen.     */
  299. X/* Prototyp      - Enthaelt diese Spalte eine '1', wird der Befehl bei der */
  300. X/*           Befehlsuebersicht angezeigt.                   */
  301. X/* Befehl        - Unter diesem Namen wird der Befehl aufgerufen           */
  302. X/*                                       */
  303. X/*                                       */
  304. X/* ACHTUNG: Zwischen Kommentar und Ueberschrift EINE Leerzeile einfuegen ! */
  305. X/***************************************************************************/
  306. X
  307. XID    Intern  Extern  Prototyp  Befehl 
  308. X===============================================
  309. X110    0    0    1    +
  310. X120    0    0    1    -
  311. X130    0    0    1    Anrufer
  312. X140    1    0    1    Ansage
  313. X150    0    0    1    Brett
  314. X160    0    2    1    Brief
  315. X170    0    0    1    Chat
  316. X170    0    0    0    Dialog
  317. X370    0    0    0    Datum
  318. X170    0    0    0    Co
  319. X999    0    0    1    Demo
  320. X440     0       0       1       Download
  321. X210    0    0    1    Lesen
  322. X480    1    1    1    Edit
  323. X180    0    0    1    Ende
  324. X180    0    0    0    Quit
  325. X180    0    0    0    Log
  326. X460    0    0    0    Area
  327. X460    0    0    1    Gruppe
  328. X180    0    0    0    Goodbye
  329. X190    0    0    1    Hilfe
  330. X195    0    1    0    ~PD
  331. X200    0    0    1    Inhalt
  332. X200    0    0    0    Dir
  333. X205    0    0    0    Id
  334. X215    0    0    0    Level
  335. X220    1    1    1    Loeschen
  336. X330     0       0       1       Makro
  337. X240    6    6    1    Minix
  338. X240    6    6    0    Execute
  339. X450    1    1    1    Outdial
  340. X450    1    1    0    Od
  341. X270    0    0    1    Portinfo
  342. X270    0    0    0    Who
  343. X270    0    0    0    Wer
  344. X260    0    0    1    Postfach
  345. X260    0    0    0    Antrag
  346. X275    9    9    0    Relogin
  347. X400     0       0       1       Richtung
  348. X230    0    5    1    Schreiben
  349. X280    0    0    1    Setup
  350. X390     0    0    1    Spiele
  351. X430    1    1    1    Suchen
  352. X470    0    0    1    Sysinfo
  353. X280    0    0    0    Passwort
  354. X280    0    0    0    Ansi
  355. X280    0    0    0    Bell
  356. X280    0    0    0    Anschrift
  357. X290    0    0    1    Status
  358. X410     0       0       1       Statistik
  359. X300    0    0    1    User
  360. X310    1    0    1    Unterschrift
  361. X230     0       5       1       Upload
  362. X320    0    0    1    Version        
  363. X340    1    1    1    Weiterleiten
  364. X380    0    0    0    Zeit
  365. X125    1    9    0    Admin
  366. X130    0    0    0    Protokoll
  367. X250    0    0    1    PM
  368. X150    0    0    0    Cd
  369. X300    0    0    0    Finger
  370. X160    0    2    0    Mail
  371. X180    0    0    0    Quit
  372. X180    0    0    0    Exit
  373. X180    0    0    0    Logout
  374. X420    0    0    0    RING
  375. X350     0       0       0       Sleep
  376. X360     0       0       0       Keypressed
  377. X998    7    7    0    ~MAIL_DUMMY
  378. END_OF_FILE
  379.   if test 2848 -ne `wc -c <'etc/help.befehle'`; then
  380.     echo shar: \"'etc/help.befehle'\" unpacked with wrong size!
  381.   fi
  382.   # end of 'etc/help.befehle'
  383. fi
  384. if test -f 'etc/logo~' -a "${1}" != "-c" ; then 
  385.   echo shar: Will not clobber existing file \"'etc/logo~'\"
  386. else
  387.   echo shar: Extracting \"'etc/logo~'\" \(243 characters\)
  388.   sed "s/^X//" >'etc/logo~' <<'END_OF_FILE'
  389. X
  390. X
  391. X
  392. Xooo o o ooo   ooo o ooo ooo   ooo oo   o  o o ooo o      o  oo  ooo ooo ooo o o
  393. X o  ooo oo     o  o ooo oo     o  ooo ooo o o oo  o     ooo o o oo  ooo o    o
  394. X o  o o ooo    o  o o o ooo    o  o o o o  o  ooo ooo   o o ooo ooo ooo ooo  o
  395. X
  396. X
  397. END_OF_FILE
  398.   if test 243 -ne `wc -c <'etc/logo~'`; then
  399.     echo shar: \"'etc/logo~'\" unpacked with wrong size!
  400.   fi
  401.   # end of 'etc/logo~'
  402. fi
  403. if test -f 'etc/mbox.games' -a "${1}" != "-c" ; then 
  404.   echo shar: Will not clobber existing file \"'etc/mbox.games'\"
  405. else
  406.   echo shar: Extracting \"'etc/mbox.games'\" \(734 characters\)
  407.   sed "s/^X//" >'etc/mbox.games' <<'END_OF_FILE'
  408. X/***************************************************************************/
  409. X/* Diese Datei enthaelt die Liste der verfuegbaren Spiele. Die Struktur    */
  410. X/* ist folgende:                               */
  411. X/*                                       */
  412. X/* Name        Pfad zum Spiel                           */
  413. X/* ======================================================================= */
  414. X/* animals       /usr/bin/animals                       */
  415. X/* ttt        /usr/bin/ttt                           */
  416. X/*                                       */
  417. X/* ACHTUNG: Zwischen Kommentar und Liste EINE Leerzeile einfuegen !       */
  418. X/***************************************************************************/
  419. X
  420. XAnimals    /usr/bin/animals
  421. XDiepbom /usr/games/diepbom
  422. XEmpire    /usr/games/empire
  423. XKiller    /usr/games/killer
  424. XSokoban    /usr/games/sokoban
  425. XRogue    /usr/bin/rogue
  426. XRobots  /usr/games/robots
  427. END_OF_FILE
  428.   if test 734 -ne `wc -c <'etc/mbox.games'`; then
  429.     echo shar: \"'etc/mbox.games'\" unpacked with wrong size!
  430.   fi
  431.   # end of 'etc/mbox.games'
  432. fi
  433. if test -f 'etc/mbox.packers' -a "${1}" != "-c" ; then 
  434.   echo shar: Will not clobber existing file \"'etc/mbox.packers'\"
  435. else
  436.   echo shar: Extracting \"'etc/mbox.packers'\" \(798 characters\)
  437.   sed "s/^X//" >'etc/mbox.packers' <<'END_OF_FILE'
  438. X/***************************************************************************/
  439. X/* In dieser Datei befindet sich eine Liste von Komprimieren und Archi-    */
  440. X/* vierern ueber die Artikel im Download-Modus gepackt werden koennen.       */
  441. X/*                                       */
  442. X/* Packer    Kommando         Befehl TAR-Archiv     Endung           */
  443. X/* ======================================================================= */
  444. X/* Compress4.3    /usr/bin/compress    ?    +      .Z           */
  445. X/* Lharc1.02    /usr/bin/lharc a    -a    -      .lzh              */
  446. X/*                                       */
  447. X/* ACHTUNG: Zwischen Kommentar und Liste EINE Leerzeile einfuegen !       */
  448. X/***************************************************************************/
  449. X
  450. XCompress4.3    /usr/bin/compress    ?    +    .Z
  451. XLharc1.02    /usr/bin/lharc        a    -    .lzh
  452. XZoo2.1        /usr/bin/zoo        -add    -    .zoo
  453. XFreeze1.1    /usr/bin/freeze        ?    +    .F
  454. X
  455. X
  456. END_OF_FILE
  457.   if test 798 -ne `wc -c <'etc/mbox.packers'`; then
  458.     echo shar: \"'etc/mbox.packers'\" unpacked with wrong size!
  459.   fi
  460.   # end of 'etc/mbox.packers'
  461. fi
  462. if test -f 'etc/mbox.udc' -a "${1}" != "-c" ; then 
  463.   echo shar: Will not clobber existing file \"'etc/mbox.udc'\"
  464. else
  465.   echo shar: Extracting \"'etc/mbox.udc'\" \(780 characters\)
  466.   sed "s/^X//" >'etc/mbox.udc' <<'END_OF_FILE'
  467. X/***************************************************************************/
  468. X/* Die Datei enthaelt eine Liste von Befehlen, die vom jeweiligen Betrei-  */
  469. X/* ber der ix/MBox zusaetzlich angeboten werden.               */
  470. X/*                                       */
  471. X/* Befehl    Level    Programm                       */
  472. X/* ======================================================================= */
  473. X/* metamail      1    /usr/local/bin/metamail                    */
  474. X/* nn          5    /usr/bin/nn                         */
  475. X/* ps          2    /usr/bin/ps -edalf                   */
  476. X/*                                       */
  477. X/* ACHTUNG: Zwischen Kommentar und Liste EINE Leerzeile einfuegen !       */
  478. X/*          Die Eintraege MUESSEN unbedingt in alphabetischer Reihenfolge  */
  479. X/*          sortiert sein !                            */
  480. X/***************************************************************************/
  481. X
  482. Xelm    3    /usr/local/bin/elm
  483. END_OF_FILE
  484.   if test 780 -ne `wc -c <'etc/mbox.udc'`; then
  485.     echo shar: \"'etc/mbox.udc'\" unpacked with wrong size!
  486.   fi
  487.   # end of 'etc/mbox.udc'
  488. fi
  489. if test -f 'etc/rmail.sh' -a "${1}" != "-c" ; then 
  490.   echo shar: Will not clobber existing file \"'etc/rmail.sh'\"
  491. else
  492.   echo shar: Extracting \"'etc/rmail.sh'\" \(993 characters\)
  493.   sed "s/^X//" >'etc/rmail.sh' <<'END_OF_FILE'
  494. X#---------------------------------------------------------------------------
  495. X#
  496. X#                       ix/MBox  R M A I L . S H
  497. X#          Mailbox-Programm fuer UNIX(-Derivate)
  498. X#            
  499. X#               Volker Schuermann
  500. X#              Wuppertal, FRG, 08.12.1991
  501. X#
  502. X#---------------------------------------------------------------------------
  503. X# Dieses Script uebergibt eine "persoenliche Mail" und eine Empfaenger-
  504. X# Adresse an das Programm RMAIL. Die "persoenliche Mail" enthaelt bereits
  505. X# einen (fast) kompletten Header !
  506. X#
  507. X# Bei Verwendung von SMAIL sollte "config.mbox" speziell fuer die Unter-
  508. X# drueckung der SMAIL-Message-ID etc. konfiguriert werden.
  509. X#---------------------------------------------------------------------------
  510. X# Parameter:
  511. X#
  512. X# $1  ->  Name der Datei ("persoenliche Mail" s.o.)
  513. X# $2  ->  Empfaenger der Mail
  514. X# 
  515. X# Beispiel:
  516. X#
  517. X# rmail -d -i $1 $2
  518. X#
  519. X# Oder:
  520. X# 
  521. X# smail -i -C /usr/local/lib/smail/config.mbox $2 < $1
  522. X#
  523. X# config.mbox ->
  524. X# -recieved_field
  525. X# copy_error_postmaster   
  526. X
  527. Xrmail -d -i $1 $2
  528. END_OF_FILE
  529.   if test 993 -ne `wc -c <'etc/rmail.sh'`; then
  530.     echo shar: \"'etc/rmail.sh'\" unpacked with wrong size!
  531.   fi
  532.   # end of 'etc/rmail.sh'
  533. fi
  534. if test -f 'etc/sysinfo' -a "${1}" != "-c" ; then 
  535.   echo shar: Will not clobber existing file \"'etc/sysinfo'\"
  536. else
  537.   echo shar: Extracting \"'etc/sysinfo'\" \(1906 characters\)
  538.   sed "s/^X//" >'etc/sysinfo' <<'END_OF_FILE'
  539. XContent-Type: text/richtext
  540. XDiese Mailbox laeuft auf einem 20 MHz 386er iNTEL-Rechner mit ca. 240 MB<nl>
  541. XPlattenkapazitaet und 8 MB Hauptspeicher.<nl>
  542. X<nl>
  543. XEingesetzt wird das Betriebssystem MINIX in der 386er Version. Das Mail-<nl>
  544. Xboxprogramm ist ix/MBox, eine Produkt aus der Public Domain.<nl>
  545. X<nl>
  546. XEs werden zwei Modem-Ports angeboten:<nl>
  547. X<nl>
  548. XPort1: USRobotics Courier HST 300-19.2k    0202  462114<nl>
  549. XPort2: Dicovery 2400C         300-2400     0202  4660234<nl>
  550. X<nl>
  551. X<Center><Bold>--------------------------</Bold></Center><nl>
  552. X<nl>
  553. XObwohl diese Mailbox nicht kommerziell betrieben wird, sind einige der<nl>
  554. Xangebotenen Dienste gebuehrenpflichtig.<nl>
  555. X<nl>
  556. X    <Bold>GEBUEHRENFREI</Bold> ist:<nl>
  557. X<nl>
  558. X    o  die Benutztung der Mailbox<nl>
  559. X    o  das private Postfach<nl>
  560. X    o  die Nutzung der verschienden PD-Archive<nl> 
  561. X    o  die private Post an Teilnehmer innerhalb des SUBnet<nl>
  562. X    o  die Teilnahme an den NEWS-Gruppen "de.*"<nl>
  563. X<nl>
  564. X    <Bold>GEBUEHRENPFLICHTIG</Bold> ist:<nl>
  565. X<nl>
  566. X    o  der <Bold>OUTDIAL</Bold>-Service - Verbindung zu Mailboxen<nl>
  567. X       und Datenbanken im In- und Ausland<nl>
  568. X    o  die private Post an Teilnehmer ausserhalb des SUBnet<nl>
  569. X    o  die Teilnahme an den internationalen NEWS-Gruppen<nl>   
  570. X<nl>    
  571. XGenauere Informationen und aktuelle Aenderungen werden regelmaessig im<nl>
  572. XBrett 'local.talk' bekanntgegeben.<nl>
  573. X<nl>
  574. X<Center><Bold>--------------------------</Bold></Center><nl>
  575. X<nl>
  576. XDie Gebuehren fuer den internationalen MAIL- und NEWS-Zugriff betragen<nl>
  577. Xpro Quartal/User 19.50 DM. Sie sind auf untenstehendes Konto zu ueber-<nl>
  578. Xweisen.<nl>
  579. X<nl>
  580. X    Volker Schuermann<nl>
  581. X    Kto. 4131363<nl>
  582. X    Blz. 330 500 00 / Stadtsparkasse Wuppertal<nl>
  583. X    <Bold>STICHWORT</Bold> "Acct. Username"<nl>       
  584. X<nl>
  585. XBitte das <Bold>STICHWORT</Bold> unbedingt angeben, da die Buchung sonst evtl. als<nl>
  586. XSpende gewertet wird!<nl>
  587. X<nl>
  588. X<Center><Bold>--------------------------</Bold></Center><nl>
  589. X<nl>
  590. X
  591. END_OF_FILE
  592.   if test 1906 -ne `wc -c <'etc/sysinfo'`; then
  593.     echo shar: \"'etc/sysinfo'\" unpacked with wrong size!
  594.   fi
  595.   # end of 'etc/sysinfo'
  596. fi
  597. if test -f 'etc/xmd.alias' -a "${1}" != "-c" ; then 
  598.   echo shar: Will not clobber existing file \"'etc/xmd.alias'\"
  599. else
  600.   echo shar: Extracting \"'etc/xmd.alias'\" \(1057 characters\)
  601.   sed "s/^X//" >'etc/xmd.alias' <<'END_OF_FILE'
  602. X#---------------------------------------------------------------------------
  603. X#
  604. X#                       ix/MBox  X M D . A L I A S
  605. X#          Mailbox-Programm fuer UNIX(-Derivate)
  606. X#            
  607. X#               Volker Schuermann
  608. X#              Wuppertal, FRG, 15.02.1992
  609. X#
  610. X#---------------------------------------------------------------------------
  611. X# In dieser Datei werden Empfaenger-Adressen und deren Alias gespeichert.
  612. X#
  613. X# Das Format der Eintraege ist folgendes:
  614. X#
  615. X# To: (1) Adresse, die per RMAIL uebertragen wurde
  616. X# To: (2) Adresse, die innerhalb der ix/MBox verwendet werden soll
  617. X# <LEERZEILE>
  618. X# To: (1) etc.
  619. X# To: (2) etc.
  620. X# <LEERZEILE>
  621. X#
  622. X#---------------------------------------------------------------------------
  623. X# Parameter: -keine-
  624. X
  625. XTo: Multiple recipients of <TEX-D-L@dearn.bitnet>
  626. XTo: Christian.Boehm@unnet.w.open.DE
  627. X
  628. XTo: Multiple recipients of <TEX-D-L@DEARN.uucp>
  629. XTo: Christian.Boehm@unnet.w.open.DE
  630. X
  631. XTo: Postmaster@unnet.w.open.DE
  632. XTo: Volker.Schuermann@unnet.w.open.DE
  633. X
  634. XTo: Multiple recipients of list <386bsd-list@compuram.bbt.se>
  635. XTo: Christian.Boehm@unnet.w.open.DE
  636. X
  637. X
  638. END_OF_FILE
  639.   if test 1057 -ne `wc -c <'etc/xmd.alias'`; then
  640.     echo shar: \"'etc/xmd.alias'\" unpacked with wrong size!
  641.   fi
  642.   # end of 'etc/xmd.alias'
  643. fi
  644. if test -f 'rz.cdiff' -a "${1}" != "-c" ; then 
  645.   echo shar: Will not clobber existing file \"'rz.cdiff'\"
  646. else
  647.   echo shar: Extracting \"'rz.cdiff'\" \(1562 characters\)
  648.   sed "s/^X//" >'rz.cdiff' <<'END_OF_FILE'
  649. X*** rz.c~    Sat Aug 10 13:39:34 1991
  650. X--- rz.c    Sat Aug 10 13:13:54 1991
  651. X***************
  652. X*** 1,6 ****
  653. X--- 1,8 ----
  654. X  #define VERSION "2.03 05-17-88"
  655. X  #define PUBDIR "/usr/spool/uucppublic"
  656. X  
  657. X+ /* Unnet == Modified for ix/MBox-Use !!! */
  658. X+ 
  659. X  /*% cc -compat -M2 -Ox -K -i -DMD -DOMEN % -o rz; size rz;
  660. X  <-xtx-*> cc386 -Ox -DMD -DOMEN -DSEGMENTS=8 rz.c -o $B/rz;  size $B/rz
  661. X   *
  662. X***************
  663. X*** 390,395 ****
  664. X--- 392,399 ----
  665. X  {
  666. X      register c;
  667. X  
  668. X+     strcpy(Pathname, *argp); checkpath(Pathname);  /* Unnet */
  669. X+ 
  670. X      if (Batch || argc==0) {
  671. X          Crcflg=1;
  672. X          if ( !Quiet)
  673. X***************
  674. X*** 432,439 ****
  675. X          pclose(fout);  return ERROR;
  676. X      }
  677. X  #endif
  678. X!     if (fout)
  679. X!         fclose(fout);
  680. X  #ifndef vax11c
  681. X      if (Restricted) {
  682. X          unlink(Pathname);
  683. X--- 436,445 ----
  684. X          pclose(fout);  return ERROR;
  685. X      }
  686. X  #endif
  687. X!     if (fout){
  688. X!         fflush(fout); /* Unnet */
  689. X!         fclose(fout);
  690. X!     }
  691. X  #ifndef vax11c
  692. X      if (Restricted) {
  693. X          unlink(Pathname);
  694. X***************
  695. X*** 915,922 ****
  696. X  register n;
  697. X  {
  698. X      register char *p;
  699. X!     if (n == 0)
  700. X!         return OK;
  701. X  
  702. X      if (Thisbinary) {
  703. X          for (p=buf; --n>=0; )     
  704. X--- 921,931 ----
  705. X  register n;
  706. X  {
  707. X      register char *p;
  708. X!                                                       
  709. X!     if (n == 0)
  710. X!         return OK;
  711. X!        
  712. X!     if (fout == 0) fout = fopen( Pathname, "a" );     /* Unnet */
  713. X  
  714. X      if (Thisbinary) {
  715. X          for (p=buf; --n>=0; )     
  716. X***************
  717. X*** 1436,1441 ****
  718. X--- 1445,1451 ----
  719. X          return OK;
  720. X      }
  721. X  #endif
  722. X+     fflush(fout);  /* Unnet */
  723. X      if (fclose(fout)==ERROR) {
  724. X          fprintf(stderr, "file close ERROR\n");
  725. X          return ERROR;
  726. END_OF_FILE
  727.   if test 1562 -ne `wc -c <'rz.cdiff'`; then
  728.     echo shar: \"'rz.cdiff'\" unpacked with wrong size!
  729.   fi
  730.   # end of 'rz.cdiff'
  731. fi
  732. if test -f 'src/CROSSREF' -a "${1}" != "-c" ; then 
  733.   echo shar: Will not clobber existing file \"'src/CROSSREF'\"
  734. else
  735.   echo shar: Extracting \"'src/CROSSREF'\" \(2421 characters\)
  736.   sed "s/^X//" >'src/CROSSREF' <<'END_OF_FILE'
  737. X/***************************************************************************/
  738. X/*        PROGRAMM  ix/Mbox                           */
  739. X/*             DATEI  CROSSREF                           */
  740. X/*        FUNKTIONEN  Cross-Referenz-Liste der Funktionen           */
  741. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  742. X/*  LETZTE AENDERUNG  28.05.1992                       */
  743. X/***************************************************************************/
  744. X
  745. Xadmin()                admin.c
  746. Xansage()            lesen.c
  747. Xansi()                 tools.c
  748. Xanzeigen()            lesen2.c
  749. Xbaudrate()            baudrate.c
  750. Xbef()                befehl.c
  751. Xbrett()                misc2.c
  752. Xbrief()                mail.c
  753. Xbigcopy()            tools.c
  754. Xcarboncopy()            weiterl.c
  755. Xcheckdomaintype()        lesen.c
  756. Xchk_newsgrp()            misc2.c
  757. Xclearline()            tools.c
  758. Xcontrol()            control.c
  759. Xcrypted()            tools.c
  760. Xctrlx()                ctrlx.c
  761. Xcut_arg()            loop.c
  762. Xcut_bef()            loop.c
  763. Xdateconv()            tools.c
  764. Xdatereconv()            tools.c
  765. Xdownload()            pd.c
  766. Xedit()                suchen.c
  767. Xfaces()                faces.c
  768. Xfetch_receipy()            mail.c
  769. Xfinger()            portinfo.c
  770. Xfixoutput()            main.c
  771. Xgames()                games.c
  772. Xgetch()                getch.c
  773. Xgetint()            getline.c
  774. Xgetline()            getline.c
  775. Xgetsite()            lesen.c
  776. Xheadline()            tools.c
  777. Xhelp()                help.c
  778. Xinhalt2()            lesen2.c
  779. Xinit()                main.c
  780. Xinit_user()            intro.c
  781. Xintro()                intro.c
  782. Xisin()                tools.c
  783. Xlength()            tools.c
  784. Xlesen()                lesen.c
  785. Xlesen2()            lesen2.c
  786. Xloeschen()            misc2.c
  787. Xloeschen2()            lesen2.c
  788. Xlogout()            main.c
  789. Xloop()                loop.c
  790. Xmain()                main.c
  791. Xmaybe_locked()            tools.c
  792. Xmblock()            tools.c
  793. Xmbunlock()            tools.c
  794. Xmore()                more.c
  795. Xmkix()                pd.c
  796. Xmydate()            tools.c
  797. Xmytime()            tools.c
  798. Xnerror()            nerror.c & derror.c
  799. Xnoctrlx()            ctrlx.c
  800. Xnum_stripped()            tools.c
  801. Xoutdial()            outdial.c
  802. Xpd()                pd.c
  803. Xperms()                tools.c
  804. Xport()                portinfo.c
  805. Xpostfach()            postfach.c
  806. Xprf()                misc.c
  807. Xpruefe()            misc.c
  808. Xquoted_printable()        show.c
  809. Xrates()                loop.c
  810. Xrename()            tools.c
  811. Xrichtext()            show.c
  812. Xscanner()            misc.c
  813. Xschreiben()            misc.c
  814. Xsetup()                  admin.c
  815. Xsetup_get()            admin.c
  816. Xshortname()            tools.c
  817. Xshow()                show.c
  818. Xshow_level()            portinfo.c
  819. Xsigcatch()            loop.c
  820. Xstatus()            pd.c
  821. Xstatistik()            pd.c
  822. Xstrcomp()            tools.c
  823. Xstrcopy()            tools.c
  824. Xstripped()            tools.c
  825. Xsubb()                misc2.c
  826. Xsuchen()            suchen.c
  827. Xtimeconv()            tools.c
  828. Xtimereconv()            tools.c
  829. Xtty()                 tools.c
  830. Xttyna()                tools.c
  831. Xunterschrift()            lesen.c
  832. Xupcased()            tools.c
  833. Xuser_aendern()            admin.c
  834. Xuser_anzeigen()            admin.c
  835. Xuser_loeschen()            admin.c
  836. Xuserliste()            portinfo.c
  837. Xwait_until_keypressed()        admin.c
  838. Xweiterleiten()            weiterl.c
  839. Xwhoami()            tools.c
  840. Xwhodo()                control.c
  841. Xyesno()                getline.c
  842. END_OF_FILE
  843.   if test 2421 -ne `wc -c <'src/CROSSREF'`; then
  844.     echo shar: \"'src/CROSSREF'\" unpacked with wrong size!
  845.   fi
  846.   # end of 'src/CROSSREF'
  847. fi
  848. if test -f 'src/HISTORY' -a "${1}" != "-c" ; then 
  849.   echo shar: Will not clobber existing file \"'src/HISTORY'\"
  850. else
  851.   echo shar: Extracting \"'src/HISTORY'\" \(2029 characters\)
  852.   sed "s/^X//" >'src/HISTORY' <<'END_OF_FILE'
  853. X/***************************************************************************/
  854. X/*        PROGRAMM  ix/Mbox                           */
  855. X/*             DATEI  HISTORY                           */
  856. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  857. X/*  LETZTE AENDERUNG  20.02.1992                       */
  858. X/***************************************************************************/
  859. X
  860. X20.04.1991  ->  Erste Versuche einen NEWS-Reader im Stil der alten "PC-Boxen"
  861. X        zu basteln (sind positiv verlaufen)
  862. X
  863. X21.04.1991  ->  Schreiben an NGs via PNEWS                 
  864. X
  865. X22.04.1991  ->  REPLY via PNEWS
  866. X
  867. X23.04.1991  ->  SH-unabhaengiges Accounting
  868. X
  869. X26.04.1991  ->  Persoenliche Mail lesen, schreiben, beantworten
  870. X
  871. X11.05.1991  ->  Inhalt/Datum, Status
  872. X
  873. X01.06.1991  ->  Vorbereitung fuer die Portierung
  874. X
  875. X02.06.1991  ->  Erste BETA-Test Version an die Portierer/Tester verschickt
  876. X
  877. X18.06.1991  ->  Makro-Befehle implementiert
  878. X
  879. X15.08.1991  ->  SVR3 einigermassen angepasst, LOCK-Mechanismus eingebaut,
  880. X        NNPOST und RMAIL ermoeglicht, versuchweise _SYS_ACCOUNT
  881. X        integriert
  882. X
  883. X21.09.1991  ->  Scanner-Datum beim LOGOUT aktuallisieren, nicht mehr bei
  884. X        init_user()
  885. X
  886. X21.10.1991  ->  Option fuer Online-Spiele implementiert
  887. X
  888. X26.10.1991  ->  Endlich ein "anstaendiges" Makefile:-)
  889. X
  890. X12.11.1991  ->  Die Anspassung an SVR3 laeuft auf Hochtouren
  891. X
  892. X16.11.1991  ->  Referenzversion 1.6.0 ueber "sub.os.minix" gepostet
  893. X
  894. X17.11.1991  ->  Patchlevel PL1 fertiggestellt
  895. X           
  896. X27.11.1991  ->  Patchlevel PL3 mit schnellerem MB-DAEMON ausgeliefert
  897. X
  898. X06.12.1991  ->  Umgestellt auf RMAIL & INEWS (Header mit Refs. etc.)
  899. X
  900. X28.12.1991  ->  Internationale Version (DEFINES, README, etc.) ausgeliefert
  901. X
  902. X04.01.1992  ->  MAIL- & NEWS-Header editierbar (Followup etc.)
  903. X
  904. X20.02.1992  ->  Eigener DOWNLOAD-Befehl. MB-DAEMON erstellt LIB online (opt.)
  905. X
  906. X09.05.1992  ->  RTF (Richtext Format) implementiert
  907. X
  908. X24.05.1992  ->  Strict-Accounting eingebaut / SVR4-Port funxt (!) / 1.6 PL9f
  909. X
  910. X06.06.1992  ->  Version 1.6 PL10 ausgeliefert
  911. X
  912. X06.06.1992  ->  Version 1.6 PL10 ausgeliefert
  913. X
  914. X06.06.1992  ->  Version 1.6 PL10 ausgeliefert
  915. END_OF_FILE
  916.   if test 2029 -ne `wc -c <'src/HISTORY'`; then
  917.     echo shar: \"'src/HISTORY'\" unpacked with wrong size!
  918.   fi
  919.   # end of 'src/HISTORY'
  920. fi
  921. if test -f 'src/baudrate.c' -a "${1}" != "-c" ; then 
  922.   echo shar: Will not clobber existing file \"'src/baudrate.c'\"
  923. else
  924.   echo shar: Extracting \"'src/baudrate.c'\" \(1710 characters\)
  925.   sed "s/^X//" >'src/baudrate.c' <<'END_OF_FILE'
  926. X/***************************************************************************/
  927. X/*        PROGRAMM  ix/Mbox                           */
  928. X/*             DATEI  baudrate.c                       */
  929. X/*        FUNKTIONEN  baudrate()                       */
  930. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  931. X/*  LETZTE AENDERUNG  16.03.1992                       */
  932. X/***************************************************************************/
  933. X
  934. X#include <stdio.h>
  935. X#include <time.h>
  936. X
  937. X#include "mbox.h"
  938. X
  939. X
  940. X#ifdef _SYS7    /* UNIX System 7  (MINIX, COHERENT, ...) */
  941. X
  942. X#include  <sgtty.h>
  943. Xstatic struct sgttyb told;
  944. X
  945. X#else        /* UNIX System V  (UNIX, XENIX, ESIX, ...) */
  946. X
  947. X#include  <sys/termio.h> 
  948. Xstatic struct termio told;
  949. X
  950. X#endif
  951. X
  952. X
  953. X#define BYTE    0377    /* Don't ask me, ask Andy !! */
  954. X
  955. X
  956. Xint baudrate( try )
  957. Xint try;
  958. X{
  959. X  int i, j = 0;
  960. X  int guess = -1;
  961. X  long ts, tn;
  962. X
  963. X
  964. X  if(BAUDRATE != 0) return BAUDRATE;
  965. X
  966. X#ifdef _SYS7
  967. X  
  968. X  ioctl( 0, TIOCGETP, &told );
  969. X  guess = (int) (100 * (told.sg_ospeed & BYTE));
  970. X
  971. X#else
  972. X
  973. X  ioctl( 0, TCGETA, &told );
  974. X
  975. X  if(told.c_cflag &=    B300) guess = (int)   300;
  976. X  if(told.c_cflag &=   B1200) guess = (int)  1200;
  977. X  if(told.c_cflag &=   B2400) guess = (int)  2400;
  978. X  if(told.c_cflag &=   B4800) guess = (int)  4800;
  979. X  if(told.c_cflag &=   B9600) guess = (int)  9600;
  980. X  /*
  981. X  if(told.c_cflag &=  B14400) guess = (int) 14400;
  982. X  */
  983. X  if(told.c_cflag &=  B19200) guess = (int) 19200;
  984. X  if(told.c_cflag &=  B38400) guess = (int) 38400;
  985. X
  986. X#endif
  987. X
  988. X#ifdef _BAUDRATE      /* HST mit 'fixed baudrate 19.2k' */
  989. X    
  990. X  if((guess == MAX_BPS) || (guess == 0)){
  991. X
  992. X    guess = 300;
  993. X
  994. X    if(try >   300) guess =  1200;
  995. X    if(try >  1200) guess =  2400;
  996. X    if(try >  2400) guess =  9600;
  997. X    if(try >  9600) guess = 14400;
  998. X    if(try > 14400) guess = 19200;
  999. X  }
  1000. X
  1001. X#endif
  1002. X
  1003. X  return guess;
  1004. X
  1005. X}
  1006. END_OF_FILE
  1007.   if test 1710 -ne `wc -c <'src/baudrate.c'`; then
  1008.     echo shar: \"'src/baudrate.c'\" unpacked with wrong size!
  1009.   fi
  1010.   # end of 'src/baudrate.c'
  1011. fi
  1012. if test -f 'src/befehl.c' -a "${1}" != "-c" ; then 
  1013.   echo shar: Will not clobber existing file \"'src/befehl.c'\"
  1014. else
  1015.   echo shar: Extracting \"'src/befehl.c'\" \(2060 characters\)
  1016.   sed "s/^X//" >'src/befehl.c' <<'END_OF_FILE'
  1017. X/***************************************************************************/
  1018. X/*        PROGRAMM  ix/Mbox                           */
  1019. X/*             DATEI  befehl.c                           */
  1020. X/*        FUNKTIONEN  bef()                           */
  1021. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  1022. X/*  LETZTE AENDERUNG  06.06.1992                       */
  1023. X/***************************************************************************/
  1024. X
  1025. X#include <stdio.h>
  1026. X
  1027. X#include "mbox.h"
  1028. X
  1029. X
  1030. X/***************************************************************************/
  1031. X/*      FUNKTION  bef()                               */
  1032. X/*  BESCHREIBUNG  Sucht entweder die Befehlsnummer zu einem bekannten      */
  1033. X/*          Befehl, oder zeigt die Befehle als Uebersicht an.        */
  1034. X/*          Dabei wird das Userlevel beruecksichtigt.                */
  1035. X/*     PARAMETER  befehl  =  Befehl  =  Befehl, der gesucht werden soll    */
  1036. X/*                 '?'     =  Befehle anzeigen (levelabhaengig)  */
  1037. X/*          arg     =  '*'     =  ALLE Befehle anzeigen                */
  1038. X/*     RUECKGABE  -1  =  Userlevel reicht nicht aus               */
  1039. X/*               -9  =  Befehl nicht gefunden                   */
  1040. X/*           n  =  Befehlsnummer (siehe Datei BEFEHLE und loop.c)       */
  1041. X/***************************************************************************/
  1042. X
  1043. Xint bef(befehl, arg)
  1044. Xchar befehl[];
  1045. Xchar arg[];
  1046. X{
  1047. X  char s[STRING];
  1048. X  int b = 0, i = 0, l;
  1049. X
  1050. X  l = USER.level;
  1051. X
  1052. X  if (befehl[0] == '?') {
  1053. X
  1054. X    if (arg[0] == '*') l = 9999;
  1055. X
  1056. X    while (BEF[b].id != -1) {
  1057. X        if ((BEF[b].prototyp == 1) && (BEF[b].in <= l)) {
  1058. X            printf("%-14.14s ", BEF[b].befehl);
  1059. X            i++;
  1060. X            if (i == 5) {
  1061. X                printf("\n");
  1062. X                i = 0;
  1063. X            }
  1064. X        }
  1065. X        b++;
  1066. X    }
  1067. X    printf("\n\n");
  1068. X    return 0;
  1069. X  }
  1070. X  else {
  1071. X    while (BEF[b].id != -1) {
  1072. X        if (strcomp(befehl, BEF[b].befehl) == 0) {
  1073. X            if (BEF[b].in <= USER.level){
  1074. X                if(BEF[b].id == 1000){
  1075. X                    printf("\n\n");
  1076. X                    if(arg[0] == '\0')
  1077. X                        sprintf(s, "exec %s %s %d %d", RSH, BEF[b].pfad, OLDUID, OLDGID);
  1078. X                    else
  1079. X                        sprintf(s, "exec %s %s \"%s\" %d %d", RSH, BEF[b].pfad, arg, OLDUID, OLDGID);            
  1080. X                    system(s);
  1081. X                }
  1082. X                return BEF[b].id;
  1083. X            }
  1084. X            else{
  1085. X                return -1;
  1086. X            }
  1087. X        }
  1088. X        b++;
  1089. X    }
  1090. X    return -9;
  1091. X  }
  1092. X}
  1093. END_OF_FILE
  1094.   if test 2060 -ne `wc -c <'src/befehl.c'`; then
  1095.     echo shar: \"'src/befehl.c'\" unpacked with wrong size!
  1096.   fi
  1097.   # end of 'src/befehl.c'
  1098. fi
  1099. if test -f 'src/control.c' -a "${1}" != "-c" ; then 
  1100.   echo shar: Will not clobber existing file \"'src/control.c'\"
  1101. else
  1102.   echo shar: Extracting \"'src/control.c'\" \(2590 characters\)
  1103.   sed "s/^X//" >'src/control.c' <<'END_OF_FILE'
  1104. X/***************************************************************************/
  1105. X/*        PROGRAMM  ix/Mbox                           */
  1106. X/*             DATEI  control.c                           */
  1107. X/*        FUNKTIONEN  control(), whodo()                   */
  1108. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  1109. X/*  LETZTE AENDERUNG  24.11.1991                       */
  1110. X/***************************************************************************/
  1111. X
  1112. X#include <stdio.h>
  1113. X
  1114. X#include "mbox.h"
  1115. X
  1116. X
  1117. X
  1118. X/***************************************************************************/
  1119. X/*      FUNKTION  control()                           */
  1120. X/*  BESCHREIBUNG  Fuehrt ein "Logbuch" in zwei versch. Dateien/auf zwei    */
  1121. X/*          versch. Geraeten (CONSOLE & CPRN).                       */
  1122. X/*     PARAMETER  text  =  Ansage-Text                                     */
  1123. X/*          mode  =  '< 99'  =  Ausgabe auf CONSOLE                  */
  1124. X/*          mode  =  '= 99'  =  Ausgabe auf CPRN                     */
  1125. X/*     RUECKGABE  keine                                                       */
  1126. X/***************************************************************************/
  1127. X
  1128. XFILE *contfp = NULL;
  1129. X
  1130. Xvoid control(text, mode)
  1131. Xchar text[];
  1132. Xint mode;
  1133. X{
  1134. X  if (mode < 99) {
  1135. X
  1136. X#ifdef _MINIX
  1137. X    if(tty() >= FIRST_EX_TTY){
  1138. X#endif
  1139. X        contfp = fopen(CONSOLE_REDIRECT, "a");
  1140. X        if (contfp == NULL) {
  1141. X            printf("\n\n%s [%s]\n\n", CTL01_MSG, CONSOLE_REDIRECT);
  1142. X            exit(-1);
  1143. X        }
  1144. X#ifdef _DATESTAMP
  1145. X        fprintf(contfp, "%s %s <%s>  %s\n", mydate(1), mytime(1), ttyna(), text);
  1146. X#else
  1147. X        fprintf(contfp, "MBOX: (%s:) %s\n", ttyna(), text);
  1148. X#endif
  1149. X        fflush(contfp);
  1150. X        fclose(contfp);
  1151. X#ifdef _MINIX
  1152. X    }
  1153. X#endif
  1154. X
  1155. X  }
  1156. X  if (mode == 99) {
  1157. X    contfp = fopen(CPRN, "a");
  1158. X    if (contfp == NULL) {
  1159. X        printf("\n\n%s [%s]\n\n", CTL01_MSG, CPRN);
  1160. X        exit(-1);
  1161. X    }
  1162. X    fprintf(contfp, "\n%s  -  %s\n", mydate(1), mytime(1));
  1163. X    fprintf(contfp, "MBOX: (%s:) %s\n", ttyna(), text);
  1164. X    fflush(contfp);
  1165. X    fclose(contfp);
  1166. X  }
  1167. X}
  1168. X
  1169. X
  1170. X
  1171. X/***************************************************************************/
  1172. X/*      FUNKTION  whodo()                           */
  1173. X/*  BESCHREIBUNG  Erstellt eine Datei fuer die "portinfo()"-Routine.       */
  1174. X/*     PARAMETER  text = Ansage-Text (aktiver Befehl etc.)                 */
  1175. X/*     RUECKGABE  keine                                                       */
  1176. X/***************************************************************************/
  1177. X
  1178. Xvoid whodo(text)
  1179. Xchar text[];
  1180. X{
  1181. X  FILE *fp;
  1182. X  char s[STRING];
  1183. X
  1184. X  s[0] = '\0'; strcat(s, HOME); strcat(s, "/etc/");
  1185. X  strcat(s, (char *) ttyna()); strcat(s, ".");
  1186. X
  1187. X  fp = fopen(s, "w");
  1188. X  if (fp == NULL) {
  1189. X    nerror("control.c", 44, "whodo", "Datei-Schreibfehler", s);
  1190. X  }
  1191. X  fputs(text, fp);
  1192. X  fclose(fp);
  1193. X}
  1194. END_OF_FILE
  1195.   if test 2590 -ne `wc -c <'src/control.c'`; then
  1196.     echo shar: \"'src/control.c'\" unpacked with wrong size!
  1197.   fi
  1198.   # end of 'src/control.c'
  1199. fi
  1200. if test -f 'src/ctrlx.c' -a "${1}" != "-c" ; then 
  1201.   echo shar: Will not clobber existing file \"'src/ctrlx.c'\"
  1202. else
  1203.   echo shar: Extracting \"'src/ctrlx.c'\" \(2077 characters\)
  1204.   sed "s/^X//" >'src/ctrlx.c' <<'END_OF_FILE'
  1205. X/***************************************************************************/
  1206. X/*        PROGRAMM  ix/Mbox                           */
  1207. X/*             DATEI  ctrlx.c                           */
  1208. X/*        FUNKTIONEN  ctrlx(), noctrlx()                   */
  1209. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  1210. X/*  LETZTE AENDERUNG  16.11.1991                       */
  1211. X/***************************************************************************/
  1212. X
  1213. X#ifdef _SYS7    /* UNIX System 7  (MINIX, COHERENT, ...) */
  1214. X
  1215. X#include  <sgtty.h>
  1216. Xstatic struct tchars newtc, oldtc;
  1217. X
  1218. X#else        /* UNIX System V  (UNIX, XENIX, ESIX, ...) */
  1219. X
  1220. X#include  <sys/termio.h> 
  1221. Xstatic struct termio newtc, oldtc;
  1222. X
  1223. X#endif
  1224. X
  1225. X
  1226. X
  1227. X
  1228. X/***************************************************************************/
  1229. X/*      FUNKTION  ctrlx()                           */
  1230. X/*  BESCHREIBUNG  Das QUIT-Zeichen wird auf (int) 24 gesetzt - das ent-       */
  1231. X/*          spricht einem CTRL-X. Wird nun CTRL-X gedrueckt, loest   */
  1232. X/*          UNIX das Signal SIGABRT aus ...                          */
  1233. X/*     PARAMETER  keine                                                       */
  1234. X/*     RUECKGABE  keine                                                    */
  1235. X/***************************************************************************/
  1236. X
  1237. Xvoid ctrlx()
  1238. X{
  1239. X
  1240. X#ifdef _SYS7
  1241. X
  1242. X  ioctl(0, TIOCGETC, (struct sgttyb *) &oldtc);
  1243. X  newtc = oldtc;
  1244. X  newtc.t_quitc = 24;
  1245. X  ioctl(0, TIOCSETC, (struct sgttyb *) &newtc);
  1246. X
  1247. X#else
  1248. X
  1249. X  ioctl(0, TCGETA, (struct termio *) &oldtc);
  1250. X  newtc = oldtc;
  1251. X  newtc.c_cc[VQUIT] = 24;
  1252. X  ioctl(0, TCSETA, (struct termio *) &newtc);
  1253. X
  1254. X#endif
  1255. X
  1256. X}
  1257. X
  1258. X
  1259. X/***************************************************************************/
  1260. X/*      FUNKTION  noctrlx()                           */
  1261. X/*  BESCHREIBUNG  Das QUIT-Zeichen wird "restauriert" ...           */
  1262. X/*     PARAMETER  keine                                                       */
  1263. X/*     RUECKGABE  keine                                                    */
  1264. X/***************************************************************************/
  1265. X
  1266. Xvoid noctrlx()
  1267. X{
  1268. X
  1269. X#ifdef _SYS7
  1270. X
  1271. X  ioctl(0, TIOCSETC, (struct sgttyb *) &oldtc);
  1272. X
  1273. X#else
  1274. X
  1275. X  ioctl(0, TCSETA, (struct termio *) &oldtc);
  1276. X
  1277. X#endif
  1278. X
  1279. X}
  1280. END_OF_FILE
  1281.   if test 2077 -ne `wc -c <'src/ctrlx.c'`; then
  1282.     echo shar: \"'src/ctrlx.c'\" unpacked with wrong size!
  1283.   fi
  1284.   # end of 'src/ctrlx.c'
  1285. fi
  1286. if test -f 'src/derror.c' -a "${1}" != "-c" ; then 
  1287.   echo shar: Will not clobber existing file \"'src/derror.c'\"
  1288. else
  1289.   echo shar: Extracting \"'src/derror.c'\" \(1740 characters\)
  1290.   sed "s/^X//" >'src/derror.c' <<'END_OF_FILE'
  1291. X/***************************************************************************/
  1292. X/*        PROGRAMM  ix/Mbox                           */
  1293. X/*             DATEI  dummy_nerror.c                       */
  1294. X/*        FUNKTIONEN  nerror                           */
  1295. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  1296. X/*  LETZTE AENDERUNG  16.11.1991                       */
  1297. X/***************************************************************************/
  1298. X
  1299. X#include <stdio.h>
  1300. X
  1301. X#include "defs.h"
  1302. X#include "mbox.msg"
  1303. X
  1304. X/***************************************************************************/
  1305. X/*      FUNKTION  nerror()                           */
  1306. X/*  BESCHREIBUNG  Zeigt Systemfehler (Dateien koennen nicht gefunden o.    */
  1307. X/*          geoeffnet werden, etc.) an. Anschliessend wie die        */
  1308. X/*          Befehlseingabe aufgerufen.                               */
  1309. X/*                                                               */
  1310. X/*          ACHTUNG: Nach "nerror()" laeuft die MBox zwar weiter,    */
  1311. X/*          aber beim Terminieren wird ein "core" ausgegeben.        */
  1312. X/*     PARAMETER  file     = Datei in der der Fehler aufgetreten ist       */
  1313. X/*          line     = Zeile in der Datei                            */
  1314. X/*          function = Funktion in der Datei                         */
  1315. X/*          descr    = Fehlerbeschreibung                               */
  1316. X/*          er       = Datei/Variable                                */
  1317. X/*     RUECKGABE  keine                            */
  1318. X/***************************************************************************/
  1319. X
  1320. Xvoid nerror(file, line, function, descr, er)
  1321. Xchar file[];
  1322. Xint line;
  1323. Xchar function[], descr[], er[];
  1324. X{
  1325. X  char s[80];
  1326. X
  1327. X  printf("%c%s %s (%s) - %s \"%s\"\n", CR, DER01_MSG, function, file, descr, er);
  1328. X
  1329. X  sprintf(s, "[%s] %s, %d\n***** %s, %s, %s ... %s !!!",
  1330. X    DER02_MSG, file, line, function, descr, er, DER03_MSG);
  1331. X  
  1332. X}
  1333. X
  1334. X
  1335. END_OF_FILE
  1336.   if test 1740 -ne `wc -c <'src/derror.c'`; then
  1337.     echo shar: \"'src/derror.c'\" unpacked with wrong size!
  1338.   fi
  1339.   # end of 'src/derror.c'
  1340. fi
  1341. if test -f 'src/faces.c' -a "${1}" != "-c" ; then 
  1342.   echo shar: Will not clobber existing file \"'src/faces.c'\"
  1343. else
  1344.   echo shar: Extracting \"'src/faces.c'\" \(3548 characters\)
  1345.   sed "s/^X//" >'src/faces.c' <<'END_OF_FILE'
  1346. X/***************************************************************************/
  1347. X/*        PROGRAMM  ix/Mbox                           */
  1348. X/*             DATEI  faces.c                           */
  1349. X/*        FUNKTIONEN  faces()                           */
  1350. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  1351. X/*  LETZTE AENDERUNG  08.06.1992                       */
  1352. X/***************************************************************************/
  1353. X
  1354. X#include <stdio.h>
  1355. X
  1356. X#include "mbox.h"
  1357. X
  1358. X/* There were plans to implement the X-Face: Headlines, but the resulting
  1359. X   overhead is much to big, to realize it! */
  1360. X
  1361. X
  1362. X#define a1    219
  1363. X#define a2    223
  1364. X#define a3    220
  1365. X#define a4    32
  1366. X
  1367. X#define b1    '8'
  1368. X#define b2    '9'
  1369. X#define b3    '6'
  1370. X#define b4    32
  1371. X
  1372. X
  1373. Xvoid faces( fname )
  1374. Xchar fname[];
  1375. X{
  1376. X  int x, y;
  1377. X  int x1, y1;
  1378. X  int Z1, Z2, Z3, Z4;
  1379. X  FILE *fp;
  1380. X  int c, i;
  1381. X  char s[STRING];
  1382. X  int tog = 0;
  1383. X  char t[STRING];
  1384. X
  1385. X
  1386. X
  1387. X  ansi("mr");
  1388. X  printf("[Bild des Autors ansehen?] G, A, %c, ? > ", GBL07_MSG);
  1389. X  ansi("me");
  1390. X  printf("G%c", BS);
  1391. X
  1392. X  do {
  1393. X    c = getint();
  1394. X    if (c >= 97) c -= 32;
  1395. X    if (c == ENTER) c = 'G';
  1396. X    if (c == '?') {
  1397. X        clearline();
  1398. X        ansi("mr");
  1399. X        printf("%c%s > ", CR, "Bild des Autors anzeigen als Grafik, Ascii-Bild oder lieber Nicht ?");
  1400. X        ansi("me");
  1401. X    }
  1402. X    if ((c != 'G') && (c != 'A') && (c != GBL07_MSG)) c = 0;
  1403. X  } while (c == 0);
  1404. X
  1405. X  printf("%c\n\n", c);
  1406. X
  1407. X  if (c == GBL07_MSG) return;
  1408. X
  1409. X  if(c == 'G'){
  1410. X    Z1 = a1;
  1411. X    Z2 = a2;
  1412. X    Z3 = a3;
  1413. X    Z4 = a4;
  1414. X  }
  1415. X  if(c == 'A'){
  1416. X    Z1 = b1;
  1417. X    Z2 = b2;
  1418. X    Z3 = b3;
  1419. X    Z4 = b4;
  1420. X  }
  1421. X
  1422. X  sprintf(s, "%s/etc/face.put", HOME);
  1423. X
  1424. X  fp = fopen( s, "r" );
  1425. X  
  1426. X  x1 = fgetc(fp); c = fgetc(fp);
  1427. X  y1 = fgetc(fp); c = fgetc(fp);
  1428. X
  1429. X  for(y = 0; y < y1; y++){
  1430. X    i = 0;
  1431. X    for(x = 0; x < x1; x += 8){
  1432. X        c = fgetc(fp);
  1433. X        if(tog == 0) s[i] = c;
  1434. X        else t[i] = c;
  1435. X        i++;
  1436. X    }
  1437. X    tog++;
  1438. X    if(tog == 2){
  1439. X        tog = 0;
  1440. X        i = (int) x/8;
  1441. X        for(x = 0; x < i; x ++){
  1442. X            if( (s[x] & 128) &&  (t[x] & 128)) printf("%c", Z1);
  1443. X            if( (s[x] & 128) && !(t[x] & 128)) printf("%c", Z2);
  1444. X            if(!(s[x] & 128) &&  (t[x] & 128)) printf("%c", Z3);
  1445. X            if(!(s[x] & 128) && !(t[x] & 128)) printf("%c", Z4);
  1446. X
  1447. X            if( (s[x] & 64) &&  (t[x] & 64)) printf("%c", Z1);
  1448. X            if( (s[x] & 64) && !(t[x] & 64)) printf("%c", Z2);
  1449. X            if(!(s[x] & 64) &&  (t[x] & 64)) printf("%c", Z3);
  1450. X            if(!(s[x] & 64) && !(t[x] & 64)) printf("%c", Z4);
  1451. X
  1452. X            if( (s[x] & 32) &&  (t[x] & 32)) printf("%c", Z1);
  1453. X            if( (s[x] & 32) && !(t[x] & 32)) printf("%c", Z2);
  1454. X            if(!(s[x] & 32) &&  (t[x] & 32)) printf("%c", Z3);
  1455. X            if(!(s[x] & 32) && !(t[x] & 32)) printf("%c", Z4);
  1456. X
  1457. X            if( (s[x] & 16) &&  (t[x] & 16)) printf("%c", Z1);
  1458. X            if( (s[x] & 16) && !(t[x] & 16)) printf("%c", Z2);
  1459. X            if(!(s[x] & 16) &&  (t[x] & 16)) printf("%c", Z3);
  1460. X            if(!(s[x] & 16) && !(t[x] & 16)) printf("%c", Z4);
  1461. X
  1462. X            if( (s[x] & 8) &&  (t[x] & 8)) printf("%c", Z1);
  1463. X            if( (s[x] & 8) && !(t[x] & 8)) printf("%c", Z2);
  1464. X            if(!(s[x] & 8) &&  (t[x] & 8)) printf("%c", Z3);
  1465. X            if(!(s[x] & 8) && !(t[x] & 8)) printf("%c", Z4);
  1466. X
  1467. X            if( (s[x] & 4) &&  (t[x] & 4)) printf("%c", Z1);
  1468. X            if( (s[x] & 4) && !(t[x] & 4)) printf("%c", Z2);
  1469. X            if(!(s[x] & 4) &&  (t[x] & 4)) printf("%c", Z3);
  1470. X            if(!(s[x] & 4) && !(t[x] & 4)) printf("%c", Z4);
  1471. X
  1472. X            if( (s[x] & 2) &&  (t[x] & 2)) printf("%c", Z1);
  1473. X            if( (s[x] & 2) && !(t[x] & 2)) printf("%c", Z2);
  1474. X            if(!(s[x] & 2) &&  (t[x] & 2)) printf("%c", Z3);
  1475. X            if(!(s[x] & 2) && !(t[x] & 2)) printf("%c", Z4);
  1476. X
  1477. X            if( (s[x] & 1) &&  (t[x] & 1)) printf("%c", Z1);
  1478. X            if( (s[x] & 1) && !(t[x] & 1)) printf("%c", Z2);
  1479. X            if(!(s[x] & 1) &&  (t[x] & 1)) printf("%c", Z3);
  1480. X            if(!(s[x] & 1) && !(t[x] & 1)) printf("%c", Z4);
  1481. X        }
  1482. X        printf("\n");
  1483. X    }
  1484. X  }
  1485. X  fclose(fp);
  1486. X
  1487. X  c = getint();
  1488. X}
  1489. X
  1490. X
  1491. X
  1492. END_OF_FILE
  1493.   if test 3548 -ne `wc -c <'src/faces.c'`; then
  1494.     echo shar: \"'src/faces.c'\" unpacked with wrong size!
  1495.   fi
  1496.   # end of 'src/faces.c'
  1497. fi
  1498. if test -f 'src/games.c' -a "${1}" != "-c" ; then 
  1499.   echo shar: Will not clobber existing file \"'src/games.c'\"
  1500. else
  1501.   echo shar: Extracting \"'src/games.c'\" \(1155 characters\)
  1502.   sed "s/^X//" >'src/games.c' <<'END_OF_FILE'
  1503. X/***************************************************************************/
  1504. X/*        PROGRAMM  ix/Mbox                           */
  1505. X/*             DATEI  games.c                           */
  1506. X/*        FUNKTIONEN  games()                           */
  1507. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  1508. X/*  LETZTE AENDERUNG  25.11.1991                       */
  1509. X/***************************************************************************/
  1510. X
  1511. X#include <stdio.h>
  1512. X#include "mbox.h"
  1513. X
  1514. X
  1515. Xgames()
  1516. X{
  1517. X  FILE *fp;
  1518. X  int i, c;
  1519. X
  1520. X  char s[STRING];
  1521. X  char GAME[MAX_GAMES][STRING];
  1522. X
  1523. X
  1524. X  headline( GA01_MSG );
  1525. X  printf("\n");
  1526. X
  1527. X  fp = fopen(GAMES, "r");
  1528. X  if (fp == NULL) {
  1529. X    nerror("games.c", 19, "games", "Datei-Lesefehler", GAMES);
  1530. X  }
  1531. X  i = 0;
  1532. X  while((fgets(s, 80, fp) != NULL) && (s[0] == '/'));
  1533. X  while((i < MAX_GAMES) && (fscanf(fp, "%s %s", s, GAME[i]) > 0)){
  1534. X    i++;
  1535. X    printf("  %d - %s\n\n", i, s); 
  1536. X  }
  1537. X  fclose(fp);
  1538. X
  1539. X  ansi("md");
  1540. X  printf("\n%s > ", GA02_MSG);
  1541. X  ansi("me");
  1542. X
  1543. X  c = getint();
  1544. X  if(c > 32) printf("%c", c);
  1545. X  c -= 49;
  1546. X
  1547. X  if((c >= 0) && (c < i)){
  1548. X    printf("\n\n");
  1549. X    sprintf(s, "%s %s %d %d", RSH, GAME[c], OLDUID, OLDGID);
  1550. X    system(s);    
  1551. X  }
  1552. X  else{
  1553. X    ansi("md");
  1554. X    printf(" %s\n", GA03_MSG);
  1555. X    ansi("me");
  1556. X  }
  1557. X}
  1558. X
  1559. END_OF_FILE
  1560.   if test 1155 -ne `wc -c <'src/games.c'`; then
  1561.     echo shar: \"'src/games.c'\" unpacked with wrong size!
  1562.   fi
  1563.   # end of 'src/games.c'
  1564. fi
  1565. if test -f 'src/getch.c' -a "${1}" != "-c" ; then 
  1566.   echo shar: Will not clobber existing file \"'src/getch.c'\"
  1567. else
  1568.   echo shar: Extracting \"'src/getch.c'\" \(1934 characters\)
  1569.   sed "s/^X//" >'src/getch.c' <<'END_OF_FILE'
  1570. X/*
  1571. X *    %Z% %M%    %I% %D% %Q%
  1572. X *
  1573. X *    Copyright (C) 1990 by Christian Schlichtherle
  1574. X *                  (chriss@attron.ruhr.sub.org)
  1575. X *
  1576. X *    %M% - C module for getch(S).
  1577. X *
  1578. X *    "getch" is a DOS and curses(S) like function which reads
  1579. X *    a character and returns immediately without waiting for
  1580. X *    newline.
  1581. X *
  1582. X *     getch() - Gets a character.
  1583. X *     This function gets one character and immediately returns
  1584. X *     without waiting for newline. The character is not echoed.
  1585. X *     This function can be used best when you want to input only one
  1586. X *     character within canonical input or if you need this function
  1587. X *     only very rarely.
  1588. X *     EOF is returned on errors or if an ignored signal occured.
  1589. X *    
  1590. X *    Modificated by andreas@xenox.w.open.de 06/20/92 Xenox
  1591. X */
  1592. X
  1593. X#include "defs.h"
  1594. X#include <sys/types.h>
  1595. X#include <stdio.h>    
  1596. X#include <errno.h>
  1597. X#ifndef _SYS7
  1598. X#include <sys/ioctl.h>
  1599. X#include <termio.h>
  1600. X#else
  1601. X#include <sgtty.h>
  1602. X#endif 
  1603. X
  1604. X#ifndef _SYS7
  1605. Xstatic struct termio    told, tnew;
  1606. X
  1607. X#define    get_oldmode()    ioctl(0,TCGETA, &told)
  1608. X#define    set_oldmode()    ioctl(0,TCSETA, &told)
  1609. X#define    set_newmode()    (tnew.c_cc[VMIN] = 1,tnew.c_cc[VTIME] = 0,\
  1610. X             tnew.c_lflag &= ~(ICANON | ECHO),\
  1611. X             ioctl(0, TCSETA, &tnew))
  1612. X
  1613. X#else
  1614. Xstatic struct sgttyb    told, tnew;
  1615. X
  1616. X#define    get_oldmode()    ioctl(0,TIOCGETP, &told)
  1617. X#define    set_oldmode()    ioctl(0,TIOCSETP, &told)
  1618. X#define    set_newmode()    (tnew.sg_flags |= RAW,tnew.sg_flags &= ~ECHO,\
  1619. X             ioctl(0, TIOCSETP, &tnew))
  1620. X
  1621. X#endif
  1622. X
  1623. Xint    getch()
  1624. X{
  1625. X    static int    set = 0;
  1626. X    int    rstat;
  1627. X    char    c;
  1628. X
  1629. X    if (!set) {
  1630. X            /* Get old terminal mode. */
  1631. X        if (get_oldmode() == -1)
  1632. X            return (EOF);
  1633. X
  1634. X        tnew = told;
  1635. X            /* Don't execute this part anymore. */
  1636. X        set = 1;
  1637. X    }
  1638. X
  1639. X        /* Set new terminal mode. */
  1640. X    if (set_newmode() == -1)
  1641. X        return (EOF);
  1642. X
  1643. X        /* 
  1644. X         * Read one character. The orginal function used 
  1645. X         * read(0, &c, 1) but getchar is a macro 
  1646. X         * and faster. Xenox Fri Jun 19 20:44:46 DST 1992
  1647. X         */
  1648. X    c = getchar();
  1649. X
  1650. X        set_oldmode();
  1651. X
  1652. X    return ((int)c);
  1653. X}
  1654. X
  1655. END_OF_FILE
  1656.   if test 1934 -ne `wc -c <'src/getch.c'`; then
  1657.     echo shar: \"'src/getch.c'\" unpacked with wrong size!
  1658.   fi
  1659.   # end of 'src/getch.c'
  1660. fi
  1661. if test -f 'src/help.c' -a "${1}" != "-c" ; then 
  1662.   echo shar: Will not clobber existing file \"'src/help.c'\"
  1663. else
  1664.   echo shar: Extracting \"'src/help.c'\" \(2401 characters\)
  1665.   sed "s/^X//" >'src/help.c' <<'END_OF_FILE'
  1666. X/***************************************************************************/
  1667. X/*        PROGRAMM  ix/Mbox                           */
  1668. X/*             DATEI  help.c                           */
  1669. X/*        FUNKTIONEN  help()                           */
  1670. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  1671. X/*  LETZTE AENDERUNG  16.11.1991                       */
  1672. X/***************************************************************************/
  1673. X
  1674. X#include <stdio.h>
  1675. X
  1676. X#include "mbox.h"
  1677. X
  1678. X
  1679. X/***************************************************************************/
  1680. X/*      FUNKTION  help()                            */
  1681. X/*  BESCHREIBUNG  Der Inhalt der Datei HILFE wird entweder komplett ange-  */
  1682. X/*          zeigt, oder aber in Abhaengigkeit von 'cmd' in Auszuegen */
  1683. X/*          ausgegeben.                                              */
  1684. X/*     PARAMETER  cmd  =  '*'      =  HILFE wird komplett ausgegeben       */
  1685. X/*                        '='      =  SHORTHELP                            */
  1686. X/*          #Befehl         =  HILFE zu "Befehl" wird ausgegeben    */
  1687. X/*     RUECKGABE  0  =  Keinen Eintrag gefunden                            */
  1688. X/*                n  =  Anzahl der Eintraege                   */
  1689. X/***************************************************************************/
  1690. X
  1691. Xint help(cmd)
  1692. Xchar cmd[];
  1693. X{
  1694. X  FILE *fp;
  1695. X  char s[255];
  1696. X  int ende = 0, ok = 0, found = 0, toggle = 0, lines = 0;
  1697. X
  1698. X  show(KURZHILFE, 99, 99); /* RESET */
  1699. X  
  1700. X  if(cmd[0] == '='){
  1701. X    headline( HLP01_MSG );
  1702. X    show(KURZHILFE, 9999, USER.more);    
  1703. X    return 9999;
  1704. X  }
  1705. X
  1706. X  maybe_locked(HILFE, "r");
  1707. X  fp = fopen(HILFE, "r");
  1708. X  if (fp == NULL) {
  1709. X    nerror("help.c", 14, "help", "Datei-Lesefehler", HILFE);
  1710. X  }
  1711. X  if (cmd[0] != '#') {
  1712. X    ok = 2;
  1713. X    found++;
  1714. X  }
  1715. X  headline( HLP01_MSG );
  1716. X  lines = 0;
  1717. X
  1718. X  while ((fgets(s, 85, fp) != NULL) && !ende) {
  1719. X
  1720. X    if (USER.more > 0) {
  1721. X        if (lines >= MAX_SCR_LINES) {
  1722. X            lines = 0;
  1723. X            if (more() != 0) return 1;
  1724. X        }
  1725. X    }
  1726. X    if (ok == 2) {
  1727. X        if (s[0] != '#') {
  1728. X            printf("%s", s);
  1729. X            lines++;
  1730. X            if (toggle > 0) {
  1731. X                ansi("me");
  1732. X                toggle = 0;
  1733. X            }
  1734. X        }
  1735. X        else {
  1736. X            printf("\n");
  1737. X            lines++;
  1738. X            ansi("md");
  1739. X            toggle++;
  1740. X        }
  1741. X    }
  1742. X    else {
  1743. X        if ((ok == 1) && (s[0] == '#')) {
  1744. X            ok = 0;
  1745. X            printf("\n");
  1746. X            lines++;
  1747. X        }
  1748. X        if ((ok == 1) && (s[0] != '#')) {
  1749. X            printf("%s", s);
  1750. X            lines++;
  1751. X            if (toggle > 0) {
  1752. X                ansi("me");
  1753. X                toggle == 0;
  1754. X            }
  1755. X        }
  1756. X        if ((ok == 0) && (s[0] == '#')) {
  1757. X            if (strcomp(cmd, s) == 0) {
  1758. X                ok = 1;
  1759. X                found++;
  1760. X                ansi("md");
  1761. X                toggle++;
  1762. X            }
  1763. X        }
  1764. X    }
  1765. X  }
  1766. X  fclose(fp);
  1767. X
  1768. X  return found;
  1769. X}
  1770. END_OF_FILE
  1771.   if test 2401 -ne `wc -c <'src/help.c'`; then
  1772.     echo shar: \"'src/help.c'\" unpacked with wrong size!
  1773.   fi
  1774.   # end of 'src/help.c'
  1775. fi
  1776. if test -f 'src/nerror.c' -a "${1}" != "-c" ; then 
  1777.   echo shar: Will not clobber existing file \"'src/nerror.c'\"
  1778. else
  1779.   echo shar: Extracting \"'src/nerror.c'\" \(1859 characters\)
  1780.   sed "s/^X//" >'src/nerror.c' <<'END_OF_FILE'
  1781. X/***************************************************************************/
  1782. X/*        PROGRAMM  ix/Mbox                           */
  1783. X/*             DATEI  nerror.c                           */
  1784. X/*        FUNKTIONEN  nerror                           */
  1785. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  1786. X/*  LETZTE AENDERUNG  16.11.1991                       */
  1787. X/***************************************************************************/
  1788. X
  1789. X#include <stdio.h>
  1790. X#include <setjmp.h>
  1791. X
  1792. X#include "mbox.h"
  1793. X
  1794. X
  1795. Xextern jmp_buf jmpenv;
  1796. X
  1797. X
  1798. X/***************************************************************************/
  1799. X/*      FUNKTION  nerror()                           */
  1800. X/*  BESCHREIBUNG  Zeigt Systemfehler (Dateien koennen nicht gefunden o.    */
  1801. X/*          geoeffnet werden, etc.) an. Anschliessend wird die       */
  1802. X/*          Befehlseingabe aufgerufen.                               */
  1803. X/*                                                               */
  1804. X/*          ACHTUNG: Nach "nerror()" laeuft die MBox zwar weiter,    */
  1805. X/*          aber beim Terminieren wird ein "core" ausgegeben.        */
  1806. X/*     PARAMETER  file     = Datei in der der Fehler aufgetreten ist       */
  1807. X/*          line     = Zeile in der Datei                            */
  1808. X/*          function = Funktion in der Datei                         */
  1809. X/*          descr    = Fehlerbeschreibung                               */
  1810. X/*          er       = Datei/Variable                                */
  1811. X/*     RUECKGABE  keine                            */
  1812. X/***************************************************************************/
  1813. X
  1814. Xvoid nerror(file, line, function, descr, er)
  1815. Xchar file[];
  1816. Xint line;
  1817. Xchar function[], descr[], er[];
  1818. X{
  1819. X  char s[80];
  1820. X
  1821. X  ansi("md");
  1822. X  printf("%c%s ", CR, NER01_MSG);
  1823. X  ansi("me");
  1824. X
  1825. X  printf("%s (%s) - %s \"%s\"\n", function, file, descr, er);
  1826. X
  1827. X  sprintf(s, "[%s] %s, %d\n***** %s, %s, %s ... %s !!!",
  1828. X    NER02_MSG, file, line, function, descr, er, NER03_MSG);
  1829. X
  1830. X  control(s, 99);
  1831. X  control(s, 3);
  1832. X
  1833. X  longjmp(jmpenv, 1);
  1834. X}
  1835. X
  1836. END_OF_FILE
  1837.   if test 1859 -ne `wc -c <'src/nerror.c'`; then
  1838.     echo shar: \"'src/nerror.c'\" unpacked with wrong size!
  1839.   fi
  1840.   # end of 'src/nerror.c'
  1841. fi
  1842. if test -f 'src/outdial.c' -a "${1}" != "-c" ; then 
  1843.   echo shar: Will not clobber existing file \"'src/outdial.c'\"
  1844. else
  1845.   echo shar: Extracting \"'src/outdial.c'\" \(991 characters\)
  1846.   sed "s/^X//" >'src/outdial.c' <<'END_OF_FILE'
  1847. X/***************************************************************************/
  1848. X/*        PROGRAMM  ix/Mbox                           */
  1849. X/*             DATEI  outdial.c                           */
  1850. X/*        FUNKTIONEN  outdial()                           */
  1851. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  1852. X/*  LETZTE AENDERUNG  02.04.1992                       */
  1853. X/***************************************************************************/
  1854. X
  1855. X#include <stdio.h>
  1856. X
  1857. X#include "mbox.h"
  1858. X
  1859. X
  1860. Xvoid outdial()
  1861. X{
  1862. X  FILE *fp;
  1863. X  
  1864. X  char s[STRING];
  1865. X  char t[STRING];
  1866. X  int a, b;
  1867. X
  1868. X  
  1869. X  fp = fopen( "/tmp/door", "w" );
  1870. X  fprintf(fp, "%s\n%s\n%d\n%d\n", 
  1871. X      USER.name, USER.account, USER.id, USER.terminal);
  1872. X  fclose(fp);
  1873. X
  1874. X  printf("\n\n");
  1875. X
  1876. X  system( "outdial" );
  1877. X
  1878. X  fp = fopen( "/tmp/acct", "r" );
  1879. X  if(fp != NULL){
  1880. X     fgets(s, 80, fp);    
  1881. X     fclose(fp);
  1882. X     unlink( "/tmp/acct" );
  1883. X  }
  1884. X  strcpy(t, (char *) strcopy(USER.account, 11, 16));
  1885. X  a = atoi(t);
  1886. X  b = atoi(s);
  1887. X  a -= b;
  1888. X
  1889. X  USER.account[11] = '\0';
  1890. X  sprintf(s, "%d", a);
  1891. X  strcat(USER.account, s);
  1892. X}
  1893. X
  1894. END_OF_FILE
  1895.   if test 991 -ne `wc -c <'src/outdial.c'`; then
  1896.     echo shar: \"'src/outdial.c'\" unpacked with wrong size!
  1897.   fi
  1898.   # end of 'src/outdial.c'
  1899. fi
  1900. if test -f 'src/weiterl.c' -a "${1}" != "-c" ; then 
  1901.   echo shar: Will not clobber existing file \"'src/weiterl.c'\"
  1902. else
  1903.   echo shar: Extracting \"'src/weiterl.c'\" \(3587 characters\)
  1904.   sed "s/^X//" >'src/weiterl.c' <<'END_OF_FILE'
  1905. X/***************************************************************************/
  1906. X/*        PROGRAMM  ix/Mbox                           */
  1907. X/*             DATEI  weiterleiten.c                       */
  1908. X/*        FUNKTIONEN  weiterleiten(), carboncopy()               */
  1909. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  1910. X/*  LETZTE AENDERUNG  05.01.1992                       */
  1911. X/***************************************************************************/
  1912. X
  1913. X#include <stdio.h>
  1914. X
  1915. X#include "mbox.h"
  1916. X
  1917. X
  1918. X/***************************************************************************/
  1919. X/*      FUNKTION  weiterleiten()                       */
  1920. X/*  BESCHREIBUNG  Je nach Parameter wird entweder ein Artikel an einen     */
  1921. X/*          User weitergeleitet, oder aber die letzte PM nochmal     */
  1922. X/*          mit einer anderen Adresse verschickt.                    */
  1923. X/*     PARAMETER  arg = Nummer des Artikel, Empfaenger, etc.               */
  1924. X/*     RUECKGABE  keine                                                    */
  1925. X/***************************************************************************/
  1926. X
  1927. Xvoid weiterleiten( arg )
  1928. Xchar arg[];
  1929. X{
  1930. X  FILE *fp;
  1931. X  char s[STRING];
  1932. X  char t[STRING];
  1933. X  char subject[STRING];
  1934. X  int i, a, num;
  1935. X  char empf[STRING];
  1936. X
  1937. X  subject[0] = '\0';
  1938. X
  1939. X  sprintf(s, "%s/usr/%d/.lastsubject", HOME, USER.id);
  1940. X  fp = fopen( s, "r" );
  1941. X  if(fp != NULL){
  1942. X    fgets(subject, 80, fp);
  1943. X    fclose(fp);
  1944. X  }
  1945. X
  1946. X  if((subject[0] == '\0') && ((arg[0] > 64) || (arg[0] == '?'))){
  1947. X    ansi("md");
  1948. X    printf(" %s\n", WEI01_MSG);
  1949. X    ansi("me");
  1950. X    return;
  1951. X  }
  1952. X
  1953. X  if(arg[0] == '\0'){
  1954. X    printf("\n\n%s\n\n", WEI02_MSG);
  1955. X    ansi("md");
  1956. X    printf("%s %s\n\n", WEI03_MSG, subject);
  1957. X    ansi("me");
  1958. X    return;
  1959. X  }
  1960. X
  1961. X  num = 0;
  1962. X
  1963. X  if(arg[0] < 65){
  1964. X    i = 0;
  1965. X    while((arg[i] > 32) && (arg[i] != '\0')) i++;
  1966. X    strcpy(s, (char *) strcopy(arg, 0, (i-1)));
  1967. X    num = atoi(s);
  1968. X    strcpy(empf, (char *) strcopy(arg, (i+1), length(arg)));
  1969. X    strcat(empf, "$");
  1970. X  }
  1971. X  else{
  1972. X    sprintf(empf, "%s$", arg);
  1973. X  }  
  1974. X
  1975. X  if(num != 0){
  1976. X    if(strcomp(BRETT, "PM") != 0){
  1977. X        sprintf(t, "%s/%d", BRETT, num);
  1978. X        sprintf(s, "cp %s/%d %s/usr/%d/.lastletter", BRETT, num, HOME, USER.id);
  1979. X    }
  1980. X    else{
  1981. X        sprintf(t, "%s/usr/%d/%d", HOME, USER.id, num);
  1982. X        sprintf(s, "cp %s/usr/%d/%d %s/usr/%d/.lastletter", HOME, USER.id, num, HOME, USER.id);
  1983. X    }
  1984. X    fp = fopen( t, "r" );
  1985. X    if(fp == NULL){
  1986. X        ansi("md");
  1987. X        printf(" %s\n", WEI04_MSG);
  1988. X        ansi("me");
  1989. X    return;
  1990. X    }
  1991. X    fclose(fp);
  1992. X    system(s);
  1993. X    sprintf(s, "%s/usr/%d/.lastletter", HOME, USER.id);
  1994. X
  1995. X    sprintf(s, "%s/usr/%d/.lastsubject", HOME, USER.id);
  1996. X    fp = fopen( s, "w" );
  1997. X    if(fp == NULL){
  1998. X        nerror("weiterl.c", 76, "weiterleiten", "Datei_Schreibfehler", s);
  1999. X    }
  2000. X    fprintf(fp, "%d <%s>", num, NG);
  2001. X    fclose(fp);
  2002. X  }
  2003. X
  2004. X  brief(empf);
  2005. X}
  2006. X
  2007. X
  2008. X/***************************************************************************/
  2009. X/*      FUNKTION  carboncopy()                           */
  2010. X/*  BESCHREIBUNG  Kopien einer MAIL an mehrer Empfaenger versenden       */
  2011. X/*     PARAMETER  cc  = Empfaenger einer Kopie (im Header sichtbar)       */
  2012. X/*          bcc = Empfaenger einer Kopie (im Header unsichtbar)       */
  2013. X/*     RUECKGABE  keine                                                    */
  2014. X/***************************************************************************/
  2015. X
  2016. Xvoid carboncopy( cc, bcc )
  2017. Xchar cc[], bcc[];
  2018. X{
  2019. X  char ex[LONGSTRING];
  2020. X  char ef[LONGSTRING];
  2021. X  char s[STRING];
  2022. X
  2023. X  int a = 0, i = 0;
  2024. X  int ok = 0;
  2025. X
  2026. X  printf("\n");
  2027. X
  2028. X  sprintf(ex, "%s,%s ", (char *) stripped(cc), bcc);
  2029. X
  2030. X  if(ex[0] == '\0') return;
  2031. X
  2032. X  while(ok == 0){
  2033. X    while((ex[i] != ',') && (ex[i] != '\0')) i++;
  2034. X
  2035. X    if(ex[i] == '\0') ok++;
  2036. X
  2037. X    strcpy(ef, (char *) bigcopy(ex, a, (i-1)));
  2038. X    strcpy(s, (char *) stripped(ef));
  2039. X
  2040. X    if(strlen(s) > 1){
  2041. X        weiterleiten( s );
  2042. X    }
  2043. X    a = i + 1;
  2044. X    i++;
  2045. X  }
  2046. X  
  2047. X}
  2048. END_OF_FILE
  2049.   if test 3587 -ne `wc -c <'src/weiterl.c'`; then
  2050.     echo shar: \"'src/weiterl.c'\" unpacked with wrong size!
  2051.   fi
  2052.   # end of 'src/weiterl.c'
  2053. fi
  2054. echo shar: End of archive 10 \(of 11\).
  2055. cp /dev/null ark10isdone
  2056. MISSING=""
  2057. for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
  2058.     if test ! -f ark${I}isdone ; then
  2059.     MISSING="${MISSING} ${I}"
  2060.     fi
  2061. done
  2062. if test "${MISSING}" = "" ; then
  2063.     echo You have unpacked all 11 archives.
  2064.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2065. else
  2066.     echo You still must unpack the following archives:
  2067.     echo "        " ${MISSING}
  2068. fi
  2069. exit 0
  2070. exit 0 # Just in case...
  2071.