home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 545b.lha / RexxHS / aztec / README < prev    next >
Encoding:
Text File  |  1991-09-07  |  2.4 KB  |  59 lines

  1.  
  2. Info on RexxHS support library and Manx 5.0 users
  3. -------------------------------------------------
  4.  
  5. To build:
  6.  
  7.     Type "rx amake" to copy the required .c and .h files from
  8.     the parent directory.  It will run "make" automatically to
  9.     build the library.
  10.  
  11.     (Don't worry about all the override warnings when you link
  12.      the library... it's OK.)
  13.  
  14. How it works:
  15.  
  16.     The only file you should really be interested in is the
  17.     file rexxhs.c, since all the other files are just there to
  18.     do the shared library gunk and their use is documented in
  19.     the Amiga Programmer's Guide to ARexx.
  20.  
  21.     Basically the function library has exactly one entry point,
  22.     called the dispatch function.  ARexx calls this entry point
  23.     and passes a pointer to a RexxMsg structure (the same one that
  24.     gets sent to function hosts) in one of the registers.  The
  25.     gunk files stuff this pointer on the stack and call the "real"
  26.     dispatch function in rexxhs.c.  This function takes the packet,
  27.     gets the function name and the number of arguments, and then
  28.     compares those against a list of functions it supports.  If
  29.     it supports the desired function, it calls the appropriate internal
  30.     code.  Otherwise it sets the primary result field to 5 and
  31.     the secondary result field to 1 and returns back to ARexx.  ARexx
  32.     now continues with the search through the Library List...
  33.  
  34.     The function implementations in rexxhs.c are pretty straightforward.
  35.     The only toughie is ReplyToCall... as it turns out, ARexx keeps a
  36.     list of packets that you retrieve using GetPkt().  When you call
  37.     Reply(), ARexx removes the appropriate packet from its internal list.
  38.     This is so that when the ARexx program exits, any unreplied packets
  39.     can be replied to... so ReplyToCall() has to also remove a packet
  40.     from the list.  Luckily, the structure is documented in the ARexx
  41.     header files so it's not too obscure... the FindPacket() function
  42.     in rexxhs.c does all the dirty work, making sure the pointer you
  43.     pass to it is really a packet in the "waiting for reply" list.
  44.  
  45.  
  46. Things to do:
  47.  
  48.     -- Better error checking and number conversion.
  49.     -- Add a PktAction() function which would return a string representing
  50.        the actual action in a packet (RXCOMM, RXFUNC, etc.).  Right
  51.        now all you can do is assume that if IsFunctionCall() returns
  52.        false then a packet is an RXCOMM packet.
  53.  
  54.  
  55. Enjoy....
  56.  
  57. Eric Giguere
  58. BIX     : giguere
  59. Internet: giguere@csg.uwaterloo.ca