home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff355.lzh / RexxHostLib / PreInclude.c < prev    next >
C/C++ Source or Header  |  1990-06-12  |  3KB  |  96 lines

  1. /* $Revision Header * Header built automatically - do not edit! *************
  2.  *
  3.  *    (C) Copyright 1990 by MXM
  4.  *
  5.  *    Name .....: PreInclude.c
  6.  *    Created ..: Sunday 25-Mar-90 12:57
  7.  *    Revision .: 0
  8.  *
  9.  *    Date            Author          Comment
  10.  *    =========       ========        ====================
  11.  *    25-Mar-90       Olsen           Created this file!
  12.  *
  13.  * $Revision Header ********************************************************/
  14.  
  15.     /* Main system includes. */
  16.  
  17. #include <libraries/dosextens.h>
  18. #include <exec/execbase.h>
  19. #include <exec/resident.h>
  20. #include <exec/memory.h>
  21. #include <exec/alerts.h>
  22.  
  23.     /* Rexx definitions. */
  24.  
  25. #include <rexx/rxslib.h>
  26.  
  27.     /* Amiga prototypes/pragmas. */
  28.  
  29. #include <functions.h>
  30.  
  31.     /* BCPL 'NULL'. */
  32.  
  33. #define ZERO 0L
  34.  
  35.     /* The rexx host library base. */
  36.  
  37. struct RexxHostBase
  38. {
  39.     struct Library     LibNode;
  40.     struct RxsLib    *RexxSysBase;
  41. };
  42.  
  43.     /* A rexx host, somewhat more than a simple MsgPort. */
  44.  
  45. struct RexxHost
  46. {
  47.     struct MsgPort    rh_Port;
  48.  
  49.     ULONG        rh_SpecialID;
  50.     ULONG        rh_Reserved[4];
  51. };
  52.  
  53.     /* Prototypes for all library functions. */
  54.  
  55. struct RexxHost *    CreateRexxHost(STRPTR);
  56. VOID *            DeleteRexxHost(struct RexxHost *);
  57. LONG            SendRexxCommand(struct RexxHost *,STRPTR,STRPTR,STRPTR);
  58. VOID            FreeRexxCommand(struct RexxMsg *);
  59. VOID            ReplyRexxCommand(struct RexxMsg *,LONG,LONG,STRPTR);
  60. STRPTR            GetRexxCommand(struct RexxMsg *);
  61. STRPTR            GetRexxArg(struct RexxMsg *);
  62. LONG            GetRexxResult1(struct RexxMsg *);
  63. LONG            GetRexxResult2(struct RexxMsg *);
  64. STRPTR            GetToken(STRPTR,LONG *,STRPTR,LONG);
  65. LONG            GetStringValue(STRPTR);
  66. STRPTR            BuildValueString(LONG,STRPTR);
  67. LONG            RexxStrCmp(STRPTR,STRPTR);
  68.  
  69.     /* Library calls for rexx host lib. */
  70.  
  71. #pragma amicall(RexxHostBase, 0x1e, CreateRexxHost(a0))
  72. #pragma amicall(RexxHostBase, 0x24, DeleteRexxHost(a0))
  73. #pragma amicall(RexxHostBase, 0x2a, SendRexxCommand(a0,a1,a2,a3))
  74. #pragma amicall(RexxHostBase, 0x30, FreeRexxCommand(a0))
  75. #pragma amicall(RexxHostBase, 0x36, ReplyRexxCommand(a0,d0,d1,a1))
  76. #pragma amicall(RexxHostBase, 0x3c, GetRexxCommand(a0))
  77. #pragma amicall(RexxHostBase, 0x42, GetRexxArg(a0))
  78. #pragma amicall(RexxHostBase, 0x48, GetRexxResult1(a0))
  79. #pragma amicall(RexxHostBase, 0x4e, GetRexxResult2(a0))
  80. #pragma amicall(RexxHostBase, 0x54, GetToken(a0,a1,a2,d0))
  81. #pragma amicall(RexxHostBase, 0x5a, GetStringValue(a0))
  82. #pragma amicall(RexxHostBase, 0x60, BuildValueString(d0,a0))
  83. #pragma amicall(RexxHostBase, 0x66, RexxStrCmp(a0,a1))
  84.  
  85.     /* Protos for assembly language string routines. */
  86.  
  87. LONG StrLen(char *);
  88. VOID StrCpy(char *,char *);
  89. VOID StrNCpy(char *,char *,LONG);
  90.  
  91.     /* And some more pragmas. */
  92.  
  93. #pragma regcall(StrLen(a0))
  94. #pragma regcall(StrCpy(a0,a1))
  95. #pragma regcall(StrNCpy(a0,a1,d0))
  96.