home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / obrn-a_1.5_lib.lha / oberon-a / source2.lha / Source / 3rdParty / ums.mod < prev   
Encoding:
Text File  |  1995-01-01  |  19.3 KB  |  622 lines

  1. (* UMS interface for Oberon-A
  2. ** Modified for Oberon-A Release 1.5 by Frank Copeland
  3. *)
  4.  
  5. <* STANDARD- *> <* INITIALISE- *> <* MAIN- *>
  6. <*$ CaseChk-  IndexChk- LongVars+ NilChk-  *>
  7. <*$ RangeChk- StackChk- TypeChk-  OvflChk- *>
  8.  
  9. MODULE [2] ums;
  10.  
  11. IMPORT SYS := SYSTEM, Kernel, Utility, Exec, Intuition;
  12.  
  13. CONST
  14.   name = "ums.library";
  15.  
  16. VAR
  17.   base * : Exec.LibraryPtr;
  18.  
  19. TYPE
  20.   (* msgs are identified by the following type *)
  21.   NUM *         = LONGINT;
  22.  
  23.   (* general types *)
  24.  
  25. CONST
  26.   MaxMsgs *     = MAX(NUM);
  27.   NumFields *   = 128;
  28.  
  29. TYPE
  30.   APTR *        = Exec.APTR;
  31.   STRPTR* = Exec.STRPTR;
  32.  
  33.   oldMsg *      = ARRAY 16 OF STRPTR;
  34.   oldMsgPtr *   = POINTER TO oldMsg;
  35.  
  36.   MsgTextFields* = ARRAY NumFields OF STRPTR;
  37.   MessageInfo*  = RECORD
  38.                     hdrLen*     : LONGINT;
  39.                     txtLen*     : LONGINT;
  40.                     date*       : LONGINT;
  41.                     up*, dn*,
  42.                     lt*, rt*    : LONGINT;
  43.                     globalStat* : SET;
  44.                     userStat*   : SET;
  45.                     loginStat*  : SET;
  46.                     hardLink*   : LONGINT;
  47.                     softLink*   : LONGINT;
  48.                   END;
  49.  
  50. CONST
  51.  
  52.    (* enumeration of fields in an UMS-message *)
  53.  
  54.    msgText *    =  0;
  55.    fromName *   =  1;
  56.    fromAddr *   =  2;
  57.    toName *     =  3;
  58.    toAddr *     =  4;
  59.    msgID *      =  5;
  60.    creationDate*=  6;
  61.    receiveDate* =  7;
  62.    refID *      =  8;
  63.    group *      =  9;
  64.    subject *    = 10;
  65.    attributes * = 11;
  66.    comments *   = 12;
  67.    organization*= 13;
  68.    distribution*= 14;
  69.    folder*      = 15;
  70.    fidoID *     = 16;
  71.    mausID *     = 17;
  72.    replyGroup * = 18;
  73.    replyName *  = 19;
  74.    replyAddr *  = 20;
  75.    fidoText *   = 32;
  76.    errorText *  = 33;
  77.    newsreader * = 34;
  78.  
  79.  
  80.   (* user status-bits *)
  81.  
  82.   archive *   = 4;  (* msg should be archived, don't delete *)
  83.   junk *      = 5;  (* negative selection, inheritance suggested *)
  84.   postPoned * = 6;  (* to be read again, (but not now) *)
  85.   selected *  = 7;  (* positive selection, inheritance suggested *)
  86.   filtered *  = 15; (* msg has been processed by filter,
  87.                        'selected' and 'junk' have been properly set *)
  88.  
  89.   Old *         =  8; (* user has already read this Message *)
  90.   Read *        =  Old;
  91.   WriteAccess * =  9; (* user may change or delete this message *)
  92.   ReadAccess *  = 10; (* user may read this message *)
  93.   ViewAccess *  = 11; (* user may read the header of this message *)
  94.   Owner *       = 12; (* user 'owns' (wrote) this message *)
  95.  
  96.   ProtectedUserFlags*= {WriteAccess,ReadAccess,ViewAccess,Owner};
  97.  
  98.   (* global status-bits *)
  99.  
  100.   Deleted *     = 0; (* msg is really deleted *)
  101.   Expired *     = 1; (* msg has expired and may be deleted *)
  102.   Exported *    = 2; (* msg has been exported *)
  103.   Orphan *      = 3; (* msg could not be exported *)
  104.   Link *        = 4; (* within a ring of linked msgs *)
  105.   HardLink *    = 5; (* link is hardLink *)
  106.  
  107.   ProtectedGlobalFlags*= {Deleted,Exported,Orphan,Link,HardLink};
  108.  
  109. (*** Errors ***)
  110.  
  111. CONST
  112.   ok*           =  0;
  113.   unknown*      =  1;
  114.  
  115.   codeMissing*  = 100;
  116.   forbiddenCode*= 101;
  117.   noWriteAccess*= 102;
  118.   noReader*     = 103;
  119.   noExporter*   = 104;
  120.   badLink*      = 105;
  121.   noWork*       = 106;
  122.   noSysop*      = 107;
  123.   badChange*    = 108;
  124.  
  125.   dupe*         = 200;
  126.   noReadAccess* = 201;
  127.   noViewAccess* = 202;
  128.   msgCorrupted* = 203;
  129.   noHdrSpace*   = 204;
  130.   noSuchMsg*    = 205;
  131.   badName*      = 206;
  132.   badTag*       = 207;
  133.   missingTag*   = 208;
  134.   noSuchUser*   = 209;
  135.   notFound*     = 210;
  136.   autoBounce*   = 211;
  137.   msgDeleted*   = 212;
  138.   noNetAccess*  = 213;
  139.   badPattern*   = 214;
  140.   badVarname*   = 215;
  141.   fsFull*       = 216;
  142.   noMsgMem*     = 217;
  143.   missingIndex* = 218;
  144.  
  145.   serverTerminated*= 300;
  146.   cantWrite*    = 301;
  147.   cantRead*     = 302;
  148.   wrongMsgPtr*  = 303;
  149.   serverNotFree*= 304;
  150.   idCountProb*  = 305;
  151.   noLogin*      = 306;
  152.   wrongServer*  = 307;
  153.   noMem*        = 308;
  154.   wrongTask*    = 309;
  155.  
  156.  
  157.   (* tag-values *)
  158.  
  159.   typeSTRPTR    = 2000H;
  160.   typeVARPAR    = 4000H;
  161.  
  162.  
  163.   (** tags for WriteUMSMsg() **)
  164.  
  165.   (*  add 'typeVARPAR' for ReadUMSMsg()  *)
  166.   (*  no 'typeVARPAR' for WriteUMSMsg()  *)
  167.  
  168.   tagMsgNum *           =  1 + Utility.user;
  169.  
  170.   tagMsgDate *          =  4 + Utility.user;
  171.                                 (* don't usually use when writing!      *)
  172.                                 (* Using tagMsgDate with WriteUMSMsg()  *)
  173.                                 (* has a very special meaning.          *)
  174.   tagChainUp *          =  7 + Utility.user;
  175.   tagHardLink *         = 14 + Utility.user;
  176.   tagSoftLink *         = 15 + Utility.user;
  177.  
  178.   tagAutoBounce *       = 65 + Utility.user;
  179.                                 (* when writing:                                *)
  180.                                 (* data # 0: server returns error 'autoBounce', *)
  181.                                 (*           but still keeps the Msg and sends  *)
  182.                                 (*           it to the sysops.                  *)
  183.   tagHdrFill *          = 66 + Utility.user;
  184.                                 (* when writing: how much bytes to be reserved  *)
  185.   tagTxtFill *          = 67 + Utility.user;
  186.                                 (*               for header and text            *)
  187.   tagNoUpdate *         = 69 + Utility.user;
  188.                                 (* data = 0: (default) set 'Old'-Flag when      *)
  189.                                 (*           reading or writing                 *)
  190.                                 (* data = 1: don't touch 'Old'-Flag             *)
  191.   tagHide *             = 70 + Utility.user;
  192.                                 (* for writing:                                 *)
  193.                                 (* data = 0: default                            *)
  194.                                 (* data = 1: msg only accessible by exporters   *)
  195.                                 (* data = 2: msg only accessible by users       *)
  196.  
  197.   tagMsgText *          =  256 + typeSTRPTR + Utility.user;
  198.   tagFromName *         = tagMsgText + 1;
  199.   tagFromAddr *         = tagMsgText + 2;
  200.   tagToName *           = tagMsgText + 3;
  201.   tagToAddr *           = tagMsgText + 4;
  202.   tagMsgID *            = tagMsgText + 5;
  203.   tagCreationDate *     = tagMsgText + 6;
  204.   tagReceiveDate *      = tagMsgText + 7;
  205.   tagRefID *            = tagMsgText + 8;
  206.   tagGroup *            = tagMsgText + 9;
  207.   tagSubject *          = tagMsgText +10;
  208.   tagAttributes *       = tagMsgText +11;
  209.   tagComments *         = tagMsgText +12;
  210.   tagOrganization *     = tagMsgText +13;
  211.   tagDistribution *     = tagMsgText +14;
  212.   tagFolder *           = tagMsgText +15;
  213.   tagFidoID *           = tagMsgText +16;
  214.   tagMausID *           = tagMsgText +17;
  215.   tagReplyGroup *       = tagMsgText +18;
  216.   tagReplyName *        = tagMsgText +19;
  217.   tagReplyAddr *        = tagMsgText +20;
  218.   tagFidoText *         = tagMsgText +32;
  219.   tagErrorText *        = tagMsgText +33;
  220.   tagNewsreader *       = tagMsgText +34;
  221.  
  222.   (* tagMsgText+15 .. tagMsgText+127 are also usable as text-fields *)
  223.  
  224.   tagTextFields *       = 513 + Utility.user;
  225.                                 (* datatype: POINTER TO MsgTextFields *)
  226.  
  227.  
  228.   (** tags for ReadUMSMsg() **)
  229.  
  230.   (*  add 'typeVARPAR' for ReadUMSMsg()  *)
  231.   (*  no 'typeVARPAR' for WriteUMSMsg()  *)
  232.  
  233.   tagRMsgNum *          =  1 + Utility.user;
  234.  
  235.   tagRHdrLength *       =  2 + Utility.user + typeVARPAR;
  236.   tagRTxtLength *       =  3 + Utility.user + typeVARPAR;
  237.   tagRMsgDate *         =  4 + Utility.user + typeVARPAR;
  238.   tagRChainUp *         =  7 + Utility.user + typeVARPAR;
  239.   tagRChainDn *         =  8 + Utility.user + typeVARPAR;
  240.   tagRChainLt *         =  9 + Utility.user + typeVARPAR;
  241.   tagRChainRt *         = 10 + Utility.user + typeVARPAR;
  242.   tagRGlobalFlags *     = 11 + Utility.user + typeVARPAR;
  243.   tagRUserFlags *       = 12 + Utility.user + typeVARPAR;
  244.   tagRLoginFlags *      = 13 + Utility.user + typeVARPAR;
  245.   tagRHardLink *        = 14 + Utility.user + typeVARPAR;
  246.   tagRSoftLink *        = 15 + Utility.user + typeVARPAR;
  247.  
  248.   tagRDateStyle *       = 64 + Utility.user;
  249.                                 (* style for receiveDate when reading:          *)
  250.                                 (* data = 0: no receiveDate                     *)
  251.                                 (* data = 1: emulate old-style receiveDate      *)
  252.   tagRIDStyle *         = 68 + Utility.user;
  253.                                 (* style for Message-ID                         *)
  254.                                 (* data = 0: real Message-ID                    *)
  255.                                 (* data = 1: old style dec-number               *)
  256.   tagRNoUpdate *        = 69 + Utility.user;
  257.                                 (* data = 0: (default) set 'Old'-Flag when      *)
  258.                                 (*           reading or writing                 *)
  259.                                 (* data = 1: don't touch 'Old'-Flag             *)
  260.  
  261.   tagRMsgText *         =  256 + typeSTRPTR + typeVARPAR + Utility.user;
  262.   tagRFromName *        = tagRMsgText + 1;
  263.   tagRFromAddr *        = tagRMsgText + 2;
  264.   tagRToName *          = tagRMsgText + 3;
  265.   tagRToAddr *          = tagRMsgText + 4;
  266.   tagRMsgID *           = tagRMsgText + 5;
  267.   tagRCreationDate *    = tagRMsgText + 6;
  268.   tagRReceiveDate *     = tagRMsgText + 7;
  269.   tagRRefID *           = tagRMsgText + 8;
  270.   tagRGroup *           = tagRMsgText + 9;
  271.   tagRSubject *         = tagRMsgText +10;
  272.   tagRAttributes *      = tagRMsgText +11;
  273.   tagRComments *        = tagRMsgText +12;
  274.   tagROrganization *    = tagRMsgText +13;
  275.   tagRDistribution *    = tagRMsgText +14;
  276.   tagRFolder *          = tagRMsgText +15;
  277.   tagRFidoID *          = tagRMsgText +16;
  278.   tagRMausID *          = tagRMsgText +17;
  279.   tagRReplyGroup *      = tagRMsgText +18;
  280.   tagRReplyName *       = tagRMsgText +19;
  281.   tagRReplyAddr *       = tagRMsgText +20;
  282.   tagRFidoText *        = tagRMsgText +32;
  283.   tagRErrorText *       = tagRMsgText +33;
  284.   tagRNewsreader *      = tagRMsgText +34;
  285.  
  286.   (* tagRMsgText+15 .. tagRMsgText+127 are also usable as text-fields *)
  287.  
  288.   tagRMsgInfo *         = 512 + Utility.user;
  289.                                 (* datatype: POINTER TO MessageInfo *)
  290.   tagRTextFields *      = tagRMsgInfo + 1;
  291.                                 (* datatype: POINTER TO MsgTextFields *)
  292.  
  293.   tagRReadHeader *      = tagRMsgInfo + 2;
  294.                                 (* read all header-fields *)
  295.   tagRReadAll *         = tagRMsgInfo + 3;
  296.                                 (* read all text-fields *)
  297.  
  298.  
  299.   (** tags for UMSSelect()  **)
  300.  
  301.   tagSelSet *           = 1024 + Utility.user;
  302.                                 (* flags to set on selected msgs *)
  303.   tagSelUnset *         = tagSelSet + 1;
  304.                                 (* flags to clear *)
  305.   tagSelWriteGlobal *   = tagSelSet + 2;
  306.                                 (* change global flags, not user-flags *)
  307.   tagSelWriteLocal *    = tagSelSet + 3;
  308.                                 (* change login-local flags, not user-flags *)
  309.   tagSelWriteUser *     = tagSelSet + 4+typeSTRPTR;
  310.                                 (* change other user's flags *)
  311.  
  312.   tagSelStart *         = tagSelSet + 8;
  313.                                 (* process only msgs AFTER this one *)
  314.   tagSelStop *          = tagSelSet + 9;
  315.                                 (* process only msgs BEFORE this one *)
  316.  
  317.   (* the following are mutual-exclusiv *)
  318.   (*   use only one of the following operations,   *)
  319.   (*   otherwise unpredictable things may happen!  *)
  320.  
  321.   tagSelReadGlobal *    = tagSelSet +10;
  322.                                 (* examine global flags, not user-flags *)
  323.   tagSelReadLocal *     = tagSelSet +11;
  324.                                 (* examine login-local flags, not user-flags *)
  325.   tagSelReadUser *      = tagSelSet +12+typeSTRPTR;
  326.                                 (* examine other user's flags *)
  327.   tagSelMask *          = tagSelSet +16;
  328.                                 (* select msgs, that's flags    *)
  329.   tagSelMatch *         = tagSelSet +17;
  330.                                 (*   ANDed with mask equal match *)
  331.   tagSelParent *        = tagSelSet +18;
  332.                                 (* examine parent's flags *)
  333.  
  334.   tagSelDate *          = tagSelSet +19;
  335.                                 (* select msgs younger than this date *)
  336.  
  337.   tagSelTree *          = tagSelSet +20;
  338.                                 (* select whole tree this msg is in *)
  339.  
  340.   tagSelSubTree *       = tagSelSet +21;
  341.                                 (* select sub-tree this msg is root of *)
  342.  
  343.   tagSelMsg *           = tagSelSet +22;
  344.                                 (* select a msg specified by number *)
  345.  
  346.   tagSelQuick *         = tagSelSet +23;
  347.                                 (* quick select enabled *)
  348.   (* tagMsgText .. tagMsgText+127 are also allowed for selecting *)
  349.  
  350.  
  351.   (** tags for UMSSearch() **)
  352.  
  353.   tagSearchLast *       = 2048 + Utility.user;
  354.                                 (* number of LAST msg not to search *)
  355.   tagSearchQuick *      = tagSearchLast+ 1;
  356.                                 (* quick searches enabled *)
  357.  
  358.   tagSearchGlobal *     = tagSearchLast+ 2;
  359.                                 (* examine global flags instead of user-flags*)
  360.   tagSearchLocal *      = tagSearchLast+ 3;
  361.                                 (* examine login-local flags, not user-flags *)
  362.   tagSearchUser *       = tagSearchLast+ 4+typeSTRPTR;
  363.                                 (* examine other user's flags *)
  364.   tagSearchDirection *  = tagSearchLast+ 5;
  365.                                 (* set search direction *)
  366.                                 (*  0 = default  *)
  367.                                 (*  1 = forward  *)
  368.                                 (* -1 = backward *)
  369.   tagSearchPattern *    = tagSearchLast + 6;
  370.                                 (* string in tagMsgText .. tagMsgText+127 is: *)
  371.                                 (* 0: no pattern, just a plain string    *)
  372.                                 (* 1: an AmigaDOS style pattern          *)
  373.                                 (* 2: a pattern, only if it contains     *)
  374.                                 (*    wildcards ('auto-detect patterns') *)
  375.  
  376.   tagSearchMask *       = tagSearchLast+16;
  377.                                 (* search a msg, that's flags   *)
  378.   tagSearchMatch *      = tagSearchLast+17;
  379.                                 (*   ANDed with mask equal match *)
  380.  
  381.   (* tagMsgText .. tagMsgText+127 are also allowed for searching *)
  382.  
  383.  
  384.   (**  tags for ReadUMSConfig(), WriteUMSConfig()  **)
  385.  
  386.   tagCfgGlobalOnly *    = 3072 + Utility.user;
  387.                                 (* read or write only global config,         *)
  388.                                 (* thus must not be combined with tagCfgUser *)
  389.   tagCfgName *          = tagCfgGlobalOnly+ 1 + typeSTRPTR;
  390.                                 (* name of config var to read or write       *)
  391.   tagCfgUser *          = tagCfgGlobalOnly+ 2 + typeSTRPTR;
  392.                                 (* name of user to read/write locals from/to *)
  393.  
  394.  
  395.   (**  tags for ReadUMSConfig()  **)
  396.  
  397.   tagCfgUserName *      = tagCfgGlobalOnly+ 3 + typeSTRPTR;
  398.                                 (* alias to get realname from                *)
  399.   tagCfgNextVar *       = tagCfgGlobalOnly+ 4 + typeSTRPTR;
  400.                                 (* get name of next var                      *)
  401.  
  402.  
  403.   (**  tags for WriteUMSConfig()  **)
  404.  
  405.   tagCfgDump *          = tagCfgGlobalOnly+16 + typeSTRPTR;
  406.                                 (* write current settings to a file *)
  407.   tagCfgData *          = tagCfgGlobalOnly+17 + typeSTRPTR;
  408.                                 (* data to write to specified var   *)
  409.  
  410.  
  411.  
  412.   (***  functions ***)
  413.  
  414. PROCEDURE Login* [base,-30]
  415.   ( user[2]   : ARRAY OF CHAR;
  416.     passwd[3]  : ARRAY OF CHAR )
  417.   : LONGINT;
  418.  
  419. PROCEDURE Logout* [base,-36]
  420.   ( account[2]    : LONGINT );
  421.  
  422. PROCEDURE DumpConfig* [base,-114]
  423.   ( account[2]: LONGINT );
  424.  
  425. PROCEDURE ErrNum* [base,-120]
  426.   ( account[2]: LONGINT )
  427.   : INTEGER;
  428.  
  429. PROCEDURE ErrTxt* [base,-126]
  430.   ( account[2]: LONGINT )
  431.   : STRPTR;
  432.  
  433. PROCEDURE DeleteMsg* [base,-132]
  434.   ( account[2]: LONGINT;
  435.     MsgNum[3] : NUM )
  436.   : BOOLEAN;
  437.  
  438. PROCEDURE ChangeAttributes* [base,-138]
  439.   ( account[2]: LONGINT;
  440.     MsgNum[3] : NUM;
  441.     att[4]    : ARRAY OF CHAR )
  442.   : BOOLEAN;
  443.  
  444. PROCEDURE NextStatus* [base,-144]
  445.   ( account[2]: LONGINT;
  446.     from[3]   : NUM;
  447.     mask[4]   : SET;
  448.     status[5] : SET )
  449.   : NUM;
  450.  
  451. PROCEDURE SetStatus* [base,-162]
  452.   ( acc[2]   : LONGINT;
  453.     MsgNum[3] : NUM;
  454.     unset[4]  : SET;
  455.     set[5]: SET);
  456.  
  457. PROCEDURE PrevStatus* [base,-168]
  458.   ( acc[2]   : LONGINT;
  459.     from[3]   : NUM;
  460.     mask[4]   : SET;
  461.     status[5] : SET )
  462.   : NUM;
  463.  
  464. PROCEDURE SelStatus* [base,-174]
  465.   ( acc[2]   : LONGINT;
  466.     set[3]    : SET;
  467.     unset[4]  : SET;
  468.     mask[5]   : SET;
  469.     status[6] : SET )
  470.    : NUM;
  471.  
  472. PROCEDURE SelGroup* [base,-180]
  473.   ( acc[2]   : LONGINT;
  474.     set[3]    : SET;
  475.     unset[4]  : SET;
  476.     group[5]  : ARRAY OF CHAR )
  477.   : NUM;
  478.  
  479. PROCEDURE GetStatus* [base,-186]
  480.   ( acc[2]   : LONGINT;
  481.     MsgNum[3] : LONGINT )
  482.   : SET;
  483.  
  484. PROCEDURE FlushUMS* [base,-192] ();
  485.  
  486. PROCEDURE CleanMB* [base,-198] () : INTEGER;
  487.  
  488. PROCEDURE QuitUMS* [base,-204] ();
  489.  
  490.  
  491. (*** V8: ***)
  492.  
  493. PROCEDURE UMSARexxQuery* [base,-210] ();
  494.  
  495. (*** V9: ***)
  496.  
  497. PROCEDURE ExportedMsg* [base,-234]
  498.   ( acc[2]   : LONGINT;
  499.     num[3]    : LONGINT );
  500.  
  501. PROCEDURE CannotExport* [base,-240]
  502.   ( acc[2]   : LONGINT;
  503.     num[3]    : LONGINT;
  504.     error[4]  : ARRAY OF CHAR )
  505.   : BOOLEAN;
  506.  
  507. PROCEDURE LogUMS* [base,-246]
  508.   ( acc[2]   : LONGINT;
  509.     level[4]  : LONGINT;
  510.     format[5] : ARRAY OF CHAR;
  511.     args[6]   : ARRAY OF SYS.BYTE );
  512.  
  513. PROCEDURE LogUms* [base,-246]
  514.   ( acc[2]   : LONGINT;
  515.     level[4]  : LONGINT;
  516.     format[5] : ARRAY OF CHAR;
  517.     args[6].. : LONGINT );
  518.  
  519. PROCEDURE UMSRLogin* [base,-252]
  520.   ( server[2]    : ARRAY OF CHAR;
  521.     user[3]   : ARRAY OF CHAR;
  522.     passwd[4] : ARRAY OF CHAR )
  523.   : LONGINT;
  524.  
  525. PROCEDURE WriteUMSMsg* [base,-258]
  526.   ( acc[2]   : LONGINT;
  527.     tagItems[3]: ARRAY OF Utility.TagItem )
  528.   : LONGINT;
  529.  
  530. PROCEDURE WriteUMSMsgTags* [base,-258]
  531.   ( acc[2]   : LONGINT;
  532.     tagItems[3]..: Utility.Tag )
  533.   : LONGINT;
  534.  
  535. PROCEDURE ReadUMSMsg* [base,-264]
  536.   ( acc[2]   : LONGINT;
  537.     tagItems[3]: ARRAY OF Utility.TagItem )
  538.   : BOOLEAN;
  539.  
  540. PROCEDURE ReadUMSMsgTags* [base,-264]
  541.   ( acc[2]   : LONGINT;
  542.     tagItems[3]..: Utility.Tag )
  543.   : LONGINT;
  544.  
  545. PROCEDURE FreeUMSMsg* [base,-270]
  546.   ( acc[2]   : LONGINT;
  547.     msgNum[3] : LONGINT );
  548.  
  549. PROCEDURE UMSSelect* [base,-276]
  550.   ( acc[2]   : LONGINT;
  551.     tagItems[3]: ARRAY OF Utility.TagItem )
  552.   : LONGINT;
  553.  
  554. PROCEDURE UMSSelectTags* [base,-276]
  555.   ( acc[2]   : LONGINT;
  556.     tagItems[3]..: Utility.Tag )
  557.   : LONGINT;
  558.  
  559. PROCEDURE UMSSearch* [base,-282]
  560.   ( acc[2]   : LONGINT;
  561.     tagItems[3]: ARRAY OF Utility.TagItem )
  562.   : LONGINT;
  563.  
  564. PROCEDURE UMSSearchTags* [base,-282]
  565.   ( acc[2]   : LONGINT;
  566.     tagItems[3]..: Utility.Tag )
  567.   : LONGINT;
  568.  
  569. PROCEDURE ReadUMSConfig* [base,-288]
  570.   ( acc[2]: LONGINT;
  571.     tagItems[3]: ARRAY OF Utility.TagItem )
  572.   : STRPTR;
  573.  
  574. PROCEDURE ReadUMSConfigTags* [base,-288]
  575.   ( acc[2]: LONGINT;
  576.     tagItems[3]..: Utility.Tag )
  577.   : STRPTR;
  578.  
  579. PROCEDURE FreeUMSConfig* [base,-294]
  580.   ( acc[2]   : LONGINT;
  581.     str[3]    : STRPTR);
  582.  
  583. PROCEDURE WriteUMSConfig* [base,-300]
  584.   ( acc[2]: LONGINT;
  585.     tagItems[3]: ARRAY OF Utility.TagItem )
  586.   : BOOLEAN;
  587.  
  588. PROCEDURE WriteUMSConfigTags* [base,-300]
  589.   ( acc[2]: LONGINT;
  590.     tagItems[3]..: Utility.Tag )
  591.   : BOOLEAN;
  592.  
  593. PROCEDURE PrivateServerCall* [base,-306]
  594.   ( command[2]: LONGINT;
  595.     arg[3]    : APTR )
  596.   : LONGINT;
  597.  
  598. <*$LongVars-*>
  599.  
  600. (*-----------------------------------*)
  601. PROCEDURE* [0] CloseLib (VAR rc : LONGINT);
  602.  
  603. BEGIN
  604.   IF base # NIL THEN Exec.CloseLibrary (base) END;
  605. END CloseLib;
  606.  
  607. (*-----------------------------------*)
  608. PROCEDURE [0] OpenLib * (mustOpen : BOOLEAN);
  609.  
  610. BEGIN
  611.   IF base = NIL THEN
  612.     base := Exec.OpenLibrary (name, 0);
  613.     IF base # NIL THEN Kernel.SetCleanup (CloseLib)
  614.     ELSIF mustOpen THEN HALT (100)
  615.     END
  616.   END
  617. END OpenLib;
  618.  
  619. BEGIN
  620.   base := NIL
  621. END ums.
  622.