home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume35 / mbox / part11 < prev    next >
Encoding:
Text File  |  1993-02-04  |  54.2 KB  |  1,970 lines

  1. Newsgroups: comp.sources.misc
  2. From: Volker.Schuermann@unnet.w.open.de (Volker Schuermann)
  3. Subject: v35i046:  mbox - ix/Mbox, A BBS for UNIX and MINIX v1.6 PL10j7, Part11/15
  4. Message-ID: <1993Feb5.185856.10639@sparky.imd.sterling.com>
  5. X-Md4-Signature: f38ad296a1b668ac13fbf0c49c1a8e17
  6. Date: Fri, 5 Feb 1993 18:58:56 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Volker.Schuermann@unnet.w.open.de (Volker Schuermann)
  10. Posting-number: Volume 35, Issue 46
  11. Archive-name: mbox/part11
  12. Environment: MINIX, ISC, ESIX, SVR3
  13. Supersedes: mbox: Volume 31, Issue 16-27
  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. # Contents:  Changelog etc/english.hilfe src/games.c src/lesen.c
  20. #   src/postfach.c wendy/getline.c
  21. # Wrapped by kent@sparky on Fri Feb  5 12:18:14 1993
  22. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  23. echo If this archive is complete, you will see the following message:
  24. echo '          "shar: End of archive 11 (of 15)."'
  25. if test -f 'Changelog' -a "${1}" != "-c" ; then 
  26.   echo shar: Will not clobber existing file \"'Changelog'\"
  27. else
  28.   echo shar: Extracting \"'Changelog'\" \(10716 characters\)
  29.   sed "s/^X//" >'Changelog' <<'END_OF_FILE'
  30. X
  31. XHeute, nach einem Telefonat mit Volker haben wir beschlossen die Versionen
  32. Xder ix/MBox mal auf einen Gleichstand zu bringen.
  33. X
  34. XDa inzwischen mehrere Leute an der Box programmieren, verliert man leicht
  35. Xden Ueberblick, wenn nicht von einem definierten Stand der Version ausge-
  36. Xgangen wird.
  37. X
  38. XDie Version 1.6.0 soll deshalb die Version sein, auf die sich alle nach-
  39. Xfolgenden Aenderungen beziehen!
  40. X
  41. XAlso wenn Aenderungen gemacht werden, diff's erzeugen und Volker schicken.
  42. XDabei sollte man die Angabe der Version (ab Version 1.6.0) und Patchlevel
  43. Xnicht vergessen, auf die sich das Diff bezieht!
  44. X
  45. XUm Aenderungen nachvollziehen zu koennen, waehre meine Bitte, an dieses
  46. XFile kurze Erlaeuterungen zu den Aenderungen anzuhaengen!
  47. X
  48. X---------------------------------------------------------------------------
  49. X
  50. XSat Nov 16 02:21:20 MEZ 1991, Hergo Pape <hergo@ivcmd.Boerde.DE>
  51. X
  52. Xix/MBox 1.6 PL1::
  53. X
  54. X-  File patchlevel.h eingefuert, hier sind die Version, der Autor und
  55. X   die aktuelle Patchlevel definiert. Das File wird in mbox.h eingelesen.
  56. X
  57. X-  Makefile geaendert, "bled" braucht nicht mehr extra uebersetzt werden.
  58. X   Die Variable MBOXHOME eingefuehrt, daher man kann jetzt die Sourcen
  59. X   irgendwo uebersetzen und installiert wird in MBOXHOME. Ist meiner Meinung
  60. X   nach guenstiger fuer die Versionskontrolle.
  61. X
  62. X-  In nerror() den Aufruf der Funktion loop() gegen longjmp() ausgetauscht.
  63. X   Zumindest unter ISC gibt es jetzt kein core mehr beim verlassen der Box.
  64. X
  65. X-  In mb-daemon.c gibt die Finktion scan() nur char zurueck! Geaendert auf
  66. X   char *scan(), da ein String zurueckgegeben wird.
  67. X
  68. X-  In bled.c, HILFE wird jetzt im Makefile definiert.
  69. X
  70. X-  File portinfo.c, bei ps musz leider anstatt "ps a", "ps -a" angegeben
  71. X   werden. Kann jetzt per #define in mbox.h definiert werden.
  72. X   Wenn ich <defunkt> Prozesse habe, geht das aber auch noch nicht richtig.
  73. X
  74. X-  If's auf File-Zeiger von 0 nach NULL geaendert. Ich hoffe ich habe alle
  75. X   gefunden.
  76. X
  77. X---------------------------------------------------------------------------
  78. X
  79. XSun Nov 17 09:02:12 CET 1991, Volker Schuermann <volkers@unnet.w.open.de>
  80. X
  81. Xix/MBox 1.6 PL1::
  82. X
  83. X-  Fataler Fehler im File xmd.c gefunden und behoben. 
  84. X   (Das Uebliche: "=" oder "==", dass ist hier die Frage ...)
  85. X
  86. X-  Ausgabe im Modus "Seitenweise ausgeben, Seitende markieren" komplett
  87. X   ueberarbeitet. Diese Aenderung bezieht sich auf show.c, portinfo.c,
  88. X   tools.c, misc2.c, misc.c und lesen2.c.
  89. X
  90. X-  Hergo's Makefile fast komplett uebernommen - leider ist MINIXens
  91. X   MAKE etwas umstaendlicher, desshalb musste 'ne kleinere Aenderung
  92. X   gemacht werden.
  93. X
  94. X-  Die Geschichte mit "ps -a" wird generell so gefahren, denn auch
  95. X   MINIX kennt diese Flagge. 
  96. X
  97. X---------------------------------------------------------------------------
  98. X
  99. XWed Nov 20 17:02:12 CET 1991, Volker Schuermann <volkers@unnet.w.open.de>
  100. X
  101. Xix/MBox 1.6 PL2::
  102. X
  103. X-  Im Makefile gab's noch ein paar Unstimmigkeiten .... jetzt gibt's
  104. X   ein paar weniger :-)
  105. X
  106. X-  Fuer den Fall das die Datei UDBASE (siehe mbox.h) nicht existiert,
  107. X   richtet die MBox automagisch eine Userdatenbank ein, die den 
  108. X   Definitionen in mbox.h angepasst wird.
  109. X
  110. X-  In admin.c war eine Forward Deklaration nicht zulaessig.
  111. X
  112. X-  Die SYSV-Version hatte den "nnpost" nicht im Griff. Dieses Problem
  113. X   ist jetzt behoben - allerdings werden Subject, Keywords und Summary
  114. X   mit "No xxxx." gefuellt wenn sie nicht definiert vom User definiert
  115. X   wurden.
  116. X
  117. X---------------------------------------------------------------------------
  118. X
  119. XSat Nov 23 16:22:24 MEZ 1991, Hergo Pape <hergo@ivcmd.Boerde.DE>
  120. X
  121. Xix/MBox 1.6 PL3::
  122. X
  123. X -  In coreleft.c noch ein "#include <malloc.h> eingefuegt, sonst kommt
  124. X    bei malloc() ein Warning.
  125. X -  Im Makefile ist weiterl.c angegeben! habe das File weiterleiten.c
  126. X    entsprechend umbenannt.
  127. X -  Unter ISC gibt es keine Funktion "chgrp()", das wird wie bei SYS7
  128. X    mit chown() gemacht. 
  129. X -  In bled.c wurde HILFE nochmal definiert! Habe #ifndef Klammer drum
  130. X    gesetzt.
  131. X -  In xmd.c fehlt in der Funktion main(), ganz hinten eine Klammer '}'!.
  132. X
  133. X---------------------------------------------------------------------------
  134. X
  135. XSun Nov 24 11:15:43 CET 1991, Volker Schuermann <volkers@unnet.w.open.de>
  136. X
  137. Xix/MBox 1.6 PL3::
  138. X
  139. X -  Die Flagge -D_ISC sorgt dafuer, dass auch unter Interactive UNIX
  140. X    der System Call "chown" statt "chown"&"chgrp" eingesetzt wird.
  141. X
  142. X -  Die Flagge -D_DATESTAMP gibt auf der Console (oder auf was immer
  143. X    gerade per REDIRECT umgeleitet wird) zusaetlich zu den alten MBox-
  144. X    Informatione auch Datum und Uhrzeit aus.
  145. X
  146. X---------------------------------------------------------------------------
  147. X
  148. XWed Dec 4 19:41:02 CET 1991, Volker Schuermann <volkers@unnet.w.open.de>
  149. X
  150. Xix/MBox 1.6 PL4::
  151. X
  152. X -  Die Flagge -D_SCO entspricht fast komplett -D_ISC. Allerdings wird
  153. X    die Definition der ENTER Taste bei -D_SCO zusaetzlich beeinflusst
  154. X    (ENTER = 13).
  155. X
  156. X -  Im Makefile fehlte bei PROGS die Angabe "xmd" ("mb-daemon" war doppelt
  157. X    aufgefuehrt.
  158. X
  159. X -  Die Umbenennung von "weiterleiten.c" auf "weiterl.c" bleibt auch
  160. X    weiterhin den Installateuren ueberlassen :-)
  161. X
  162. X
  163. X---------------------------------------------------------------------------
  164. X
  165. XSun Dec 8 19:41:02 CET 1991, Volker Schuermann <volkers@unnet.w.open.de>
  166. X
  167. Xix/MBox 1.6 PL4::
  168. X
  169. X -  Da die MBox ab sofort komplett auf RMAIL und INEWS aufsetzt, gibt's
  170. X    ein paar GROESSERE Aenderungen:
  171. X
  172. X    Die Modi SYS_ACCOUNT und HDB_UUCP wurden komplett deaktiviert.
  173. X
  174. X    Die Kommunikation mit RMAIL, INEWS und SMAIL (?) laeuft ueber drei
  175. X    Shell-Scripts: $MBOXHOME/etc/rmail.sh, ~/etc/inews.sh und ~/etc/alias.sh
  176. X
  177. X -  Bisher habe ich es nicht fertig gebracht auf SETUID "root" zu verzichten.    
  178. X    Auch nach der Umstellung auf RMAIL/INEWS laufen MB-DAEMON und MBOX
  179. X    nur mit "root"-Permissions fehlerfrei.
  180. X
  181. X---------------------------------------------------------------------------
  182. X
  183. XSat Dec 28 18:11:41 CET 1991, Volker Schuermann <volkers@unnet.w.open.de>
  184. X
  185. Xix/MBox 1.6e PL5::
  186. X    
  187. X -  Alle Text-Zeilen im Source-Code der ix/MBox wurden entfernt und durch
  188. X    #DEFINES ersetzt. Diese Defines koennen ueber das "Language-File"
  189. X    [mbox.msg] belegt werde.
  190. X
  191. X -  Die Dateien [help.befehle], [help.hilfe] und [help.shorthelp] liegen
  192. X    in englischen Versionen vor. Das gilt auch fuer die Dokumentation.
  193. X
  194. X -  Verschiedene Fehler in "lesen2.c" und "admin.c" wurden behoben. Ausserdem
  195. X    wird neue Post auch direkt beim Anmelden angekuendigt. 
  196. X
  197. X
  198. X---------------------------------------------------------------------------
  199. X
  200. XWed Jan 1 11:11:11 CET 1992, Volker Schuermann <volkers@unnet.w.open.de>
  201. X
  202. Xix/MBox 1.6 PL6::
  203. X
  204. X -  Probleme mit "ifdef XXX || XXX" in [defs.h] und [getline.c] geloest.
  205. X
  206. X -  Der XMD wertet nur noch das erste Auftreten von "From:" und "Subject:"
  207. X    aus. Bei "From" (aus dem Envelope) gibt's 'ne Sonderregelung. 
  208. X
  209. X---------------------------------------------------------------------------
  210. X
  211. XWed Jan 4 22:31:51 CET 1992, Volker Schuermann <volkers@unnet.w.open.de>
  212. X
  213. Xix/MBox 1.6 PL6::
  214. X
  215. X -  Befehl "Suchen" testweise implementiert. Er setzt auf GREP auf.
  216. X
  217. X -  Die Header von MAIL und NEWS koennen editiert werden. "Followup" und
  218. X    "Poster" werden erkannt und ausgewertet.
  219. X
  220. X---------------------------------------------------------------------------
  221. X
  222. XTue Feb 17 21:02:32 CET 1992, Volker Schuermann <volkers@unnet.w.open.DE>
  223. X
  224. Xix/MBox 1.6 PL8.7::
  225. X
  226. X -  Befehl "User" erweitert: Informationen ueber lokale User aus der
  227. X    Userdatenbank, oder per "uux" von anderen Sites.
  228. X
  229. X -  Sicherheitslecks in "postfach.c" und "admin.c" gefunden und entschaerft.
  230. X
  231. X -  Header werden generell <intensive> ausgegeben.
  232. X
  233. X -  Funktion "Download" bietet die Option mehrer Dateien mit einem
  234. X    Kommando zu uebertragen.
  235. X
  236. X -  Funktion "Statistik #" zeigt zusaetlich die Ausnutzung der Baudrate
  237. X    in Prozent an.
  238. X
  239. X -  Befehl "Statistik %" errechnet eine HITLISTE aus der Liste der
  240. X    Downloads.
  241. X
  242. X -  Erfassung in "postfach.c" und "admin.c" erlaubt keine Sonderzeichen
  243. X    in Name, Nick/Alias und Shell-Name.
  244. X
  245. X -  XMD verfuegt ueber eine XMD.ALIAS-Datei, in der Empfaenger-Adressen
  246. X    lokal umgeleitet werden koennen.
  247. X
  248. X -  Das Makefile wurde ERHEBLICH verbessert!
  249. X
  250. X -  Die INDEX-Files muessen nicht mehr global fuer alle Gruppen im
  251. X    voraus gebildet werden, sondern koennen auch online von der MBox
  252. X    gruppenweise erstellt werden.
  253. X
  254. X---------------------------------------------------------------------------
  255. X
  256. XFri May 28 19:53:21 CET 1992, Volker Schuermann <volkers@unnet.w.open.DE>
  257. X
  258. Xix/MBox 1.6 PL10::
  259. X
  260. X -  MB-DAEMON wurde erheblich verbessert, was zu einem Geschwindigkeits-
  261. X    vorteil von bis zu 200% fuehrt
  262. X
  263. X -  RTF (Richtext Format) und 'Quoted-Printable' sind jetzt fuer alle
  264. X    MBox-User lesbar
  265. X
  266. X -  Erste Schritte ich Richtung MultiMedia-Mail sind implementiert 
  267. X
  268. X -  Neue Befehle: EDIT, DOWNLOAD
  269. X
  270. X -  Es wurde ein Accouting-Mechanismus eingefuehrt, der levelabhaengig
  271. X    greift - dadurch laesst sich eine Trennung von zahlenden und nicht-
  272. X    zahlenden Usern herstellen
  273. X
  274. X---------------------------------------------------------------------------
  275. X
  276. XSat Jun 6 14:11:01 CET 1992, Volker Schuermann <volkers@unnet.w.open.DE>
  277. X
  278. Xix/MBox 1.6 PL10a::
  279. X
  280. X -  Der Befehl "BRETT !" wurde erweitert: Er zeigt jetzt neben dem
  281. X    Namen eines Brettes auch den entsprechenden Informationstext an
  282. X
  283. X -  Es gibt jetzt eine Moeglichkeit externe Kommandos direkt in die
  284. X    Befehls-Struktur der MBox einzubinden
  285. X
  286. X---------------------------------------------------------------------------
  287. X
  288. XWed Nov 25 24:00:00 CET 1992, Volker Schuermann <volkers@unnet.w.open.DE>
  289. X
  290. Xix/MBox 1.6 PL10j2::
  291. X
  292. X -  Umlaute werden nach ISO-8859-1 und IBM konvertiert. Natuerlich ist
  293. X    eine Umsetztung nach 'ae', 'oe', ... moeglich.
  294. X
  295. X -  RTF-Preview wurde entsfernt. Stattdessen gibt's einen neuen Fullscreen-
  296. X    Editor, der RTF-tauglich ist.
  297. X
  298. X -  Der Befehl "STATISTIK >" zeigt die Aktivitaeten von XMD an.
  299. X
  300. X -  Der Befehl "DISKUSSION" listet die Artikel/Gruppen, die ein User
  301. X    gesendet hat.
  302. X
  303. X -  XMD laesst sich als Gateway konfigurieren: "name%node@mailbox" ...
  304. X
  305. X -  Der Befehl "LOESCHEN >" entfernt alle 'Antworten', die sich im
  306. X    privaten Postfach befinden.
  307. X
  308. X---------------------------------------------------------------------------
  309. X
  310. XSun Jan 16 15:53:03 CET 1993, Volker Schuermann <volkers@unnet.w.open.DE>
  311. X
  312. Xix/MBox 1.6 PL10j7::
  313. X
  314. X -  Weiterer Terminaltyp COLOR-ANSI implementiert.
  315. X    
  316. X -  Der Befehl "USER" wurde um die Flagge "%" erweitert. Dieser Befehl
  317. X    zeigt die Userliste mit den NEWSGROUPS an.
  318. X
  319. X -  Die Headerzeile "Return-Receipt-To:" wird sowohl beim Senden als
  320. X    auch beim Empfangen von Mails unterstuetzt. 
  321. X
  322. X -  Wenn ein neues Postfach eingerichtet wird, geht automatisch eine
  323. X    Info-Mail an den Sysop.
  324. X
  325. X -  Die aktuelle Version wird am 17.01.1993 an "comp.sources.misc"
  326. X    verschickt.
  327. X
  328. END_OF_FILE
  329.   if test 10716 -ne `wc -c <'Changelog'`; then
  330.     echo shar: \"'Changelog'\" unpacked with wrong size!
  331.   fi
  332.   # end of 'Changelog'
  333. fi
  334. if test -f 'etc/english.hilfe' -a "${1}" != "-c" ; then 
  335.   echo shar: Will not clobber existing file \"'etc/english.hilfe'\"
  336. else
  337.   echo shar: Extracting \"'etc/english.hilfe'\" \(10356 characters\)
  338.   sed "s/^X//" >'etc/english.hilfe' <<'END_OF_FILE'
  339. X#?
  340. XCommand: "?"
  341. X
  342. XYou'll get a list of all commands, which you may use. The contents of this
  343. Xlist depends on your user-level. Type "? *", if you like to see ALL commands
  344. Xof this BBS.
  345. X
  346. X#0
  347. XCommand: "0" ("1-9")
  348. X
  349. XThere is a "dynamic command buffer", who captures every input you type at
  350. Xthe command-prompt. Type "0" to see which commands are in buffer, or any
  351. Xnumber between 1 and 9 to execute one of those commands. Of course, you may
  352. Xuse the cursor-keys to select any command, too.
  353. X
  354. X#+
  355. XCommand: "+"
  356. X
  357. XJump to the next board with new articles.
  358. X
  359. X#-
  360. XCommand: "-"
  361. XJump to the previous board with new articles.
  362. X
  363. X#ACCOUNT
  364. XCommand: "Account"
  365. X
  366. XYou need to registered to send and receive mails to/from all over the
  367. Xworld. The registration makes you a fully accepted user of this BBS.
  368. XYou're now reachable by mail from users on this host or on any host, this
  369. Xhost is connected to.
  370. X
  371. XPLEASE use your full name as username !
  372. X
  373. X#AREA
  374. XCommand: "Area"
  375. X
  376. XThis command makes it possible to jump between groups ('ar ++', 'ar --') or
  377. Xjust subgroups ('ar +', 'ar -').
  378. X
  379. X#BOARD
  380. XCommand: "Board"
  381. X
  382. XThere is a board for every single subject/theme with it's own index. So you
  383. Xhadn't to search long for special information on any item. To move from one
  384. Xboard to another, you use the command "board" with some options:
  385. X
  386. XBOARD                      list boards with new articles
  387. XBOARD *                    list all boards depending on userlevel
  388. XBOARD **                   list ALL boards
  389. XBOARD +                    go to the next board
  390. XBOARD -                    go to the previous board
  391. XBOARD !                    display the name of the current board
  392. XBOARD #                    list areas in board
  393. XBOARD ..           step from one area to the previous one
  394. XBOARD boardname            jump to board "boardname"
  395. X
  396. X#CHAT
  397. XCommand: "Chat"
  398. X
  399. X- systemdepending stuff -
  400. X
  401. X#DATE
  402. XCommand: "Date"
  403. X
  404. XShows the current date. (Not quite right ... it's shows the systems date :-)
  405. X
  406. X#DELETE
  407. XCommand: "Delete"
  408. X
  409. XDelete mails or articles. NOTE: Be careful! If you type "delete" in your
  410. XPM, every (!) mail will be scratched!
  411. X
  412. XDELETE               delete all your mail
  413. XDELETE article           delete article no. "article"
  414. XDELETE article-article       delete from "article" to "article"
  415. X
  416. X#DIR
  417. XCommand: "Dir"
  418. X
  419. XThis will give you a survey of what subjects are collect in the current
  420. Xboard. If you hadn't add a '*', you'll ony see the entries which are
  421. Xnew for you.
  422. X
  423. XDIR                        index new articles
  424. XDIR *                      index ALL articles (of a board)
  425. X
  426. X#DIRECTION
  427. XCommand: "Direction"
  428. X
  429. XIt's sounds pretty funny, but this commands decides whether you see
  430. Xanswers before questions or not :-)
  431. X
  432. X#DOWNLOAD
  433. XCommand: "Download"
  434. X
  435. XYou may use this to fetch a couple of articles. Just type in which
  436. Xarticles you want, and choose the prefered xfer-protocol.
  437. X
  438. X#EDIT
  439. XCommand: "Edit"
  440. X
  441. XFor the folks that are never quite satisfied with their work, the
  442. Xcommand "edit" offers the possibility to re-edit the text. Depending
  443. Xon the userlevel, changing other users articles is allowed, too ;-)
  444. X
  445. X#FINGER
  446. XCommand: "Finger"
  447. X
  448. XGetting informations about specified users is very easy. Use the command
  449. X"finger username" for local users, or "finger host!username" for users
  450. Xwho work on other sites.
  451. X
  452. X#FORWARD
  453. XCommand: "Forward"
  454. X
  455. XIf you like to send copies of mails/articles to other users, you may use
  456. Xthis command. The variable "user" (see below) stand for every kind of
  457. Xaddress (i.e. "Prename.Name", "host!name", "name@host.domain" etc.). So
  458. Xit is possible to forward articles to your own shell-account on this host,
  459. Xor to your account on any other host ... this may be useful sometimes.
  460. X
  461. XFORWARD                    list stored mails
  462. XFORWARD user               forward a stored mail to "user"
  463. XFORWARD mail user          forward "mail" to "user"
  464. XFORWARD article user       forward "article" to "user"
  465. X
  466. X#GAMES
  467. XCommand: "Games"
  468. X
  469. XThe list, that will be shown if you enter this command, includes some
  470. Xgames you may play. They all have own accounting procedures and different
  471. Xinstruction sets ... so don't blame the sysop for anything that will
  472. Xhappen to you :-)
  473. X
  474. X#GOODBYE
  475. XCommand: "Goodbye"
  476. X
  477. XNEVER use this command! (Exception: If you REALLY want to leave :-)
  478. X
  479. X#HELP
  480. XCommand: "Help"
  481. X
  482. XYou managed to get this information ... so why do you ask ???
  483. X
  484. XHELP                       this shorthelp
  485. XHELP *                     display some pages of helpful descriptions
  486. XHELP command               show information on "command"
  487. X
  488. X#MAIL
  489. XCommand: "Mail"
  490. X
  491. XOne of the most powerful commands on this BBS. If you are fitted out with
  492. Xthe right user-level, you're able to send mails to receivers all over the
  493. Xworld ... or just to another BBS-user.
  494. X
  495. XMAIL Prename.Name          (Prename.Name i.e. "Volker.Schuermann")
  496. XMAIL Alias                 (Alias i.e. "Sysop")
  497. XMAIL Shell-Account         (Shell-Account i.e. "volkers")
  498. X
  499. XThese three commands will deliver a mail to a user on this host. If this user
  500. Xhas his own BBS-account, the mail will be sent to his BBS-maildrop. 
  501. XOtherwise his/her shell-account-maildrop will be filled ... 
  502. X
  503. XMAIL Host!User             (Host!User i.e. "unnet!Volker.Schuermann")
  504. XMAIL User@Host.Domain      (User@Host.Domain i.e. "volker@unnet.w.open.de")
  505. X
  506. XBoth commands will send the mail to a user on another host (if "host" or
  507. X"host@domain" are the address of this host, the mail won't leave this host).
  508. X
  509. X#MACRO
  510. XCommand: "Macro"
  511. X
  512. XFor all lazy/intelligent users, here is a way to simplify work! Just create
  513. Xa new command to collect a group of commands:
  514. X
  515. Xnew = b comp.os.minix, d, key, b sub.os.minix, b
  516. X
  517. XThe new command "new" will jump to board "comp.os.minix" and show the index
  518. Xof new articels. If you hit (the) any key, it moves to "sub.os.minix" and 
  519. Xdoes the same.
  520. X
  521. XMacro = Command Sequence
  522. X===========================================================================
  523. Xandi  = mail andreas@xenox.ruhr.de
  524. Xwalt  = mail Walter, forward weller!walterb
  525. Xgrp   = mail volkers, forw xenox, forw stefans, forw joergg
  526. Xsts   = mail Stefan S, forw stefans@coduck.ruhr.sub.org, forw unnet!stefans
  527. Xin    = +, dir, KEY, in
  528. Xpp    = PORTINFO, SLEEP 5, pp
  529. X
  530. XThe entries "in" and "pp" are demonstrating how to build recursive commands.
  531. XUse CTRL-X to break the run of such a command sequence!
  532. X
  533. X#MESSAGE
  534. XCommand: "Message"
  535. X
  536. XYou may use this text to inform other users that you're offline for a
  537. Xfew days or that you never answers mail or what ever ...
  538. X
  539. XThis text is shown to everybody who wants to send a mail to you on this
  540. Xhost.
  541. X
  542. X#MINIX
  543. XCommand: "Minix"
  544. X
  545. XIf you'd have to leave the BBS everytime you like to do something on
  546. Xshell-level, it would be a nice swapping around on this system. But with
  547. Xthe command "minix", you can do everything (even start the BBS :-) without
  548. Xleaving ... 
  549. X
  550. X#PORTINFO
  551. XCommand: "Portinfo"
  552. X
  553. XHave a look on what the other users are doing. This includes BBS-users
  554. Xas well as shell-only-users (poor guys :-)
  555. X
  556. X#PROTOCOL
  557. XCommand: "Protocol"
  558. X
  559. XSee WHO called in WHEN from WHERE on WHICH line ... puhh, but that's exactly
  560. Xwhat this command is doing.
  561. X
  562. XIf you use the option "#" (means "protocol #"), the informations are shown
  563. Xas a diagram (for statistics purposes). 
  564. X
  565. X#PM
  566. XCommand: "PM"
  567. X
  568. XMove to the board with your BBS-maildrop. There you may check your incomming
  569. Xmails and answer (reply) them.
  570. X
  571. X#READ
  572. XCommand: "Read"
  573. X
  574. XThat's how to get the information hidden behind the subjects ... the options
  575. Xto this command a described in the following:
  576. X
  577. XREAD                       read NEW articles
  578. XREAD *                     real ALL articles (of a board)
  579. XREAD article               show article no. "article"
  580. XREAD article-article       display from "article" to "article"
  581. X
  582. XThe line "READ article" builds an exceptions ... if the listing of the
  583. Xspecified article is complete, the BBS shows a little menu to you. Type
  584. Xa "?" at the prompt to see what actions are available there!
  585. X
  586. XUsing this form of the command "read" is the most convenient way to consume
  587. Xarticles!!! 
  588. X
  589. X#SETUP
  590. XCommand: "Setup"
  591. X
  592. XTo make life easier (especially YOUR life), you may change lot's of the
  593. XBBS depending paramaters. The SETUP is fully controlled by menu, so you
  594. Xonly have to hit keys (more or less astonished because of the features 
  595. Xyou never noticed before) ...
  596. X
  597. X#SIGNATURE
  598. XCommand: "Signature"
  599. X
  600. XUse this command to create a text, that will be sent as a footnote of every
  601. Xmail/article you'll write on this BBS. Have a look on the ".signatures"
  602. Xof other ppl. to see which facts belong to such a text ...  
  603. X
  604. X#STATE
  605. XCommand: "State"
  606. X
  607. XGives a summary of all data, this BBS has stored in it's accouting database.
  608. XOf course,only that part of data is shown, that belongs to you!
  609. X
  610. X#STATISTICS
  611. XCommand: "Statistics"
  612. X
  613. XThe BBS collects some information for statistics purpose. If you are inter-
  614. Xested in those statistics, use one of the following options:
  615. X
  616. XSTATISTICS                 table containing NEWS-statistics
  617. XSTATISTICS *               table containing more NEWS-statistics
  618. XSTATISTICS $               UUCP-rates (only if UUCP supports this)
  619. XSTATISTICS #               download-statistics 
  620. X
  621. XThe option "$" depends on the systems UUCP-Support. Ask your Sysop whether
  622. Xthis system accounts UUCP-Rates or not.
  623. X
  624. X#TIME
  625. XCommand: "Time"
  626. X
  627. XShows the system time and the time you're online in seconds ... my goodness,
  628. Xfive hours, and still online ...
  629. X
  630. X#USERS
  631. XCommand: "Users"
  632. X
  633. XYep, you're not alone on this host. To see who's on too, type one of the
  634. Xfollowing commands:
  635. X
  636. XUSERS                      show users list
  637. XUSERS *                    show users list (more detailed)
  638. XUSERS #                    users up-/download ratio
  639. X
  640. XIf your level is to low, you won't be able to use the "#" option - don't
  641. Xbe angry, it's not as much interesting, as it seems to be (use "stati #"
  642. Xinstead :-)
  643. X
  644. X#VERSION
  645. XCommand: "Version"
  646. X
  647. XThis option was built in for other Sysops only - they may use it to spy out
  648. Xwhich BBS is the older one - nothing else.
  649. X
  650. XVERSION                    print version
  651. XVERSION *                  display compiling definitions
  652. XVERSION #                  the "Hall of Fame"
  653. X
  654. XThe option "#" gives a list of ppl., who were members of the "BBS gold crew"
  655. Xduring it's development :-)
  656. X
  657. X#WRITE
  658. XCommand: "Write"
  659. X
  660. XUse this command to create a new article for any board or newsgroup on this
  661. XBBS. Depending on your user-level this article will be sent with distribution
  662. X"world", "*group*" or "local". 
  663. X
  664. XDon't use this command to send mails to other users ... try it, if you don't
  665. Xtrust in documentations. 
  666. END_OF_FILE
  667.   if test 10356 -ne `wc -c <'etc/english.hilfe'`; then
  668.     echo shar: \"'etc/english.hilfe'\" unpacked with wrong size!
  669.   fi
  670.   # end of 'etc/english.hilfe'
  671. fi
  672. if test -f 'src/games.c' -a "${1}" != "-c" ; then 
  673.   echo shar: Will not clobber existing file \"'src/games.c'\"
  674. else
  675.   echo shar: Extracting \"'src/games.c'\" \(1173 characters\)
  676.   sed "s/^X//" >'src/games.c' <<'END_OF_FILE'
  677. X/***************************************************************************/
  678. X/*        PROGRAMM  ix/Mbox                           */
  679. X/*             DATEI  games.c                           */
  680. X/*        FUNKTIONEN  games()                           */
  681. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  682. X/*  LETZTE AENDERUNG  25.11.1991                       */
  683. X/***************************************************************************/
  684. X
  685. X#include <stdio.h>
  686. X#include "mbox.h"
  687. X
  688. X
  689. Xgames()
  690. X{
  691. X  FILE *fp;
  692. X  int i, c;
  693. X
  694. X  unsigned char s[STRING];
  695. X  unsigned char GAME[MAX_GAMES][STRING];
  696. X
  697. X
  698. X  headline( GA01_MSG );
  699. X  printf("\n");
  700. X
  701. X  fp = fopen(GAMES, "r");
  702. X  if (fp == NULL) {
  703. X    nerror("games.c", 19, "games", "Datei-Lesefehler", GAMES);
  704. X  }
  705. X  i = 0;
  706. X  while((fgets(s, 80, fp) != NULL) && (s[0] == '/'));
  707. X  while((i < MAX_GAMES) && (fscanf(fp, "%s %s", s, GAME[i]) > 0)){
  708. X    i++;
  709. X    printf("  %d - %s\n\n", i, s); 
  710. X  }
  711. X  fclose(fp);
  712. X
  713. X  ansi("md");
  714. X  printf("\n%s > ", GA02_MSG);
  715. X  ansi("me");
  716. X
  717. X  c = getint();
  718. X  if(c > 32) printf("%c", c);
  719. X  c -= 49;
  720. X
  721. X  if((c >= 0) && (c < i)){
  722. X    printf("\n\n");
  723. X    sprintf(s, "%s %s %d %d", RSH, GAME[c], OLDUID, OLDGID);
  724. X    system(s);    
  725. X  }
  726. X  else{
  727. X    ansi("md");
  728. X    printf(" %s\n", GA03_MSG);
  729. X    ansi("me");
  730. X  }
  731. X}
  732. X
  733. END_OF_FILE
  734.   if test 1173 -ne `wc -c <'src/games.c'`; then
  735.     echo shar: \"'src/games.c'\" unpacked with wrong size!
  736.   fi
  737.   # end of 'src/games.c'
  738. fi
  739. if test -f 'src/lesen.c' -a "${1}" != "-c" ; then 
  740.   echo shar: Will not clobber existing file \"'src/lesen.c'\"
  741. else
  742.   echo shar: Extracting \"'src/lesen.c'\" \(9853 characters\)
  743.   sed "s/^X//" >'src/lesen.c' <<'END_OF_FILE'
  744. X/***************************************************************************/
  745. X/*        PROGRAMM  ix/Mbox                           */
  746. X/*             DATEI  lesen.c                           */
  747. X/*        FUNKTIONEN  lesen(), ansage(), unterschrift()               */
  748. X/*              getsite(), checkdomaintype()               */
  749. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  750. X/*  LETZTE AENDERUNG  30.10.1992                       */
  751. X/***************************************************************************/
  752. X
  753. X#include <sys/types.h>
  754. X#include <sys/stat.h>
  755. X#include <unistd.h>
  756. X#include <fcntl.h>
  757. X#include <stdio.h>
  758. X#include <utmp.h>
  759. X#include <time.h>
  760. X
  761. X
  762. X#include "mbox.h"
  763. X
  764. X
  765. Xextern unsigned char headinfo[STRING];
  766. X
  767. X
  768. X/***************************************************************************/
  769. X/*      FUNKTION  lesen()                           */
  770. X/*  BESCHREIBUNG  Zeigt einen Artikel o. eine persoenliche Mail an. Bietet */
  771. X/*          dann versch. Optionen zum Weiterlesen o. Beantworten an. */
  772. X/*     PARAMETER  arg  =  Nummer des Artikels/der Mail                     */
  773. X/*     RUECKGABE  keine                                                       */
  774. X/***************************************************************************/
  775. X
  776. Xvoid lesen(arg)
  777. Xunsigned char arg[];
  778. X{
  779. X  FILE *fp;
  780. X  unsigned char s[LSTRING];
  781. X  unsigned char entry[STRING];
  782. X  unsigned char no[10];
  783. X  unsigned char c;
  784. X  int i;
  785. X  int ok;
  786. X  int MIN, MAX;
  787. X  int pr;
  788. X
  789. X  struct stat fst;
  790. X
  791. X  sprintf(no, "%s", arg);
  792. X
  793. X  maybe_locked(INHALT, "r");
  794. X  fp = fopen(INHALT, "r");
  795. X  if (fp == NULL) {
  796. X    nerror("misc.c", 558, "lesen", "Datei-Lesefehler", INHALT);
  797. X  }
  798. X  while ((fgets(s, LSTRING, fp) != NULL) && (s[2] != '='));
  799. X  fgets(s, LSTRING, fp);
  800. X  MIN = atoi(s);
  801. X  while (fgets(s, LSTRING, fp) != NULL) {
  802. X    MAX = atoi(s);
  803. X  }
  804. X  fclose(fp);
  805. X
  806. X  if (MAX < MIN) {
  807. X    i = MIN;
  808. X    MIN = MAX;
  809. X    MAX = i;
  810. X  }
  811. X
  812. X  NEXT_MSG:
  813. X
  814. X  if ((no[0] < '1') || (no[0] > '9')) {
  815. X    ansi("md");
  816. X    printf(" %s\n", MIS41_MSG);
  817. X    ansi("me");
  818. X    return;
  819. X  }
  820. X  if (pruefe(no) != 0) goto NEXT_NEXT;
  821. X
  822. X  printf("\n\n");
  823. X  ansi("cl");
  824. X
  825. X  if (strcomp(BRETT, "PM") != 0) {
  826. X        sprintf(entry, "%s/%s", BRETT, no); 
  827. X    if(USER.terminal == 4){
  828. X        ansi("md");
  829. X        printf("%s %s\n", MIS42_MSG, no);
  830. X        ansi("me");
  831. X    }
  832. X    else{
  833. X        sprintf(headinfo, " %s %s (%s) ", MIS43_MSG, no, NG);
  834. X        headline( headinfo );
  835. X    }
  836. X    ok = show(entry, 9999, USER.more);
  837. X  }
  838. X  else {
  839. X    sprintf(entry, "%s/usr/%d/%s", HOME, USER.id, no);
  840. X    if(USER.terminal == 4){
  841. X        ansi("md");
  842. X        printf("%s %s\n", MIS44_MSG, no);
  843. X        ansi("me");
  844. X    }
  845. X    else{
  846. X        sprintf(headinfo, " %s (%s) ", MIS45_MSG, no);
  847. X        headline( headinfo );
  848. X    }
  849. X    ok = show(entry, 9999, USER.more);
  850. X  }
  851. X
  852. X  if(ok == -1) return;
  853. X  if(ok == -9){
  854. X    if(USER.leserichtung == 1){
  855. X        c = MIS52_MSG;
  856. X    }
  857. X    else{
  858. X        c = MIS51_MSG;
  859. X     }
  860. X    goto NEXT_DIS;
  861. X  }
  862. X
  863. X  c = LF;
  864. X
  865. X  NEXT_NEXT:
  866. X
  867. X  printf("\n");
  868. X  ansi("mr");
  869. X  printf("[Mesg. %s] %s, ? > ", no, MIS46_MSG);
  870. X  ansi("me");
  871. X  printf("%c%c", MIS51_MSG, BS);
  872. X
  873. X  do {
  874. X    c = getint();
  875. X    if (strcomp(BRETT, "PM") == 0) {
  876. X        if (c == MIS50_MSG) c = '*';
  877. X    }
  878. X    if (c >= 97) c -= 32;
  879. X    if (c == ENTER) c = MIS51_MSG;
  880. X    if (c == '?') {
  881. X        clearline();
  882. X        ansi("mr");
  883. X        printf("%c%s > ", CR, MIS53_MSG);
  884. X        ansi("me");
  885. X    }
  886. X    if ((c != MIS47_MSG) && (c != MIS48_MSG) && (c != MIS49_MSG) && (c != MIS50_MSG) && (c != MIS51_MSG) && (c != MIS52_MSG) && (c != '*'))
  887. X        c = 0;
  888. X  } while (c == 0);
  889. X
  890. X  printf("%c", c);
  891. X
  892. X  NEXT_DIS:
  893. X
  894. X  if (c == MIS50_MSG) {        /* LOESCHEN */
  895. X    clearline();
  896. X    ansi("mr");
  897. X    printf("%s [%c, %c] > ", MIS54_MSG, GBL06_MSG, GBL07_MSG);
  898. X    ansi("me");
  899. X    if (yesno() == GBL06_MSG) {
  900. X        loeschen(no);
  901. X    }
  902. X    printf("\n");
  903. X    c = MIS51_MSG;
  904. X  }
  905. X  if (c == '*') {        /* LOESCHEN (sofort) */
  906. X    loeschen(no);
  907. X    printf("\n");
  908. X    c = MIS51_MSG;
  909. X  }
  910. X  if (c == MIS51_MSG) {        /* NAECHSTE */
  911. X    ok = 0;
  912. X    do {
  913. X        i = atoi(no);
  914. X        i++;
  915. X        sprintf(no, "%d", i);
  916. X        pr = pruefe(no);
  917. X        if (pr == 0) ok = 1;
  918. X        if (pr == 1) goto NEXT_NEXT;
  919. X        if (i > MAX) {
  920. X            printf("\n\n%s\n", MIS55_MSG);
  921. X            return;
  922. X        }
  923. X    } while (ok == 0);
  924. X    if (ok == 1) goto NEXT_MSG;
  925. X    goto NEXT_NEXT;
  926. X  }
  927. X  if (c == MIS52_MSG) {        /* VORHERIGE */
  928. X    ok = 0;
  929. X    do {
  930. X        i = atoi(no);
  931. X        i--;
  932. X        sprintf(no, "%d", i);
  933. X        pr = pruefe(no);
  934. X        if (pr == 0) ok = 1;
  935. X        if (pr == 1) goto NEXT_NEXT;
  936. X        if (i < MIN) {
  937. X            printf("\n\n%s\n", MIS56_MSG);
  938. X            return;
  939. X        }
  940. X    } while (ok == 0);
  941. X    if (ok == 1) goto NEXT_MSG;
  942. X    goto NEXT_NEXT;
  943. X  }
  944. X  if (c == MIS49_MSG) goto NEXT_MSG;    /* WIEDERHOLEN */
  945. X
  946. X
  947. X  if (c == MIS48_MSG) {            /* BEANTWORTEN */
  948. X    headline( MIS57_MSG );
  949. X    printf("\n%s", MIS58_MSG);
  950. X    sprintf(s, "cp %s %s/%dRep > /dev/null", entry, TMP, getpid());
  951. X    system(s);
  952. X
  953. X    if (strcomp(BRETT, "PM") == 0) {
  954. X        if(brief("~REPLY~") != -1){
  955. X            sprintf(s, "%s?", USER.name);
  956. X            brief(s);
  957. X            sprintf(s, "%s/usr/%d/INDEX", HOME, USER.id);
  958. X            stat(s, &fst);
  959. X            IDX_SIZE = (int) fst.st_size;
  960. X        }
  961. X    }
  962. X    else {
  963. X        printf("\n\n");
  964. X        ansi("mr");
  965. X        printf("%s, ? > ", MIS59_MSG);
  966. X        ansi("me");
  967. X
  968. X        do {
  969. X            c = getint();
  970. X            if (c >= 97) c -= 32;
  971. X            if (c == '?') {
  972. X                clearline();
  973. X                ansi("mr");
  974. X                printf("%c%s > ", CR, MIS60_MSG);
  975. X                ansi("me");
  976. X            }
  977. X            if ((c != MIS61_MSG) && (c != MIS62_MSG)) c = 0;
  978. X        } while (c == 0);
  979. X
  980. X        printf("%c", c);
  981. X
  982. X        if (c == MIS62_MSG) {
  983. X            schreiben("");
  984. X        }
  985. X        if (c == MIS61_MSG) {
  986. X            if((brief("~REPLY~") != -1) && (strcomp(GUEST, USER.name) != 0)){
  987. X                sprintf(s, "%s?", USER.name);
  988. X                brief(s);
  989. X                sprintf(s, "%s/usr/%d/INDEX", HOME, USER.id);
  990. X                stat(s, &fst);
  991. X                    IDX_SIZE = (long) fst.st_size;
  992. X            }
  993. X        }
  994. X    }
  995. X    goto NEXT_NEXT;
  996. X  }
  997. X  printf("\n");
  998. X  return;
  999. X}
  1000. X
  1001. X
  1002. X
  1003. X/***************************************************************************/
  1004. X/*      FUNKTION  ansage()                           */
  1005. X/*  BESCHREIBUNG  Der Ansage-Text wird angezeigt und kann geandert werden. */
  1006. X/*     PARAMETER  keine                                                       */
  1007. X/*     RUECKGABE  keine                                                       */
  1008. X/***************************************************************************/
  1009. X
  1010. Xvoid ansage()
  1011. X{
  1012. X  FILE *ff;
  1013. X  unsigned char s[STRING];
  1014. X  unsigned char t[STRING];
  1015. X  unsigned char TEP[STRING];
  1016. X  unsigned char c;
  1017. X
  1018. X
  1019. X  printf("\n\n%s\n\n", MAL38_MSG);
  1020. X
  1021. X  sprintf(TEP, "%s/usr/%d/.hello", HOME, USER.id);
  1022. X  ff = fopen(TEP, "r");
  1023. X  if (ff != NULL) {
  1024. X    ansi("md");
  1025. X    while (fgets(s, 80, ff) != NULL) {
  1026. X        printf("%s", s);
  1027. X    }
  1028. X    fclose(ff);
  1029. X    ansi("me");
  1030. X    printf("\n\n");
  1031. X  }
  1032. X  ansi("mr");
  1033. X  printf("%c%s [%c, %c] > ", CR, MAL39_MSG, GBL06_MSG, GBL07_MSG);
  1034. X  ansi("me");
  1035. X
  1036. X  c = yesno();
  1037. X
  1038. X  if (c == GBL06_MSG) {
  1039. X    sprintf(t, "%s %s", EDDY, TEP);
  1040. X    system(t);
  1041. X  }
  1042. X  printf("\n");
  1043. X}
  1044. X
  1045. X
  1046. X
  1047. X
  1048. X/***************************************************************************/
  1049. X/*      FUNKTION  unterschrift                           */
  1050. X/*  BESCHREIBUNG  Die Unterschrift (.signature) wird angezeigt und kann    */
  1051. X/*          geandert werden.                                         */
  1052. X/*     PARAMETER  keine                                                       */
  1053. X/*     RUECKGABE  keine                                                       */
  1054. X/***************************************************************************/
  1055. X
  1056. Xvoid unterschrift()
  1057. X{
  1058. X  FILE *ff;
  1059. X  unsigned char s[STRING];
  1060. X  unsigned char t[STRING];
  1061. X  unsigned char TEP[STRING];
  1062. X  unsigned char c;
  1063. X
  1064. X
  1065. X  printf("\n\n%s\n\n", MAL40_MSG);
  1066. X
  1067. X  sprintf(TEP, "%s/usr/%d/.signature", HOME, USER.id);
  1068. X  ff = fopen(TEP, "r");
  1069. X  if (ff != NULL) {
  1070. X    ansi("md");
  1071. X    while (fgets(s, 80, ff) != NULL) {
  1072. X        printf("%s", s);
  1073. X    }
  1074. X    fclose(ff);
  1075. X    ansi("me");
  1076. X    printf("\n\n");
  1077. X  }
  1078. X  ansi("mr");
  1079. X  printf("%c%s [%c, %c] > ", CR, MAL41_MSG, GBL06_MSG, GBL07_MSG);
  1080. X  ansi("me");
  1081. X
  1082. X  c = yesno();
  1083. X
  1084. X  if (c == GBL06_MSG) {
  1085. X    sprintf(t, "%s %s", EDDY, TEP);
  1086. X    system(t);
  1087. X  }
  1088. X  printf("\n");
  1089. X}
  1090. X
  1091. X
  1092. X
  1093. X
  1094. X/***************************************************************************/
  1095. X/*      FUNKTION  getsite()                           */
  1096. X/*  BESCHREIBUNG  Findet den Empfaenger SITE in der Adresse           */
  1097. X/*     PARAMETER  Adresse                                                  */
  1098. X/*     RUECKGABE  Empfaenger SITE                                          */
  1099. X/***************************************************************************/
  1100. X
  1101. Xunsigned char *getsite(arg)
  1102. Xunsigned char arg[];
  1103. X{
  1104. X  int i = 0, a = 0, b = 0, c = 0;
  1105. X  unsigned char s[STRING];
  1106. X
  1107. X  while(arg[i] != '\0'){
  1108. X    if(arg[i] == '!') a = i - 1;
  1109. X    if(arg[i] == '@') b = i + 1;
  1110. X    if(arg[i] == '.'){
  1111. X        if((b != 0) && (c == 0)) c = i -1;
  1112. X    }
  1113. X    i++;
  1114. X  }
  1115. X
  1116. X  if((a == 0) && (b == 0)) strcat(s, UUCPSITE);
  1117. X  if(a != 0) strcpy(s, (unsigned char *) strcopy(arg, 0, a));
  1118. X  if(b != 0) strcpy(s, (unsigned char *) strcopy(arg, b, c));
  1119. X
  1120. X  return (unsigned char *) s;
  1121. X}
  1122. X
  1123. X
  1124. X
  1125. X
  1126. X/***************************************************************************/
  1127. X/*      FUNKTION  checkdomaintype()                       */
  1128. X/*  BESCHREIBUNG  Internationale MAIL ???                    */
  1129. X/*     PARAMETER  Adresse                                                  */
  1130. X/*     RUECKGABE   0 = ok                                                  */
  1131. X/*                -1 = Level zu gering                       */
  1132. X/***************************************************************************/
  1133. X
  1134. Xint checkdomaintype(arg)
  1135. Xunsigned char arg[];
  1136. X{
  1137. X  int i = 0, l, a, e = 0, f = 0, g = 0, international = 0;
  1138. X  unsigned char s[STRING];
  1139. X
  1140. X  if(USER.level >= WRITE_INTERNAT) return 0;
  1141. X
  1142. X  while(arg[i] != '\0'){
  1143. X    if(arg[i] == '!') e++;
  1144. X    if(arg[i] == '@') g++;
  1145. X    i++;
  1146. X  }
  1147. X  s[0] = '\0';
  1148. X
  1149. X  if((e == 0) && (g == 0)) return 0;
  1150. X
  1151. X  if(e > 1) international++;
  1152. X
  1153. X  if(e == 0){
  1154. X
  1155. X    l = strlen( (unsigned char *) arg);
  1156. X
  1157. X    a = strlen( (unsigned char *) NAT_DOMAIN1 );
  1158. X    strcpy(s, (unsigned char *) strcopy(arg, (l-a), l));
  1159. X    if(strcomp(s, NAT_DOMAIN1) == 0) f++;
  1160. X
  1161. X    a = strlen( (unsigned char *) NAT_DOMAIN2 );
  1162. X    strcpy(s, (unsigned char *) strcopy(arg, (l-a), l));
  1163. X    if(strcomp(s, NAT_DOMAIN2) == 0) f++;
  1164. X
  1165. X    a = strlen( (unsigned char *) NAT_DOMAIN3 );
  1166. X    strcpy(s, (unsigned char *) strcopy(arg, (l-a), l));
  1167. X    if(strcomp(s, NAT_DOMAIN3) == 0) f++;      
  1168. X
  1169. X    if(f == 0) international++;
  1170. X  }  
  1171. X
  1172. X  if(international != 0){
  1173. X    ansi("md");
  1174. X    printf("\n\n%s (%d) %s\n", MAL01_MSG, WRITE_INTERNAT, MAL02_MSG);
  1175. X    ansi("me");
  1176. X    return -1;    
  1177. X  }
  1178. X
  1179. X  return 0;
  1180. X}
  1181. X
  1182. X
  1183. X
  1184. X
  1185. END_OF_FILE
  1186.   if test 9853 -ne `wc -c <'src/lesen.c'`; then
  1187.     echo shar: \"'src/lesen.c'\" unpacked with wrong size!
  1188.   fi
  1189.   # end of 'src/lesen.c'
  1190. fi
  1191. if test -f 'src/postfach.c' -a "${1}" != "-c" ; then 
  1192.   echo shar: Will not clobber existing file \"'src/postfach.c'\"
  1193. else
  1194.   echo shar: Extracting \"'src/postfach.c'\" \(9214 characters\)
  1195.   sed "s/^X//" >'src/postfach.c' <<'END_OF_FILE'
  1196. X/***************************************************************************/
  1197. X/*        PROGRAMM  ix/Mbox                           */
  1198. X/*             DATEI  postfach.c                       */
  1199. X/*        FUNKTIONEN  postfach()                       */
  1200. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  1201. X/*  LETZTE AENDERUNG  16.11.1992                       */
  1202. X/***************************************************************************/
  1203. X  
  1204. X#include <stdio.h>
  1205. X#include <sys/types.h>
  1206. X#include <fcntl.h>
  1207. X#include <unistd.h>
  1208. X#include <ctype.h>
  1209. X
  1210. X#include "mbox.h"
  1211. X
  1212. X
  1213. X
  1214. X/***************************************************************************/
  1215. X/*      FUNKTION  postfach()                           */
  1216. X/*  BESCHREIBUNG  Postfach und versch. Dateien fuer einen neuen Teil-      */
  1217. X/*          nehmer einrichten.                                       */
  1218. X/*     PARAMETER  arg  =  '*'  =  normaler Aufruf, wird geprueft       */
  1219. X/*                   =  Aufruf von ADMIN                         */
  1220. X/*               =  '#'  =  Neuinstallation der UDBASE           */
  1221. X/*     RUECKGABE  keine                                                       */
  1222. X/***************************************************************************/
  1223. X
  1224. Xvoid postfach(arg)
  1225. Xunsigned char arg[];
  1226. X{
  1227. X  int fd;
  1228. X  FILE *fp;
  1229. X  unsigned char s[STRING*2];
  1230. X  unsigned char t[STRING*2];
  1231. X  struct userdaten LOOSER;
  1232. X  struct userdaten POSTER;
  1233. X  int ok, i, j, c;
  1234. X  long ll;
  1235. X
  1236. X
  1237. X  if (arg[0] == '*') {
  1238. X    if ((strcomp(GUEST, USER.name) != 0) &&
  1239. X        (strcomp(POSTMASTER, USER.sh_name) != 0)) {
  1240. X        ansi("md");
  1241. X        printf(" %s\n", POS01_MSG);
  1242. X        ansi("me");
  1243. X        return;
  1244. X    }
  1245. X  }
  1246. X  
  1247. X  if (arg[0] == '#') {
  1248. X
  1249. X    if (arg[1] == '1') { /* ADMINISTRATION */
  1250. X
  1251. X        strcpy(USER.name, "Administration");
  1252. X        strcpy(USER.sh_name, POSTMASTER);
  1253. X        strcpy(USER.nick, "Sysop");
  1254. X
  1255. X        USER.id = 1;
  1256. X        USER.level = 10;
  1257. X
  1258. X        printf("%s - %s (%s)\n", POS04_MSG, USER.name, USER.sh_name);
  1259. X
  1260. X        fp = fopen(UDSEQ, "w");
  1261. X        if (fp == NULL) {
  1262. X            nerror("postfach.c", 63, "postfach", "Datei-Schreibfehler", UDSEQ);
  1263. X        }
  1264. X        fputs("1", fp);
  1265. X        fclose(fp);
  1266. X        
  1267. X        fp = fopen(UDBASE, "w");
  1268. X        fclose(fp);
  1269. X    }     
  1270. X    if (arg[1] == '2') { /* GUEST */
  1271. X    
  1272. X        strcpy(USER.name, GUEST);
  1273. X        strcpy(USER.sh_name, GBL10_MSG);
  1274. X        strcpy(USER.nick, POS03_MSG);
  1275. X
  1276. X        USER.id = 2;
  1277. X        USER.level = 0;
  1278. X    
  1279. X        printf("%s - %s (%s)\n", POS05_MSG, USER.name, USER.sh_name);
  1280. X    }
  1281. X
  1282. X    strcpy(USER.passwort, "*****");
  1283. X    strcpy(USER.wohnort, "");
  1284. X    strcpy(USER.strasse, "???");
  1285. X    strcpy(USER.telefon1, "???");
  1286. X    strcpy(USER.telefon2, "???");
  1287. X    strcpy(USER.geburtsdatum, "00.00.0000");
  1288. X    strcpy(USER.account, "00.00.0000 000.00");
  1289. X
  1290. X    goto INIT_UDBASE;
  1291. X  }
  1292. X
  1293. X  maybe_locked(UDBASE, "r"); 
  1294. X  fd = open(UDBASE, O_RDONLY);
  1295. X  if (fd == -1) {
  1296. X    nerror("postfach.c", 51, "postfach", "Datei-Lesefehler", UDBASE);
  1297. X  }
  1298. X  headline( POS06_MSG );
  1299. X  ansi("md");
  1300. X  printf("\n%s\n%s\n%s\n\n", POS07_MSG, POS08_MSG, POS09_MSG);
  1301. X  ansi("me");
  1302. X
  1303. X  RETRY_1:
  1304. X
  1305. X  printf("\n%s ", POS10_MSG);
  1306. X  strcpy(s, POSTER.name);
  1307. X  strcpy(POSTER.name, (unsigned char *) getline(30, 15, '.', ""));
  1308. X  if ((strcomp("<BREAK>", POSTER.name) == 0) || (POSTER.name[0] < 64) || (POSTER.name[1] < 64)) {
  1309. X    strcpy(POSTER.name, s);
  1310. X    printf("\n\n");
  1311. X    ansi("md");
  1312. X    printf("%s", POS11_MSG);
  1313. X    ansi("me");
  1314. X    printf("\n");
  1315. X    return;
  1316. X  }
  1317. X  ansi("md");
  1318. X  printf("\n%s", POS12_MSG);
  1319. X  ok = 0;
  1320. X  strcpy(POSTER.name, (unsigned char *) stripped(POSTER.name));
  1321. X  lseek(fd, 0L, SEEK_SET);
  1322. X  while ((read(fd, (unsigned char *) &LOOSER, sizeof(LOOSER)) == sizeof(LOOSER)) && (ok == 0)) {
  1323. X    if (strcomp(POSTER.name, LOOSER.name)    == 0) ok = 1;
  1324. X    if (strcomp(POSTER.name, LOOSER.nick)    == 0) ok = 1;
  1325. X    if (strcomp(POSTER.name, LOOSER.sh_name) == 0) ok = 1;
  1326. X  }
  1327. X
  1328. X  if (USER.level < ADMIN_LEV){
  1329. X      if ((strcomp("SYSOP", POSTER.name) == 0) ||
  1330. X          (strcomp("POST",  POSTER.name) == 0) ||
  1331. X          (strcomp("GAST",  POSTER.name) == 0) ||
  1332. X          (strcomp("ADMIN", POSTER.name) == 0) ||
  1333. X          (strcomp("COSYS", POSTER.name) == 0)) ok = 1;
  1334. X  }
  1335. X
  1336. X  if (ok == 1) {
  1337. X    printf(" %s\n", POS13_MSG);
  1338. X    ansi("me");
  1339. X    sprintf(POSTER.name, "%s", s);
  1340. X    goto RETRY_1;
  1341. X  }
  1342. X  ansi("me");
  1343. X
  1344. X  do {
  1345. X    printf("%c%s ", CR, POS14_MSG);
  1346. X    strcpy(s, (unsigned char *) getline(10, 11, '.', ""));
  1347. X    if (strcomp("<BREAK>", s) == 0) s[0] = '\0';
  1348. X    strcpy(POSTER.passwort, (unsigned char *) crypted(s));
  1349. X    if (length(POSTER.passwort) < 5) {
  1350. X        ansi("md");
  1351. X        printf("\n%s", POS15_MSG);        
  1352. X        ansi("me");
  1353. X    }
  1354. X  } while (length(POSTER.passwort) < 5);
  1355. X
  1356. XRETRY_2:
  1357. X
  1358. X  printf("\n%s ", POS16_MSG);
  1359. X  strcpy(s, getline(30, 15, '.', ""));
  1360. X  if (strcomp("<BREAK>", s) == 0) {
  1361. X    strcpy(s, "John Doe");
  1362. X  }
  1363. X  strcpy(POSTER.nick, (unsigned char *) stripped(s));
  1364. X
  1365. X  ansi("md");
  1366. X  printf("\n%s", POS12_MSG);
  1367. X  ok = 0;
  1368. X  lseek(fd, 0L, SEEK_SET);
  1369. X  while ((read(fd, (unsigned char *) &LOOSER, sizeof(LOOSER)) == sizeof(LOOSER)) && (ok == 0)) {
  1370. X    if (strcomp(POSTER.nick, LOOSER.nick)    == 0) ok = 1;
  1371. X    if (strcomp(POSTER.nick, LOOSER.name)    == 0) ok = 1;
  1372. X    if (strcomp(POSTER.nick, LOOSER.sh_name) == 0) ok = 1;
  1373. X  }
  1374. X
  1375. X  if (USER.level < ADMIN_LEV){
  1376. X      if ((strcomp("SYSOP", POSTER.nick) == 0) ||
  1377. X          (strcomp("POST",  POSTER.nick) == 0) ||
  1378. X          (strcomp("GAST",  POSTER.nick) == 0) ||
  1379. X          (strcomp("ADMIN", POSTER.nick) == 0) ||
  1380. X          (strcomp("COSYS", POSTER.nick) == 0)) ok = 1;
  1381. X  }
  1382. X
  1383. X  if (ok == 1) {
  1384. X    printf(" %s\n", POS13_MSG);
  1385. X    ansi("me");
  1386. X    goto RETRY_2;
  1387. X  }
  1388. X  ansi("me");
  1389. X
  1390. X
  1391. X  printf("%c%s ", CR, POS17_MSG);
  1392. X  strcpy(POSTER.wohnort, (unsigned char *) getline(30, 11, '.', ""));
  1393. X
  1394. X  printf("\n%s ", POS18_MSG);
  1395. X  strcpy(POSTER.strasse, (unsigned char *) getline(30, 11, '.', ""));
  1396. X
  1397. X  printf("\n%s ", POS19_MSG);
  1398. X  strcpy(POSTER.telefon1, (unsigned char *) getline(20, 11, '.', ""));
  1399. X
  1400. X  printf("\n%s ", POS20_MSG);
  1401. X  strcpy(POSTER.telefon2, (unsigned char *) getline(20, 11, '.', ""));
  1402. X
  1403. X  printf("\n%s ", POS21_MSG);
  1404. X  strcpy(POSTER.geburtsdatum, (unsigned char *) getline(10, 114, '?', ""));
  1405. X
  1406. X  close(fd);
  1407. X
  1408. X  ansi("md");
  1409. X  printf("\n\n%s\n%s\n\n", POS22_MSG, POS23_MSG);
  1410. X  ansi("me");
  1411. X
  1412. X  USER.level = 0;
  1413. X  if(USER.id == 1) USER.level = 10; /* POSTMASTER-Account */
  1414. X
  1415. X  if (arg[0] != '*') {
  1416. X    sprintf(s, "%s", arg);
  1417. X    s[14] = '\0';
  1418. X    strcpy(USER.sh_name, s);
  1419. X    USER.level = WRITE_EX_LEV;
  1420. X  }
  1421. X  else USER.sh_name[0] = '\0';
  1422. X
  1423. X  sprintf(USER.name, "%s", POSTER.name);
  1424. X  sprintf(USER.passwort, "%s", POSTER.passwort);
  1425. X  sprintf(USER.nick, "%s", POSTER.nick);
  1426. X  sprintf(USER.wohnort, "%s", POSTER.wohnort);
  1427. X  sprintf(USER.strasse, "%s", POSTER.strasse);
  1428. X  sprintf(USER.telefon1, "%s", POSTER.telefon1);
  1429. X  sprintf(USER.telefon2, "%s", POSTER.telefon2);
  1430. X  sprintf(USER.geburtsdatum, "%s", POSTER.geburtsdatum);   
  1431. X
  1432. X
  1433. X  INIT_UDBASE:
  1434. X
  1435. X  if(USER.terminal < 3)
  1436. X    USER.editor = 2;
  1437. X  else
  1438. X    USER.editor = 1;
  1439. X  USER.prompt = 2;
  1440. X  USER.bell = 0;
  1441. X  USER.more = 1;
  1442. X  USER.seq = 0;
  1443. X  USER.intro = 3;
  1444. X  LASTLOG = (long) dateconv( (unsigned char *) "01.01.1970");
  1445. X  strcpy(USER.lastlog, (unsigned char *) mydate( 0 ));
  1446. X  USER.lasttime = 0;
  1447. X  USER.lastmode = 2;
  1448. X  USER.leserichtung = 1;
  1449. X  USER.upratio = 0L;
  1450. X  USER.downratio = 0L;
  1451. X  USER.elapsed = 0L;
  1452. X  sprintf(USER.newsgrps, "%s", NEWS_MINIMUM);
  1453. X  strcpy(USER.account, "00.00.0000 000.00");
  1454. X
  1455. X  maybe_locked(UDSEQ, "r"); mblock(UDSEQ);
  1456. X  fp = fopen(UDSEQ, "r");
  1457. X  if (fp == NULL) {
  1458. X    nerror("postfach.c", 188, "postfach", "Datei-Lesefehler", UDSEQ);
  1459. X  }
  1460. X  fscanf(fp, "%d", &USER.id);
  1461. X  fclose(fp);
  1462. X  mbunlock(UDSEQ);
  1463. X
  1464. X  if(USER.id < 1) USER.id = 1;
  1465. X
  1466. X  maybe_locked(UDSEQ, "r"); mblock(UDSEQ);
  1467. X  fp = fopen(UDSEQ, "w");
  1468. X  if (fp == NULL) {
  1469. X    nerror("postfach.c", 196 , "postfach", "Datei-Schreibfehler", UDSEQ);
  1470. X  }
  1471. X  fprintf(fp, "%d\n", (USER.id + 1));
  1472. X  fclose(fp);
  1473. X  mbunlock(UDSEQ);
  1474. X
  1475. X  maybe_locked(UDBASE, "r"); mblock(UDBASE);
  1476. X  fd = open(UDBASE, O_RDWR);
  1477. X  if (fd == -1) {
  1478. X    nerror("postfach.c", 204, "postfach", "Datei-Lesefehler", UDBASE);
  1479. X  }
  1480. X  ll = lseek(fd, 0L, SEEK_END);
  1481. X  write(fd, (unsigned char *) &USER, sizeof(USER));
  1482. X  close(fd);
  1483. X  mbunlock(UDBASE);
  1484. X
  1485. X  sprintf(s, "%s/usr/%d", HOME, USER.id);
  1486. X  if(mkdir(s, 0777) != 0){
  1487. X    printf("\n\n%s\n\n", POS24aMSG);    
  1488. X    nerror("postfach.c", 295, "postfach", "Datei-Erstellungsfehler", s);    
  1489. X  }  
  1490. X
  1491. X  sprintf(s, "%s/usr/%d/seq", HOME, USER.id);
  1492. X  fp = fopen(s, "w");
  1493. X  fputs("1\n", fp);
  1494. X  fclose(fp);
  1495. X
  1496. X  sprintf(s, "%s/usr/%d/.hello", HOME, USER.id);
  1497. X  fp = fopen(s, "w");
  1498. X  fputs("\n", fp);
  1499. X  fclose(fp);
  1500. X
  1501. X  sprintf(s, "%s/usr/%d/.signature", HOME, USER.id);
  1502. X  fp = fopen(s, "w");
  1503. X  fputs("\n", fp);
  1504. X  fclose(fp);
  1505. X
  1506. X  if (arg[0] != '*') {
  1507. X    sprintf(s, "cp /usr/%s/%s %s/usr/%d/.signature &", USER.sh_name, SIGNATURE,
  1508. X        HOME, USER.id);
  1509. X    system(s);
  1510. X  }
  1511. X  sprintf(s, "%s/usr/%d/INDEX", HOME, USER.id);
  1512. X  fp = fopen(s, "w");
  1513. X  fprintf(fp, "%s\n", GBL05_MSG);
  1514. X  fputs("===============================================================================\n", fp);
  1515. X  fclose(fp);
  1516. X
  1517. X  if (arg[0] == '#') {
  1518. X    return; /* UDBASE installiert */
  1519. X  }
  1520. X
  1521. X  i = 0;
  1522. X  strcpy(t, USER.name);
  1523. X  while(t[i] != '\0'){
  1524. X    if(t[i] == ' ') t[i] = '.';
  1525. X    i++;
  1526. X  }
  1527. X
  1528. X  sprintf(s, "/bin/sh ./etc/alias.sh \"%s\"", t);
  1529. X  system( s );
  1530. X
  1531. X
  1532. X  sprintf(s, "%s \"%s\" (%d)", POS24_MSG, USER.name, USER.id);
  1533. X  control(s, 3);
  1534. X
  1535. X  init_user( POS25_MSG );
  1536. X  printf("\n");
  1537. X
  1538. X  sprintf(s, "%s/usr/%d/.lastletter", HOME, USER.id);
  1539. X  fp = fopen(s, "w");
  1540. X  fputs("FYI ;-)", fp);
  1541. X  fclose(fp);
  1542. X
  1543. X  sprintf(s, "%s/usr/%d/.lastsubject", HOME, USER.id);
  1544. X  fp = fopen(s, "w");
  1545. X  fprintf(fp, ">--- %s (%d) --->>", POS26_MSG, USER.id);
  1546. X  fclose(fp);
  1547. X
  1548. X  sprintf(s, "%s?", POSTMASTER );
  1549. X  brief( s );
  1550. X  
  1551. X}
  1552. X
  1553. END_OF_FILE
  1554.   if test 9214 -ne `wc -c <'src/postfach.c'`; then
  1555.     echo shar: \"'src/postfach.c'\" unpacked with wrong size!
  1556.   fi
  1557.   # end of 'src/postfach.c'
  1558. fi
  1559. if test -f 'wendy/getline.c' -a "${1}" != "-c" ; then 
  1560.   echo shar: Will not clobber existing file \"'wendy/getline.c'\"
  1561. else
  1562.   echo shar: Extracting \"'wendy/getline.c'\" \(8445 characters\)
  1563.   sed "s/^X//" >'wendy/getline.c' <<'END_OF_FILE'
  1564. X/***************************************************************************/
  1565. X/*        PROGRAMM  ix/Mbox                           */
  1566. X/*             DATEI  getline.c                           */
  1567. X/*        FUNKTIONEN  getline(), getint(), yesno()               */
  1568. X/*             AUTOR  vs (Volker Schuermann/MINIX-Version)           */
  1569. X/*  LETZTE AENDERUNG  17.11.1992                       */
  1570. X/***************************************************************************/
  1571. X
  1572. X#include <stdio.h>
  1573. X
  1574. X#ifdef _MBOX
  1575. X#include "mbox.h"
  1576. X#else
  1577. X#define BS        8
  1578. X#define CR        13
  1579. X#define LF        10
  1580. X#define CTRL_X        24
  1581. X#define CTRL_D        4
  1582. X#define BELL        7
  1583. X#define ESC        27
  1584. X#define DEL        127
  1585. X#define GBL06_MSG    'J'     
  1586. X#define GBL07_MSG    'N'    
  1587. X
  1588. Xint UMLAUT = 0;
  1589. X
  1590. X#ifdef _SYS7
  1591. X#define ENTER        13
  1592. X#else
  1593. X#define ENTER         10
  1594. X#endif
  1595. X#endif
  1596. X
  1597. X#ifndef STRING
  1598. X#define STRING 85
  1599. X#endif
  1600. X
  1601. X/***************************************************************************/
  1602. X/*      FUNKTION  getline()                           */
  1603. X/*  BESCHREIBUNG  Eine Zeile (STRING) einlesen. Beendet wird mit ENTER,       */
  1604. X/*          oder wenn die max. zulaessige Anzahl von Zeichen er-     */
  1605. X/*          reicht ist.                                               */
  1606. X/*     PARAMETER  siehe unten                                              */
  1607. X/*     RUECKGABE  Eingelesene Zeile (STRING)                   */
  1608. X/*  ---------------------------------------------------------------------  */
  1609. X/*  len     -> Anzahl der max. einzulesenden Zeichen                */
  1610. X/*                                       */
  1611. X/*  mode    ->      >0 = 7BIT                           */
  1612. X/*             0 = Kein Echo                       */
  1613. X/*                1 = Mit Echo                           */
  1614. X/*                2 = '*' als Echo                           */
  1615. X/*             3 = ':' als drittes & sechstes Zeichen (Uhrzeit)      */
  1616. X/*                 4 = '.' als drittes & sechstes Zeichen (Datum)        */
  1617. X/*              5 = Ausschliesslich BUCHSTABEN               */
  1618. X/*            10 = "bsc" vor der Eingabe "len"-mal ausgeben          */
  1619. X/*           100 = nur Zahlen (und '.', ':')                         */
  1620. X/*           1000 = String "deftext" + "bsc" ausgeben                 */
  1621. X/*         10000 = bei "0-9" als erstes Zeichen -> sofort zurueck    */
  1622. X/*                                           */
  1623. X/*  bsc     -> Mit diesem Zeichen wird geloescht               */
  1624. X/*                                           */
  1625. X/*  deftext -> Text-Vorgabe                                                */
  1626. X/*                                                               */
  1627. X/***************************************************************************/
  1628. X
  1629. Xstatic int endless;
  1630. X
  1631. Xunsigned char *getline(len, mode, bsc, deftext)
  1632. Xint len, mode;
  1633. Xint bsc;
  1634. Xunsigned char deftext[];
  1635. X{
  1636. X  static unsigned char gls[STRING];
  1637. X  int c;
  1638. X  int gli, gll;
  1639. X  int delim = '\0';
  1640. X  int matrix = 0;
  1641. X  int echo = 1, numerics = 0, defmode = 0, letters = 0;
  1642. X  int escape = 0;
  1643. X  int lenmem = len;
  1644. X  int lastwasblank = 0;
  1645. X  int siebenbit = 0;
  1646. X  
  1647. X  if (mode < 0) {
  1648. X    siebenbit++;
  1649. X    mode *= -1;
  1650. X  }
  1651. X  if (mode > 10000) {
  1652. X    escape++;
  1653. X    mode -= 10000;
  1654. X  }
  1655. X  if (mode > 1000) {
  1656. X    mode -= 1000;
  1657. X    defmode++;
  1658. X  }
  1659. X  if (mode > 100) {
  1660. X    mode -= 100;
  1661. X    numerics++;
  1662. X  }
  1663. X  if (mode > 10) {
  1664. X    mode -= 10;
  1665. X    matrix++;
  1666. X  }
  1667. X  if (mode > 2) {
  1668. X    switch(mode){
  1669. X        case 3    : delim = ':';
  1670. X              break;
  1671. X        case 4  : delim = '.';        
  1672. X              break;
  1673. X         case 5  : letters++;
  1674. X              break;
  1675. X    }
  1676. X    mode = 1;
  1677. X  }
  1678. X  echo = mode;
  1679. X
  1680. X  if (defmode != 0) {
  1681. X    if((deftext[0] < 32) || (deftext[0] > 126)) deftext[0] = '\0';
  1682. X    gll = length(deftext);
  1683. X    lenmem = len - gll;
  1684. X    if(deftext[0] != '\0'){
  1685. X        sprintf(gls, "%s", deftext);
  1686. X        printf("%s", deftext);
  1687. X    }
  1688. X    else gls[0] = '\0';
  1689. X  }
  1690. X  else {
  1691. X    gll = 0;
  1692. X    strcpy(gls, (unsigned char *) "OOPS");
  1693. X  }
  1694. X
  1695. X  if (matrix != 0) {
  1696. X    for (gli = 0; gli < lenmem; gli++) {
  1697. X        if (((gli == 2) || (gli == 5)) && (delim != '\0') && (gli != len)) {
  1698. X            printf("%c", delim);
  1699. X        }
  1700. X        else {
  1701. X            printf("%c", bsc);
  1702. X        }
  1703. X    }
  1704. X    for (gli = 0; gli < lenmem; gli++) printf("%c", BS);
  1705. X  }
  1706. X
  1707. X  do {
  1708. X
  1709. X    if (delim != '\0') {
  1710. X        if (((gll == 2) || (gll == 5)) && (gll < len)){
  1711. X            c = delim;
  1712. X        }
  1713. X        else {
  1714. X            c = getint();  
  1715. X        }
  1716. X    }
  1717. X    else {
  1718. X        c = getint();  
  1719. X    }        
  1720. X
  1721. X    if(siebenbit != 0){
  1722. X        if(c > 127) c = 0;
  1723. X    }
  1724. X
  1725. X    if (c == ESC) {
  1726. X        c = getint();  
  1727. X        c = getint();  
  1728. X        if ((c == 'A') || (c == 'B')) {
  1729. X            if (c == 'A') endless++;
  1730. X            if (c == 'B') endless--;
  1731. X            if (endless < 1) endless = 9;
  1732. X            if (endless > 9) endless = 1;
  1733. X            sprintf(gls, "%d", endless);
  1734. X            return (unsigned char *) gls;
  1735. X        }
  1736. X        if (c == 'D') c = BS;
  1737. X        if (c == 'C') c = ENTER;
  1738. X    }
  1739. X    if ((c == CTRL_X) || (c == CTRL_D) || (c == DEL)) {
  1740. X        return("<BREAK>");
  1741. X    }
  1742. X    if (c != ENTER) {
  1743. X        if ((c == BS) && (gll > 0)) {
  1744. X            if (((gll == 3) || (gll == 6)) && (delim != '\0')) {
  1745. X                gll -= 2;
  1746. X                printf("%c%c%c%c", BS, BS, bsc, BS);
  1747. X            } else {
  1748. X                gll--;
  1749. X                printf("%c%c%c", BS, bsc, BS);
  1750. X            }
  1751. X        }
  1752. X        if (numerics == 0) {
  1753. X            if (c >= 32) {
  1754. X                if(letters != 0){
  1755. X                    if((c < 'A') && (c != ' ')) c = 0;
  1756. X                    if(c > 'z') c = 0;
  1757. X                    if((c > 'Z') && (c < 'a')) c = 0;
  1758. X
  1759. X                    if(c == ' '){
  1760. X                        if(lastwasblank != 0) c = 0;
  1761. X                        lastwasblank++;
  1762. X                    }
  1763. X                    else{
  1764. X                        if(c != 0) lastwasblank = 0;
  1765. X                    }                
  1766. X
  1767. X                    /*
  1768. X                    if((c == 0) && (USER.bell == 1))
  1769. X                        printf("%c", BELL);
  1770. X                    */
  1771. X                    if(c == 0)
  1772. X                        printf("%c", BELL);
  1773. X                }
  1774. X                if(c != 0){
  1775. X                    gls[gll] = c;
  1776. X                    gll++;
  1777. X                }
  1778. X            }
  1779. X            else {
  1780. X                c = 0;
  1781. X            }
  1782. X        }
  1783. X        else {
  1784. X            if ((c == '.') || (c == ':') || ((c >= '0') && (c <= '9'))) {
  1785. X                if (((delim != '\0') && ((c == '.') || (c == ':'))) &&
  1786. X                    ((gll != 2) && (gll != 5))) {
  1787. X                    printf("%c", BELL);
  1788. X                    c = 0;
  1789. X                }
  1790. X                else {
  1791. X                    gls[gll] = c;
  1792. X                    gll++;
  1793. X                    gls[gll] = '\0';
  1794. X                }
  1795. X            }
  1796. X            else {
  1797. X                if (c != BS) printf("%c", BELL);
  1798. X                c = 0;
  1799. X            }
  1800. X        }
  1801. X        if (c != 0) {
  1802. X            if (echo == 1) printf("%c", c);
  1803. X            if (echo == 2) printf("*");
  1804. X        }
  1805. X    }
  1806. X    if (gll == 1) {
  1807. X        if ((escape != 0) && ((c > 47) && (c < 58))) {
  1808. X            gls[gll] = '\0';
  1809. X            return (unsigned char *) gls;
  1810. X        }
  1811. X    }
  1812. X
  1813. X  } while ((c != ENTER) && (gll < len));
  1814. X
  1815. X  gls[gll] = '\0';
  1816. X
  1817. X  return (unsigned char *) gls;
  1818. X}
  1819. X
  1820. X
  1821. X
  1822. X
  1823. X
  1824. X/***************************************************************************/
  1825. X/*      FUNKTION  getint()                            */
  1826. X/*  BESCHREIBUNG  Ein Zeichen wird mit Hilfe der "getch"-Funktion einge-   */
  1827. X/*          lesen. Es wird gewartet bis ein Zeichen erfasst ist.     */
  1828. X/*     PARAMETER  keine                                                    */
  1829. X/*     RUECKGABE  Eingelesenes Zeichen (INT)                   */
  1830. X/***************************************************************************/
  1831. X
  1832. X
  1833. Xint getint()
  1834. X{
  1835. X  int c;
  1836. X
  1837. X
  1838. X  if(UMLAUT != 0){
  1839. X    c = UMLAUT;
  1840. X    UMLAUT = 0;
  1841. X    return (int) c;
  1842. X  }
  1843. X
  1844. X  do{
  1845. X    c = (int) getch();
  1846. X
  1847. X#ifndef _UMLAUT
  1848. X
  1849. X    if(c > 127){
  1850. X
  1851. X        UMLAUT = 'e';
  1852. X
  1853. X        switch(c){
  1854. X            case 142 : c = 'A'; /* IBM 'Ae' */
  1855. X                   break;
  1856. X            case 153 : c = 'O'; /* IBM 'Oe' */
  1857. X                   break;
  1858. X            case 154 : c = 'U'; /* IBM 'Ue' */
  1859. X                   break;
  1860. X            case 132 : c = 'a'; /* IBM 'ae' */
  1861. X                   break;
  1862. X            case 148 : c = 'o'; /* IBM 'oe' */
  1863. X                   break;
  1864. X            case 129 : c = 'u'; /* IBM 'ue' */
  1865. X                   break;
  1866. X            case 225 : c = 's'; /* IBM 'ss' */
  1867. X                   UMLAUT = 's';
  1868. X                   break;
  1869. X
  1870. X            case 196 : c = 'A'; /* AMIGA 'Ae' */
  1871. X                   break;
  1872. X            case 214 : c = 'O'; /* AMIGA 'Oe' */
  1873. X                   break;
  1874. X            case 220 : c = 'U'; /* AMIGA 'Ue' */
  1875. X                   break;
  1876. X            case 228 : c = 'a'; /* AMIGA 'ae' */
  1877. X                   break;
  1878. X            case 246 : c = 'o'; /* AMIGA 'oe' */
  1879. X                   break;
  1880. X            case 252 : c = 'u'; /* AMIGA 'ue' */
  1881. X                   break;
  1882. X            case 223 : c = 's'; /* AMIGA 'ss' */
  1883. X                   UMLAUT = 's';
  1884. X                   break;
  1885. X
  1886. X#ifdef I_LIKE_CONFUSIONS
  1887. X                case 128 : c = 'A'; /* APPLE 'Ae' */
  1888. X                   break;
  1889. X            case 133 : c = 'O'; /* APPLE 'Oe' */
  1890. X                   break;
  1891. X            case 134 : c = 'U'; /* APPLE 'Ue' */
  1892. X                   break;
  1893. X            case 138 : c = 'a'; /* APPLE 'ae' */
  1894. X                   break;
  1895. X            case 154 : c = 'o'; /* APPLE 'oe' */
  1896. X                   break;
  1897. X            case 159 : c = 'u'; /* APPLE 'ue' */
  1898. X                   break;
  1899. X            case 167 : c = 's'; /* APPLE 'ss' */
  1900. X                   UMLAUT = 's';
  1901. X                   break;
  1902. X#endif /* _CONFUSION */
  1903. X            default  : UMLAUT = 0;
  1904. X        }        
  1905. X        }
  1906. X
  1907. X  }while((c == 0) || (c > 127));
  1908. X
  1909. X#else /* _UMLAUT */
  1910. X
  1911. X  }while(c == 0);
  1912. X
  1913. X#endif /* _UMLAUT */
  1914. X
  1915. X
  1916. X  return (int) c;
  1917. X}
  1918. X
  1919. X
  1920. X
  1921. X
  1922. X/***************************************************************************/
  1923. X/*      FUNKTION  yesno()                           */
  1924. X/*  BESCHREIBUNG  Die Zeichen "j", "J", "n" oder "N" werden ausschliess-   */
  1925. X/*          lich eingelesen und zurueckgegeben.                       */
  1926. X/*     PARAMETER  keine                                                       */
  1927. X/*     RUECKGABE  Eines der Zeichen (siehe oben) (INT)               */
  1928. X/***************************************************************************/
  1929. X
  1930. Xint yesno()
  1931. X{
  1932. X  int c;
  1933. X
  1934. X  do {
  1935. X    c = getint();
  1936. X    if (c >= 97) c -= 32;
  1937. X    if ((c != GBL06_MSG) && (c != GBL07_MSG)) c = 0;
  1938. X  } while (c == 0);
  1939. X
  1940. X  printf("%c", c);
  1941. X
  1942. X  return (int) c;
  1943. X}
  1944. X
  1945. X
  1946. END_OF_FILE
  1947.   if test 8445 -ne `wc -c <'wendy/getline.c'`; then
  1948.     echo shar: \"'wendy/getline.c'\" unpacked with wrong size!
  1949.   fi
  1950.   # end of 'wendy/getline.c'
  1951. fi
  1952. echo shar: End of archive 11 \(of 15\).
  1953. cp /dev/null ark11isdone
  1954. MISSING=""
  1955. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
  1956.     if test ! -f ark${I}isdone ; then
  1957.     MISSING="${MISSING} ${I}"
  1958.     fi
  1959. done
  1960. if test "${MISSING}" = "" ; then
  1961.     echo You have unpacked all 15 archives.
  1962.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1963. else
  1964.     echo You still must unpack the following archives:
  1965.     echo "        " ${MISSING}
  1966. fi
  1967. exit 0
  1968. exit 0 # Just in case...
  1969.