home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / utils / sercli.shr / sercli / doc / sercli.doc < prev    next >
Encoding:
Text File  |  1993-06-16  |  30.4 KB  |  773 lines

  1. COPYRIGHT & DISTRIBUTION
  2.     sercli (an Amiga .device <-> FIFO interface tool)
  3.     Copyright (C) 1993  Richard Rauch
  4.  
  5.     This program is free software; you can redistribute it and/or modify it
  6.     under the terms of the GNU General Public License as published by the
  7.     Free Software Foundation; either version 2 of the License, or (at your
  8.     option) any later version.
  9.  
  10.     This program is distributed in the hope that it will be useful, but
  11.     WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.     General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License along
  16.     with this program; if not, write to the Free Software Foundation, Inc.,
  17.     675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19.     The author may be reached via email as `Richard Rauch @ 1:280/304.3'.
  20.     Using paper mail, `Richard Rauch, 11415 Grant Drive, Overland Park KS
  21.     66210'.
  22.  
  23.     There are no known copyright or patent inringements by this archive.
  24.  
  25.     Note that as of this writing, I consider sercli significantly far from
  26.     complete.  For this reason, I think that to wantonly distribute it
  27.     would be a waste of storage space on BBSses and may leave an undue bad
  28.     taste in some people's mouths...so I would appreciate limited
  29.     distribution (that doesn't mean you _can't_ spread it, just that I
  30.     don't expect it, and wouldn't spread it myself, at this point).
  31.  
  32.     Amiga(tm) is a registered trademark of Commodore-Amiga.
  33.     ARexx is a trademark of William S. Hawes.
  34.     Aztec is probably a trademark of Manx
  35.     DICE is a trademark of Matt Dillon.
  36.     SAS is alegedly a trademark of SAS
  37.  
  38. DISCLAIMER
  39.     An attempt has been made to be accurate, helpful, thorough,
  40.     understandable, and useful, in preparing the software and
  41.     documentation.  If I succeeded, that is good.  If not, you got what you
  42.     paid for. I accept no responsibility for what you do with this
  43.     information/software.  As the end user, you must accept full
  44.     resonsibility for deciding if this archive is safe or useful.
  45.  
  46.     Essentially, any authoritative statement made in here should be taken
  47.     with an implicit crystal of NaCl.
  48.  
  49.     I am not aware of any patent or copyright infringements through the
  50.     provided information (software and documentation).
  51.  
  52.     "I probably don't know what I'm talking about."  ---rkr.
  53.  
  54. If you are already familiar with sercli:
  55.     See the file, "changes.text," for an overview of the update.  It's
  56.     changing slowly...for a long time I had little real direction for it;
  57.     now that I have a _use_ for sercli, I am meandering around trying to
  58.     locate a problem with the FIFO interface.  Thus the RCS files are
  59.     large, and sercli has features it doesn't really need.  C'est la vi.
  60.  
  61.     =============
  62.  
  63. What IS this thing?
  64.     This is the documentation for sercli, a program that is able to a shell
  65.     through the serial port.  To be more precise, it establishes a link
  66.     between Dillon's FIFO and any serial-like Amiga .device.  Dillon's
  67.     FIFO must be present, as must serial.device (or some other appropriate
  68.     .device).
  69.  
  70.     `Serial-like' means that it is intended to work with an Amiga .device
  71.     that is written to look & act like the standard Amiga serial.device.  I
  72.     have only tested it with the standard serial.device and with my own
  73.     nulser.device; it should work with CBM's multi-serial board, internal
  74.     modems, etc., but I have never used such devices.  It probably would
  75.     NOT work with the parallel.device (though there is great similarity),
  76.     or most other .devices.  Normally, you would want only ONE sercli
  77.     running per serial port (at the maximum); sercli and FIFO are flexible
  78.     enough to let you do this, though you must specify a unique name for
  79.     each such port -- this is BOTH the FIFO id and the name for an ARexx
  80.     port opened by sercli.  The sercli binary should be Pure -- i.e., you
  81.     can make it Resident (I've not tested this, mostly because I only run
  82.     one copy of it & besides, I am changing it often enough that a Resident
  83.     copy would be more annoying than useful).
  84.  
  85.     For information on the FIFO side, and FIFO's features, see Matt
  86.     Dillon's FIFO software.
  87.  
  88.     Using sercli's ARexx port, you can change MOST of sercli's
  89.     configuration on-the-fly.  The ARexx port does not support serial i/o
  90.     operation at this time; some obvious enhancements to the ARexx
  91.     interface could stand to be made, but I first intend to fix its
  92.     problems with trying to cause FIFO to generate an EOF event.
  93.  
  94.     sercli is more of a TOOL than an application.  It is intended to give
  95.     easier access to the serial port for languages like AmigaBASIC, ARexx,
  96.     and XLisp, which otherwise have limited (or non-existant) access to the
  97.     serial port.  Control is achieved via a config file, and then by using
  98.     FIFO: to talk to sercli (and thence to the serial port) as if to a
  99.     CON:, NewCON:, or RAW: window.
  100.  
  101.  
  102. What do you need in order to use sercli?
  103.     You mean, besides an Amiga?  *grin*
  104.  
  105.     You will need FIFO: in order to use sercli.  (look for fifodv32.lzh or
  106.     so)
  107.  
  108.     ARexx is strongly recommended, though not absolutely necessary in
  109.     theory; I've never tested it in an ARexxless system.
  110.  
  111.     A technical bent (if not necessarily competance...*grin*) and a grasp
  112.     of such terms as stdio, shell scripts, and stdio redirection ARE
  113.     probably a necessity.
  114.  
  115. How do you set sercli up?
  116.     sercli is run from the a CLI or Shell.  You will almost certainly need
  117.     to write a config file (or modify an existing config file; at least one
  118.     should be included in this archive).  At a minimum, you will probably
  119.     have to specifiy a bps value (see `bps' in the config docs below).  If
  120.     you run multiple copies of sercli at once, each will need a unique id
  121.     tag as well (see `id' below).
  122.  
  123.     If you will be running multiple copies of sercli at once, try making
  124.     sercli Resident (sercli is small, but it does take some space).
  125.  
  126.     When running the sercli program, it receives 1 (optional) command line
  127.     argument: the name of a config file to use.  If no such name is given,
  128.     then sercli will use a default name of `sercli_config' in the current
  129.     directory.
  130.  
  131.     sercli should NOT be launched from the WorkBench.  As I've compiled it
  132.     with DICE, sercli should simly exit harmlessly if you try to run it
  133.     from the WB.  (If you are a programmer who cares about making it run
  134.     from the WB, and if you have DICE, then adding WB support should be
  135.     trivial.  Personally, I don't like WB & won't waste my time supporting
  136.     it -- and I've used v1.1, v1.2, v1.3, and v2.1 of WB, so when I say I
  137.     don't like it, you can be assured that I know whereof I speak.)
  138.  
  139.     Examples of starting sercli and where sercli will look for config info:
  140.     sercli
  141.         Look for `sercli_config' in CURRENT dir
  142.  
  143.     sercli /another_dir/custom_sercli_config
  144.         Look for /another_dir/custom_sercli_config
  145.  
  146.     foo:bar/sercli
  147.         Look for `sercli_config' in CURRENT dir
  148.  
  149.  
  150. The sercli config file:
  151.     The config file should consist solely of config statements & comments.
  152.     Config statements are defined by the form
  153.  
  154.     <keyword>':' <0 or more associated values>
  155.  
  156.     E.g.:
  157.     bps: 1200
  158.     exclusive:
  159.         NOTE: The keyword must be the _first_ thing on the line (NO
  160.         LEADING SPACES); I've indented the keywords in this document to
  161.         set them off clearly from the rest of the text.  Keywords MUST
  162.         also be immediately followed by the colon (no trailing spaces.
  163.  
  164.     Similarly, any embedded spaces _must_ be spaces (some text editors may
  165.     try to use tabs for spaces wherever possible; conceivably, this could
  166.     be a problem).
  167.  
  168.     Anything following the colon is assumed to be "parameter(s)" for the
  169.     keyword. If more data follow the colon than the keyword needs, the
  170.     excess will be ignored (not flagged as an error).
  171.         NOTE: I used all lower case for the keywords for the sake of
  172.         readability; sercli does not care if you use upper or lower
  173.         case, though, or if you mix'n'match.  Whatever grabs you.
  174.  
  175.     Later ALL keywords will be given in a complete list of all keywords
  176.     supported by serlcli (config and ARexx) describing what they do, what
  177.     paramters they take, and whether they are config or ARexx keywords.
  178.     (See the section "What are these keywords", below).
  179.  
  180.     The keywords valid ONLY in the CONFIG FILES are:
  181.     id
  182.     device name
  183.     device unit
  184.     bps
  185.     bits
  186.     sbits
  187.     7wire
  188.     3wire
  189.     xon/xoff
  190.     no xon/xoff
  191.     shared
  192.     exclusive
  193.     no rad boogie
  194.     rad boogie
  195.     no parity
  196.     odd parity
  197.     even parity
  198.     window title
  199.     window size
  200.     alert ser
  201.     alert loc
  202.     no alert ser
  203.     no alert loc
  204.  
  205.     COMMENTS are presently defined as any line BEGINNING with any of the
  206.     following characters:
  207.     <Nul>, <Space>, <Tab>, <Line Feed>, <Vertical Tab>, <Carriage
  208.     Return>, '*', '#', ';', ':'
  209.  
  210.     The nice thing about this rather loose definition, is that it covers
  211.     blank lines, lines with plain text (as long as they are indented), and
  212.     common comment delimiters from assembly, LISP, and makefiles; the
  213.     <VERTICAL TAB> is an anomoly that I don't remember the reasoning for,
  214.     and the <NUL> shouldn't be appearing in plain text files, but is
  215.     appropriate for internal reasons.
  216.  
  217. Once I've got it going, what do I do?
  218.     Once sercli is going, you can use it & FIFO to allow any Shell program
  219.     to talk to the serial port.  If you have a dumb terminal, or an
  220.     already-going connection to someone over a modem, or a null-modem to
  221.     another computer, you could just launch a new shell through the FIFO
  222.     (see FIFO docs).  Of course, you can also do more or less the same
  223.     thing with the standard AUX: device, except that AUX: is not able to be
  224.     configured at start-up, nor does it have an ARexx port, or a window.
  225.     *grin*  Also, AUX: does not seem to work quite correctly; last I tried
  226.     it (under OS v1.3), the remote guy was able to run one command, then
  227.     crash my system.  Nice idea, Commodore, but you need to make these
  228.     things _work_.  Also, AUX: is only for the built-in serial.device...
  229.  
  230.     I also suggest extreme care in the way you talk to your modem.  If your
  231.     modem is configured to echo data sent to it in `command mode', and if
  232.     you set FIFO up to echo data back as well, you can get feedback between
  233.     FIFO and the modem, each echoing anything the other says; having done
  234.     this with the AUX: device, I can tell you that you don't want to do
  235.     this!  (AUX: crashed when this happened to me.)
  236.  
  237.     There are two ways to get around this:
  238.     Configure your modem to NOT echo data in command mode.
  239.  
  240.     Set FIFO to not echo data sent to it.
  241.  
  242.     The latter is probably the more desirable.    In the bin directory of
  243.     this archive, you will find two commands.  One is called set_raw, and
  244.     the other set_con.    When you run set_raw from a Shell CON: window, it
  245.     will put that window into `DOS RAW' mode (for lack of a better term).
  246.     In this mode, several things will be differet:
  247.     You cannot see what you type.  This is GOOD; echo has been turned
  248.     off; if you arrange for the program to run in the context of a
  249.     FIFO, it will set that FIFO stream to RAW mode.
  250.  
  251.     All line-editing is gone.  This can be viewed as good or bad.  If
  252.     you type a partial command, feel that you hit a wrong key, and try
  253.     to back-space, then ^H (back-space) characters will be _stored_ as
  254.     part of the command you were typing.  This can be good or bad,
  255.     depending.  Generally, it's bad.
  256.  
  257.     The <Return> key will now not work quite as it should.    To
  258.     terminate a command in RAW mode, you must send a <Ctrl>-<J> (^J
  259.     character).
  260.  
  261.     In order to get back to the normal `cooked' mode, do the following:
  262.     hit ^J (to make sure you are starting a new command line)
  263.  
  264.     type the word
  265.         set_con
  266.  
  267.     ...if you make ANY mistakes, hit ^J and start again.
  268.  
  269.     hit ^J again (to end this command)
  270.  
  271.     set_raw/set_con can be useful in some scripts (particularly in scripts
  272.     that use FIFO/sercli to talk to your modem).
  273.  
  274.     I have also found them useful for other programs that normally require
  275.     RAW: windows.  E.g., XLisp and an old Conquest game both opened custom
  276.     RAW: windows; with a quick patch to make them use * rather than
  277.     RAW:..., and then running them in a script of the form:
  278.     set_raw
  279.     <command>
  280.     set_con
  281.  
  282.     ...the programs would run from the same CLI/Shell window as was used to
  283.     invoke them -- which incidentally means that they could be run over
  284.     FIFO, through sercli, to your modem, and out into the real world for
  285.     remote users to play with.
  286.  
  287.  
  288.     With FIFO you might be able to turn off one of the FIFO flags (`c' for
  289.     cooked, I think) in order to simply not have a cooked stream.  This
  290.     would have a similar effect to using set_raw, but I don't think it's
  291.     reversable...
  292.  
  293.  
  294.     Now, you have ONE last problem: When you use NewShell or NewCLI to
  295.     create a new CLI/Shell process, you will get a little banner text as
  296.     the first line on the new window:
  297.     New Shell process <N>
  298.  
  299.     ...where <N> is the CLI Process number.  Since the Shell has just
  300.     started, it's probably in cooked mode.  That banner gets sent out to
  301.     the serial port, then echoed back, then echoed back, then echoed back,
  302.     then echoed back...  OUCH!
  303.  
  304.     To solve this, I suggest another little util of mine: rlaunch. In
  305.     effect, rlaunch is a NewCLI command that:
  306.     Does not print a `New Shell process <N>' banner.
  307.     Does not have a default command/script to execute on startup.
  308.     Lets you execute ANY or NO command (not just a script) on startup.
  309.     Lets you wait on completion of the new Process.
  310.  
  311.     If you view the last one as a problem (which is reasonable; if you
  312.     create a new process, you generally _don't_ want to wait on it to
  313.     finish), then you can simply Run rlaunch.  Poof, no problem.
  314.  
  315.     rlaunch takes EXACTLY TWO parameters: A name of a stream through which
  316.     to run a command, and a command to execute.  Pass an empty string ("")
  317.     for the command if you want to do nothing in particular when starting
  318.     up.
  319.  
  320.     The following commands are essentially synonymous:
  321.     newshell fifo:sercli/rwkecs
  322.     run rlaunch fifo:sercli/rwekcs "execute s:shell-startup"
  323.  
  324.     The only difference is that the `New Shell process <N>' banner is
  325.     omitted.  Substitute an alternate script (`sercl-startup', say, which
  326.     perhaps calls `set_raw'), and you are no longer in danger getting stuck
  327.     in a feedback loop.
  328.  
  329.     PROBABLY, any script you run through sercli should end with an `EndCLI'
  330.     or `EndShell'.
  331.  
  332. ARexx support?
  333.     ARexx commands may be sent to sercli.  The name of the ARexx message
  334.     port is determined by the config file.  If no such id string is placed
  335.     in the config file, a default value is used.
  336.  
  337.     ARexx commands to sercli are exactly the same as config file lines,
  338.     except that the words "config file line" should be replaced with
  339.     "sercli ARexx command."  Additionally, some config keywords are not
  340.     valid as ARexx commands and vice versa, though the two mostly overlap.
  341.     Lastly, some ARexx commands return values.    The following ARexx
  342.     commands are acknowledged (see the "How do you set sercli up?" (above)
  343.     and "What are these keywords?" (below) sections for more info):
  344.     bps
  345.     bits
  346.     sbits
  347.     7wire
  348.     3wire
  349.     xon/xoff
  350.     no xon/xoff
  351.     shared
  352.     exclusive
  353.     no rad boogie
  354.     rad boogie
  355.     no parity
  356.     odd parity
  357.     even parity
  358.     window title
  359.     window size
  360.     alert ser
  361.     alert loc
  362.     no alert ser
  363.     no alert loc
  364.  
  365. What are these keywords?
  366.     Except where otherwise marked, all keywords are valid regarless of
  367.     where they are received from (ARexx or config file).
  368.  
  369.     Some keywords are flags that engage a certain mode in sercli.  If this
  370.     is so, then there exist counter/matching keyword(s) to change sercli
  371.     back (or sometimes to another state).  For convenience, such "related"
  372.     keywords are listed together as if a single keyword.
  373.  
  374.     Note that, where a parameter is listed, it is _required_.  By saying
  375.     "default" values exist, I mean if the value is never overridden by a
  376.     config or ARexx specification, that the "default" is used.  A malformed
  377.     control (command or config) will generate an error message, but will
  378.     otherwise be ignored.
  379.  
  380.     Numeric parameters may be entered in C notation.  I.e., plain decimal
  381.     digits will be interpreted as normal base-10 (decimal) numbers; if the
  382.     number begins with a `0' followed by digit in the rainge `0'-`7', it
  383.     will be interpreted as a base-8 (octal) number; if it begins with a `0'
  384.     followed by a `x' or `X', it will be interpreted as a base-16
  385.     (hexadecimal) number.
  386.  
  387.     If multiple, CONFLICTING controls are given in a sequence, each
  388.     overrides its predecessor.
  389.  
  390.     Other details may vary according to what serial port you are using (I
  391.     am only familiar with the built-in one and a software null modem of my
  392.     own devising).
  393.     id                        (CONFIG only)
  394.         id: <string>
  395.  
  396.         <string> becomes a rendevous(sp) point for FIFO: usage and
  397.         ARexx message ports.
  398.  
  399.         DEFAULT: value is "sercli" (without the quotes, but
  400.         _lower_case_).
  401.  
  402.     device name                    (CONFIG only)
  403.         device name: <some.device>
  404.  
  405.         <some.device> is the name of the device that is to be used for
  406.         i/o.  User "serial.device" for the built-in serial port.
  407.  
  408.         DEFAULT: "serial.device".
  409.  
  410.     device unit                    (CONFIG only)
  411.         device unit: <number>
  412.  
  413.         <number> is the unit number of the device to be used.  Use 0 or
  414.         1 for the built-in serial port.  With my nulser.device, 0 for
  415.         `first suitable', or else a 1 or a 2.
  416.  
  417.         DEFAULT: 0.
  418.  
  419.     bps
  420.         bps: <number>
  421.  
  422.         <number> is the Bits Per Second.  Often this goes under the
  423.         name "baud" (but sercli only responds to "bps"; "baud" is
  424.         foreign to sercli).
  425.  
  426.         Actual _bytes_/second should be about 1/10th the bps setting.
  427.  
  428.         DEFAULT: 0 (this may result in an error, or in a default
  429.         setting; dunno & haven't toyed with it.)
  430.  
  431.     bits
  432.         bits: <number>
  433.  
  434.         <number> is how many bits per byte; generally should be 7 or 8.
  435.  
  436.         NOTE: This value corresponds to _both_ read bits and write
  437.         bits, which are seperate under Preferences; sercli canNOT
  438.         seperately set these.
  439.  
  440.         DEFAULT: 8
  441.  
  442.     sbits
  443.         sbits: <number>
  444.  
  445.         Stop bits per byte; generally should be 1 or 2.
  446.  
  447.         DEFAULT: 1
  448.  
  449.     7wire
  450.     3wire
  451.         7wire:
  452.         3wire:
  453.  
  454.         These turn on/off RTS/CTS (hardware) serial handshaking.
  455.  
  456.         In order to conduct serial communications, you have at least 3
  457.         wires (transmit data, receive data, and a ground).  Data are
  458.         sent in bursts of one "byte", delimited by
  459.         stop-bits/start-bits, perhaps with a parity bit.  Because of
  460.         this linear communication (one bit at a time), this is called
  461.         "serial" communication.
  462.  
  463.         By using additional wires (run in parallel), the data flow can
  464.         be controlled.  In particular, Request To Send/Clear To Send
  465.         connections are used (RTS/CTS).  This should prevent the other
  466.         end from sending us too much information when our input buffer
  467.         is full (and vice versa).  It is possible, however, that such
  468.         additional control flow will affect performance.
  469.  
  470.         (I dunno; I don't have much practical high-speed experience. If
  471.         you _do_ get close enough to the limits of the serial port's
  472.         throughput that 3wire/7wire makes a difference, I would think
  473.         that you are running dangerously close to losing data if you go
  474.         with 3wire, especially if your system may be put under varying
  475.         work-loads by other programs you run (can you say
  476.         "ray-trace?").)
  477.  
  478.         DEFAULT: 3wire
  479.  
  480.     xon/xoff
  481.     no xon/xoff
  482.         xon/xoff:
  483.         no xon/xoff:
  484.  
  485.         These turn on/off XON/XOFF flow controls.
  486.  
  487.         In a situation where you only have 3wire as an option, due to
  488.         the nature of the remote end, XON/XOFF may save you, in a
  489.         manner similar to RTS/CTS.
  490.  
  491.         XON/XOFF differs from RTS/CTS control in that XON/XOFF uses
  492.         special control characters (EMBEDDED in the byte-stream) rather
  493.         than seperate hardware lines.
  494.  
  495.         XON/XOFF can conflict with binary file transfers (e.g., sending
  496.         a .lzh file via ZModem).
  497.  
  498.         DEFAULT: no xon/xoff
  499.  
  500.     shared
  501.     exclusive
  502.         shared:
  503.         exclusive:
  504.  
  505.         In shared mode, sercli can share the same serial device/unit
  506.         with other applications (such as terminal software or BBSses),
  507.         provided that said applications also use shared mode.  If
  508.         shared mode is not supported by the others, you will have to
  509.         arrange that the others be at least "disconnected," if not shut
  510.         down altogether.
  511.  
  512.         NOTE: sercli doesn't fully understand sharing.  It will
  513.         (currently) try to keep it's fingers in the pie (serial port)
  514.         all the time that it is operational.  Because of the nature of
  515.         the serial port in shared mode, sercli will get pieces of the
  516.         input, while other programs will also get pieces (assuming that
  517.         the other "sharing" programs are trying to be active as well).
  518.         This IS something I intend to fix.    So, in a sense, sercli can
  519.         share, and in a sense it can't.
  520.  
  521.         DEFAULT: shared
  522.  
  523.     no rad boogie
  524.     rad boogie
  525.         no rad boogie:
  526.         rad boogie:
  527.  
  528.         The ROM Kernal Ref. describes "rad boogie" as (to paraphrase) a
  529.         mode that turns off several checks in order to perform faster.
  530.  
  531.         I do _not_ suggest using this mode lightly.  Partly I am this
  532.         way since I haven't had the opportunity to test it, and because
  533.         turning off checking may lead to more trouble than help, as I
  534.         suggested with 3wire vs 7wire mode above.  This feature is
  535.         offered because it was easy, and may be of some use.
  536.  
  537.         I suggest you read the RKMs to find out what rad boogie does
  538.         (or read your serial device's manual/contact the manufacturer,
  539.         if you're not using the built-in port)...or simply not use it
  540.         until well exapserated.
  541.  
  542.         DEFAULT: no rad boogie
  543.  
  544.     no parity
  545.     odd parity
  546.     even parity
  547.         no parity:
  548.         odd parity:
  549.         even parity:
  550.  
  551.         When data is sent one bit at a time, it is possible to sum the
  552.         list of bits (each bit a 1 or a 0).  The resulting sum will be
  553.         either even or odd.  Isn't that just amazing?
  554.  
  555.         With parity on (odd parity OR even parity), an additional bit
  556.         (the Parity bit!) is sent with each byte (along with the 7 or 8
  557.         data bits and the 1 or 2 stop bits).  Depending on whether the
  558.         sum is odd or is even, and depending on whether odd or even
  559.         parity is selected, the Parity bit will be set to 1 or 0, in
  560.         order to make the whole come out as an odd or even sum.  The
  561.         parity bit is allegedly used to help detect errors in
  562.         transmission.
  563.  
  564.         Whether to use Even or Odd Parity, depends on the conventions
  565.         of the system you are connecting to (neither is any better than
  566.         the other).
  567.  
  568.         Usually, one just uses NO parity.
  569.  
  570.         DEFAULT: no parity
  571.  
  572.     window title                    (ARexx only)
  573.         window title: Calling SomeBBS
  574.  
  575.         "window title" is a MISNOMER; it really only sets the content
  576.         of a string within the window title, not the whole title.
  577.  
  578.         RETURNS: The _entire_ (currently) old title is returned.
  579.  
  580.         DEFAULT: no user
  581.  
  582.     window size                    (ARexx only)
  583.         window size: 640 10
  584.  
  585.         Sets the size of the window that sercli keeps while running.
  586.  
  587.         RETURNS: The old window size.
  588.  
  589.         DEFAULT: computed according to initial text dimensions.
  590.  
  591.     alert ser
  592.     alert loc
  593.     no alert ser
  594.     no alert loc
  595.         alert ser:
  596.         alert loc:
  597.         no alert ser:
  598.         no alert loc:
  599.  
  600.         A couple of "alert" messages were put into sercli when it was
  601.         first written.  (E.g., when exiting, a little blurb should be
  602.         printed on both the Shell window and through the serial port.)
  603.  
  604.         Different blurbs are sent to the serial & parent shell.
  605.  
  606.         The keywords aren't very well matched to their effect...  Don't
  607.         turn on `alert ser' from the config file unless you are sure
  608.         you won't get stuck in a feedback situation.
  609.  
  610.         The "loc" forms were more for symetry with the "ser" forms than
  611.         out of major value.
  612.  
  613.         More "alert" type stuff may be added later.  Possibly a
  614.         gradation of priority/significance will be used (so instead of
  615.         an on/off value for alerting ser/loc, you'd have a rating).
  616.  
  617.         The alert ser/loc settings are INDEPENDANT of one another.
  618.  
  619.         DEFAULTS:    no alert ser
  620.             alert loc
  621.  
  622. Errors.
  623.     Well, let's see...
  624.  
  625.     Detected errors are handled in one of three ways:
  626.     sercli aborts (completely exits)
  627.         This is what happens if any failure occurs while allocating
  628.         some resource.
  629.  
  630.         Most errors should result in enough info being produced that
  631.         you can find out what went wrong.  A missing (or mis-named)
  632.         config file being an exception (sercli will quitely use the
  633.         internal defaults -- I should pro'ly fix that to at least
  634.         emit a warning, _esp._ if a name was explicitly given the
  635.         file could not be opened).
  636.  
  637.         Another exception is if the ARexx port cannot be set up, or if
  638.         some allocation error occurs with the .device.  However, these
  639.         should mostly occur only if you are extremely low on RAM.
  640.  
  641.     sercli ignores the error
  642.         The only error in this class that I know of off-hand is where
  643.         the FIFO 4k buffer can be over-filled; the proper way of
  644.         handling that is start an asynch FIFO write request and block
  645.         further .device reads until the FIFO write request is replied.
  646.         Failing to this is not very harmful (data from the .device can
  647.         be lost this way, in theory), and this should eventually be
  648.         patched up.
  649.  
  650.         Nothing generally fatal is ignored to my knowledge.
  651.  
  652.     sercli produces a notification & continues on its merry way
  653.         Once the .device has been opened up, and errors that are
  654.         reported will be printed to the program's standard output
  655.         (generally, the Shell stream from which the program was
  656.         launched).
  657.  
  658.         Additionally, bad config lines & bad ARexx commands will be
  659.         handled this way.  Bad config line error messages should
  660.         include the line-number & line-content.  For now, make SURE
  661.         that you have spaces in the command/config, rather than TAB
  662.         characters; sercli can be a little picky about this stuff.
  663.  
  664. Where's sercli going?
  665.     See the file `ToDo' for a longish list.  As I write this, I'm fighting
  666.     with making sercli generate proper EOF events when the user hits ^\ or
  667.     hangs up.  Part of my problem seems to lie somewhere in my code (I
  668.     dunno where!), and part of it is a design flaw in FIFO.  If I could
  669.     find _my_ problem, I could live with the design flaw for a while.
  670.  
  671. Programmer stuff.
  672.     I'm about tapped out, I think, so I'll try to be brief.
  673.  
  674.     There is [or was] a monstrosity in serial.c/serial.h that needs to be
  675.     fixed up (a horrible name; I wrote most of serial.c last spring, and
  676.     when I came back to it this fall, I was totally stumped at what I'd
  677.     wrought...*grin*).    If you can help it, stay away from there.
  678.  
  679.     Comments in the code are relatively sparse (hey, go read one of the
  680.     "Real programmers..." text files, eh?).  Since I consider this a ways
  681.     away from being "done," I'm not too worried about the comments.
  682.  
  683.     The following pieces should be, to one degree or another, fairly
  684.     seperable from the project:
  685.     serial.c    (handles serial i/o)
  686.     errors.c    (handles error events)
  687.     rexx.c        (handles ARexx messages)
  688.     misc.c        (handles some misc. stuff)
  689.     config.c    (handles matching text to defined keywords)
  690.  
  691.     Some (ahem) of it is not as general as it could be (rexx.c has some
  692.     sercli-specific stuff in it, errors.c is not really _implemented_
  693.     generally, but could be re-implemented with linked lists for pretty
  694.     complete generality, and serial.c, is still lacking some things & using
  695.     globals (yech, ptui, right?  *e-vile grin*) ), but it all works.
  696.  
  697.     Compiling
  698.     I use DICE v2.06.34 [.40 later I think, and now v2.07.54].  The
  699.     dmakefile I use is included with the source.  I think it was at one
  700.     time compilable with Aztec, but I don't remember for certain & very
  701.     much doubt it will compile under Aztec now.
  702.  
  703.     For other compilers, note particularly that I rely on DICE's
  704.     autoinit feature, which opens the .libraries I need (like
  705.     rexxsyslib.library (redundant name!) ) automatically.  SAS and
  706.     Aztec C will need to manually do several OpenLibrary() calls and
  707.     check for failure, plus mirror with CloseLibrary() on exit.
  708.  
  709.     DICE also supports (as an option) BCPL(?)/C++ style line-comments
  710.     (// to start the comment, EOL to end it).  The source may at any
  711.     given time be lightly sprinkled with these, as they are a little
  712.     handier than block-comments for `hiding' old code.
  713.  
  714.     I also use the ANSI atexit() to set up a cleanup function; Aztec
  715.     has atexit(), but apparently it has not been in SAS until fairly
  716.     recently (something about a special "ANSI library upgrade," I've
  717.     read about), and the SAS version is still not really compliant,
  718.     according to someone on Usenet (I dunno who, sorry).
  719.  
  720.     I also use the _non-ANSI onbreak() function (I'm not very clear if
  721.     SAS supports this, but I'm pretty sure it's not in Aztec).  Since I
  722.     ONLY use this to turn off ^C aborting, you should find it fairly
  723.     easy to achieve the same net effect with your favorite compiler.
  724.  
  725.     RCS (src/rcs/#?,v) files:
  726.     These are maintained by doing a `ci -l <filename>' command.  Given
  727.     the RCS files, you should be able to produce any version of sercli
  728.     since v1.5.
  729.  
  730.     A dmake target also exists to catch `strays'.
  731.  
  732.     A dmake target also exists to assign a symbolic name to the most
  733.     recent version of each of the sercli sources.  Symbolic names are
  734.     of the form `sercli_v1_9' (which would be sercli v1.9); symbolic
  735.     names are used since the RCS versions are bumped each time a `ci'
  736.     operation is done, and thus the RCS version numbers are meaningless
  737.     -- WORSE, they have NO interrelationship; sercli.c 1.8 is NOT
  738.     necessarily the same as dmakefile 1.8.
  739.  
  740.     Symbolic names have been used for sercli RCS files for as long as
  741.     sercli has been kept in RCS.  Though older versions kept all sercli
  742.     RCS version numbers in lock-step, this has been recently fixed.
  743.  
  744.     RCS archives are only kept of the sources (not of docs).  Dunno if
  745.     it's worth changing.
  746.  
  747.     Changes (src/changes/#?) files:
  748.     Every file src/(#?.[ch]|dmakefile) has a file by the same name in
  749.     the src/changes/ dir.  When a file is significantly altered, the
  750.     changes/ file is updated to reflect this.  Changes files are used
  751.     in part to collect the doc/changes.text file, and in part to serve
  752.     as reminders about what has been done so that a `ci' comment can be
  753.     a little clearer.
  754.  
  755.     changes files are used by two dmake targets; one is to display the
  756.     logged changes when catching `stray' revisions for the RCS files.
  757.     The other is when building doc/changes.text (which results in the
  758.     changes files being emptied, BTW).
  759.  
  760.     For other stuff relating to the programming of sercli, see the ToDo
  761.     file and the src/#? files.
  762.  
  763.     =============
  764.  
  765. Richard Rauch
  766.  
  767.     11415 Grant Dr.            Fido 1:280/304.3
  768.     Overland Park, Ks. 66210
  769.  
  770.     OpenLibrary BBS: 913 338 4079
  771.  
  772.     Member of the League for Programming Freedom
  773.