home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / ncr9800 / mcs_defs.h < prev    next >
C/C++ Source or Header  |  2020-01-01  |  7KB  |  167 lines

  1. /*           mcs_defs_h                   */
  2.  
  3.  
  4. #include <stdio.h>
  5. #include <ctype.h>
  6.  
  7. #define COMPVER 0x01        /* Compiler version 1. */
  8. #define MESGS 40            /* Number of messages in outmesg array. */
  9. #define BUF 50
  10. #define MSGBUF 80           /* Maximum length of the message buffers */
  11.                             /* DRE 013190 - changed from 110 TO 80 */
  12. #define PWDLEN 10           /* Password buffer length. */
  13. #define RESP_EOT 0x1e       /* Response message End-Of-Text character. */
  14. #define PASSWD "PASSWORD"   /* Password for enabling and disabling. */
  15. #define PRT_FILE "SPOOLFILE"
  16. #define IN_TERM   "INPUT"
  17. #define OUT_TERM  "OUTPUT"
  18. #define QUEUENAME "THE_QUEUE"
  19. #define iowriter if (iowrite) prt_iowriter
  20. #define printriow if (iowrite) printreciow
  21. #define OFF 0
  22. #define ON 1
  23. #define YES 'Y'
  24. #define NO 'N'
  25. #define MESG 0              /* Boolean for testing messages. */
  26. #define VARESP 1            /* Boolean for testing variable responses. */
  27. #define RESP 2              /* Boolean for testing responses. */
  28. #define S 0                 /* Regular send. */
  29. #define SX25 1              /* Send SX25. */
  30.  
  31. /* Defines for ParBlock structures. */
  32. #define IPPHASE 0x49        /* Input phase. */
  33. #define OPPHASE 0x4f        /* Output phase. */
  34. #define TERMPHASE 0x54      /* Input terminal phase. */
  35. #define NODATA(x) x |= 0x01 /* No data was available - return (bit 1 set) */
  36. #define EXITFG(x) x |= 0x02 /* Suspend if data is not available (bit 2 set) */
  37. #define NOENDKEY 0          /* Partial segment, user specified. */
  38. #define INTEGESI 0x01       /* End of segment, user specified. */
  39. #define INTEGEMI 0x02       /* End of message, user specified. */
  40. #define INTEGEGI 0x03       /* End of group, user specified. */
  41. #define ESI 0x53            /* End of segment, compiler generated. */
  42. #define EMI 0x4d            /* End of message, compiler generated. */
  43. #define EGI 0x47            /* End of group, compiler generated. * */
  44. #define AFTER 0x41          /* Advance after message display. */
  45. #define BEFORE 0x42         /* Advance before message display. * */
  46. #define LINE 0x4c           /* Line advancing. */
  47. #define PAGE 0x50           /* Page advancing. * */
  48. #define HEXMNEM 0           /* Mnemonic is a string of hex. */
  49. #define ASCIIMNEM 1         /* Mnemonic is a string of ascii. * */
  50.  
  51. #ifndef lint
  52. extern void MSGBUILD();
  53. extern void \:FINISH();
  54. extern void MCS\:ENABLE();
  55. extern void MCS\:DSABLE();
  56. extern void MCS\:SEND();
  57. extern void MCS\:RECEIV();
  58. extern void MCS\:ACCEPT();
  59. extern void SESS\:MGT();
  60. #endif /*NOT LINT*/
  61.  
  62. FILE *fp;                   /* File pointer for the spool file. */
  63.  
  64. int iowrite;                /* Iowriter. */
  65. int nosends;                /* Number of sends in a session. */
  66.  
  67. char outmesg[MESGS][MSGBUF];/* Array of output messages. */
  68. char outterm[BUF];          /* Output terminal name. */
  69. char interm[BUF];           /* Input terminal name. */
  70. char iobuff[MSGBUF];        /* Buffer for send messages to iowriter. */
  71.  
  72. char *mcs_fgets();
  73.  
  74. struct SendSMTD{
  75.   char ijn[BUF];
  76.   char ihc[BUF];
  77. } SendSMTD;
  78.  
  79. struct OutputCD {           /* Output communication descriptor. */
  80.   char destcnt[4];          /* Destination count. */
  81.   char textlen[4];          /* Text length. */
  82.   char statkey[2];          /* Status key. */
  83.   char errkey;              /* Error key. */
  84.   char symdest[12];         /* Symbolic destination. */
  85.   struct ExOutCD {          /* Extended output CD. */
  86.     char xoformat;          /* Extended output format. */
  87.     char tcfunction[3];     /* TC function. */
  88.     char tcqualifier[3];    /* TC qualifier. */
  89.     char tcoutput_reset;    /* TC output_reset */
  90.     char xofiller[33];      /* Extended output filler. */
  91.   } ExOutCD;
  92. } OutCD;
  93.  
  94. struct InputCD {            /* Input communication descriptor. */
  95.   char q[12];               /* Input CD queue. */
  96.   char symq1[12];           /* Symbolic Sub-queue 1. */
  97.   char symq2[12];           /* Symbolic Sub-queue 2. */
  98.   char symq3[12];           /* Symbolic Sub-queue 3. */
  99.   char mdate[6];            /* Message date. */
  100.   char mtime[8];            /* Message time. */
  101.   char source[12];          /* Symbolic source. */
  102.   char len[4];              /* Text length. */
  103.   char endkey;              /* End key. */
  104.   char statkey[2];          /* Status key. */
  105.   char msgcnt[6];           /* Message count */
  106.   struct ExInCD {           /* Extended input CD. */
  107.        char xiformat;          /* Extended input format. */
  108.        char xistatus[2];       /* TC status. */
  109.        char xipassthru[10];    /* TC pass through. */
  110.        char xifiller[27];      /* Extended input filler. */
  111.   } ExInCD;
  112. } InCD;
  113.  
  114.  
  115. struct mnemonik {           /* Mnemonic structure in each parameter block. */
  116.    char type;               /* Mnemonic type field. */
  117.    char *address;           /* Address of mnemonic. */
  118.                             /* DRE 013190 - change to char ptr */
  119.                             /* CHANGE PEG 012990        */
  120.                             /* CAUSED AN ALIGNMENT PROBLEM DUE TO
  121.                                RANDOMNESS OF BYTE PLACEMENT       */
  122.                             /* for all purposes a four byte array */
  123.  
  124. };
  125.  
  126. struct SParBlck {           /*   parameter block for sending. */
  127.   short length;             /* User message area length. */
  128.   char complver;            /* Compiler version. */
  129.   char linenum;             /* Number of lines to advance. */
  130.   char indicator;           /* Send or receive end key. */
  131.   char advancing;           /* Type of advancing. */
  132.   char position;            /* Mode of advancing. */
  133.   char sendcount;           /* Send destination count. */
  134. /* struct mnemonik mnemonic; */ /* Mnemonic structure field. */
  135.   char mnemonic[4];                                      /* DRE 020990 */
  136. } SParBlock;
  137.  
  138. struct RParBlck {           /*   parameter block for receiving. */
  139.   short length;             /* User message area length. */
  140.   char complver;            /* Compiler version. */
  141.   char avail;               /* Bit flags - receive data availability. */
  142.   char indicator;           /* Send or receive end key. */
  143.   char filler[7];           /* PEG 012990
  144.                                SIMILAR TO MCDAID'S DELETED SEVEN
  145.                                UNUSED BYTES FOR PROPER DEFINE         */
  146.  
  147. } RParBlock;
  148.  
  149. struct ParBlck {           /*   parameter block for enable/disable. */
  150.   char denabltyp;           /* Enable or disable type. */
  151.   char passwdlen;           /* Password length. */
  152.   char complver;            /* Compiler version. */
  153.   char destcount;           /* Enable/disable/purge destination count. */
  154.   char filler [8];
  155. } ParBlock;
  156.  
  157. struct SMParBlck {          /* Session Management Parameter Block. */
  158.   char format;
  159.   char action[3];           /* EST, DIS, ABT, 1, 2, or 3. */
  160.   char pbstatus[4];         /* Parameter block status. */
  161.   char symdest[12];         /* Symbolic destination. */
  162.   char input;               /* Allow input. */
  163.   char output;              /* Allow output. */
  164.   char status[2];           /* Return status. */
  165.   char exstatus[4];         /* Return extended status. */
  166. } SMParBlock;
  167.