AminetAminet
Search:
84794 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/misc/door_io12.lha

Mirror:Random
Showing: m68k-amigaos iconppc-amigaos iconppc-morphos iconi386-aros iconi386-amithlon iconppc-warpup iconppc-powerup icongeneric icon
No screenshot available
Short:BBS Door In/Out (Multiport)
Author: mac at gorehost.dontpanic.sub.org (Alexander Haarer)
Uploader:cybox i-online ohz north de (Stephan Schuett)
Type:dev/misc
Architecture:m68k-amigaos
Date:1996-12-07
Download:dev/misc/door_io12.lha - View contents
Readme:dev/misc/door_io12.readme
Downloads:662

Update 1.2
Hi there.. this is the Documentation ;) for the door_io.library. 1.2

History:
1.0
 - 1st release
1.1
 - I have added a routine for reading characters and specify the read length
   (BOX_getchrs)
1.2
 - Added a Function to read single characters in a BBS.library like manner (BBS.library 
   belongs to the AmBoS BBS)
   (BOX_wgetchr)
 - Fixed a bug in the Event-Handling: the Handler was called every time - if the signals
   were set or not..   
 - Improved the Documentation of the Headerfile

I have written it for all BBS-Door programmers (me included).

It should be very useful if one wants to input characters (a string) and react
on events in parallel. This is important for MultiUserDungeons (MUD) and 
related things.. I used on in a not_really_MUD named Gore. Its more a 
MUDSG .. multiuserdungeonspladdergame.. 

Well.. it is not very funny if you are typing in a command, and when you are done 
with it getting a message "a level 4711 Zombie has shaved you with a chainsaw" :))

An other Thing is the metacharacterexpander (what a word ..) 
a "#" is used as a control character. the following character tells what happens:
0 -> color black
1 -> color red
2 -> color green
3 -> color blue
4 -> color yellow
5 -> color magenta
6 -> color cyan
7 -> color white
n -> CR/LF
s -> standard colors

These packetio-routines were originally not a shared lib, but we wanted to use the
thing in a chatter-library (which will be soon available for AmBoS) and so
the door_io.library was born :)

The library and all associated stuff is copyright by A.Haarer 1995+ and it
may be freely used. It may be copied and spread on a non-profit basis.
Commercial use is prohibited without written permission by Author .. ME !! :-)

Hum.. btw this program is thingware.. you may send anything to anyone :)

_______________________________________________________________________________
Q: What is it for ??? 

A: Its a shared library that simplifies i/o operations in BBS-Cli-Doorprograms
   - You are able to wait for Keys AND incoming exec-messages in parallel !
   - You are able to specify a "carrier-lost-hook" to do cleanup when the line
     breaks down
   - it contains a metacharexpander which can generate colored output strings.
________________________________________________________________________________
Q: How does it work ? 

A: The library does it's i/o operations by dospackets and therefore can wait()
   for an input and other applicationspecific messages. The standard input() and
   output() handles are used to determine the handler process.
_________________________________________________________________________________
Q: Why should i use it ? I can also poll the input stream  !

A: - Because polling in a multitasking environment ist complete bullshit ;-))
   - Polling does slow down the whole system and is bad design, if other solutions
     are possible.
   - If you are polling single characters, you have to build a string input yourself.
   - polling suxx :)
_________________________________________________________________________________
Q: How do i use it ?

A: - Replace your string input function by BOX_getstr()

   - Replace your string output function by BOX_getstr() and format the strings
     with sprintf() when required.

   - Initialize the opened Library with BOX_start() and supply some parameters
      - meta_on           1 -> the "#" controls the colors of text output
                          0 -> the text output is not changed
      - carrier_lost_hook (optional) is called when the handler returns an error
                          (this is standard in most common bbs programs)
      - exthandler        is called when one of the specified sigbits is set  
      - sigmask           sigmask to trigger the exthandler

   - modify the signal mask by BOX_setmask() when required

   - Your carrier_lost_hook function should call BOX_stop() and close all resources of
     your program

   - YOU MUST DECLARE BOTH HOOKFUNCTIONS with __saveds OR EQUIVALENT !
     (__saveds restores the near data pointer, for some compilers its __geta4)

   - Call BOX_stop() when your program quits
_________________________________________________________________________________
Q: How contact the Author ? 

A: - Email to MAC@nasus.ohz.north.de or MAC@gorehost.dontpanic.sub.org
   - Call the Castle of Confusion BBS : +49 421 636 7544 or +49 421 636 8643


Contents of dev/misc/door_io12.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  280     632  44.3% -lh5- d060 Sep 26  1995 doorio.info
[generic]                 1811    4015  45.1% -lh5- 28ec Dec  6  1996 doorio/door_io.doc
[generic]                 2051    4426  46.3% -lh5- ec98 Dec  6  1996 doorio/door_io.dok
[generic]                  144     224  64.3% -lh5- 1bfd Sep 26  1995 doorio/door_io.fd
[generic]                 1065    2796  38.1% -lh5- 09b4 Sep 26  1995 doorio/door_io.h
[generic]                  230     486  47.3% -lh5- 9eb9 Sep  3  1995 doorio/door_io.h.info
[generic]                 2269    3928  57.8% -lh5- 5769 Sep 26  1995 doorio/door_io.library
[generic]                  114     317  36.0% -lh5- 924b Sep 26  1995 doorio/door_io_pragmas.h
[generic]                  225     486  46.3% -lh5- 5bd0 Sep  3  1995 doorio/door_io_pragmas.h.info
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         9 files    8189   17310  47.3%            Dec  7  1996
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>