home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / old / ckermit4f / ckvvms.h < prev    next >
C/C++ Source or Header  |  2020-01-01  |  3KB  |  135 lines

  1. /* DEC/CMS REPLACEMENT HISTORY, Element CKVVMS.H */
  2. /* *3    29-AUG-1989 00:32:39 BUDA "Add ^Y/^C from server mode" */
  3. /* *2    16-APR-1989 17:54:51 BUDA "Add definition of SUB_PROC buffer size" */
  4. /* *1    11-APR-1989 22:57:00 BUDA "Initial creation" */
  5. /* DEC/CMS REPLACEMENT HISTORY, Element CKVVMS.H */
  6. /*
  7.  * 002 01-Aug-1989 mab       Add partial buffer definition
  8.  * 002 08-Jul-1989 mab       Add ^C/^Y abort code to server mode
  9.  * 001 05-Mar-1989 mab     Put some common pieces in one place
  10.  */
  11.  
  12. /* C-Kermit interrupt, terminal control & i/o functions for VMS systems */
  13.  
  14. /* Mark A. Buda, Digital Equipment Corporation */
  15.  
  16. struct iosb_struct {
  17.     unsigned short status;
  18.     unsigned short size;
  19.     unsigned short terminator;
  20.     unsigned short termsize;
  21. };
  22.  
  23. struct tt_mode {
  24.     unsigned char class;
  25.     unsigned char type;
  26.     unsigned short width;
  27.     unsigned int basic : 24;
  28.     unsigned char length;
  29.     unsigned long extended;
  30. };
  31.  
  32. struct itmlst {
  33.     unsigned short len;
  34.     unsigned short code;
  35.     char *adr;
  36.     char *retlen; 
  37. };
  38.  
  39.  
  40. /*  Event flags used for I/O completion testing  */
  41. #define CON_EFN 1
  42. #define TTY_EFN 2
  43. #define TIM_EFN 3
  44. #define QIOW_EFN 4
  45. #define SUCCESS(x) ((vms_status = (x)) & 1)
  46. #define CHECK_ERR(s,x) (SUCCESS(x) ? 1 : print_msg(s))
  47.  
  48. /*
  49.  * Module CKVTIO
  50.  * Routine print_msg(sts)     ! Print VMS error message.
  51.  * define buffer sizes that are malloced at routine first call.
  52.  */
  53. #define PMSG_BUF_SIZE 255
  54. #define PMSG_MSG_SIZE PMSG_BUF_SIZE+5
  55.  
  56. /*
  57.  * Size of Sub process buffer
  58.  * This will have a direct affect on the size of a message that comes
  59.  * from the sub process mailbox.
  60.  */
  61. #define SUB_BUF_SIZE 300
  62.  
  63. /*
  64.  * Maximum length for a device name.  (does not include null terminator)
  65.  */
  66.  
  67. #define DEVNAMLEN 64
  68.  
  69. /*
  70.  * The following macro was borrowed from a posting on USENET - Thank you.
  71.  */
  72.  
  73. #define IDENT(arg) arg    /* Handy macro expands to it's arguments */
  74.  
  75. #define VSTRING(name, maxlen, init)    \
  76.     struct IDENT(name)_vs {        \
  77.     struct dsc$descriptor_s dsc;    \
  78.     unsigned short int curlen;    \
  79.     char body[maxlen];        \
  80.     } name = {{maxlen, DSC$K_DTYPE_VT, DSC$K_CLASS_VS, &name.curlen}, \
  81.     sizeof(init)-1, init}
  82.  
  83. /*
  84.  * Example of VSTRING:
  85.  *
  86.  * VSTRING(user,12,"Humpty Dumpty");
  87.  * VSTRING(line,256,"");
  88.  *
  89.  */
  90.  
  91. /*
  92.  * Used by the access function
  93.  */
  94.  
  95. #define D_OK  000        /* Delete */
  96. #define E_OK  001               /* Execute */
  97. #define W_OK  002               /* Write */
  98. #define R_OK  004               /* Read */
  99.  
  100. /*
  101.  * UCB$M_* symbols are not in a 'C' usable format.  Define this
  102.  * symbol for use in CKVTIO, when doing a getdviw()
  103.  */
  104.  
  105. #ifndef UCB$M_ONLINE
  106. #define UCB$M_ONLINE 16
  107. #endif
  108.  
  109. /*
  110.  * Used by parsedir as the flags argument
  111.  */
  112.  
  113. #define PARSE_NODE    0x001
  114. #define PARSE_DEVICE    0x002
  115. #define PARSE_DIRECTORY    0x004
  116. #define PARSE_NAME    0x008
  117. #define PARSE_TYPE    0x010
  118. #define PARSE_VERSION    0x020
  119.  
  120. /*
  121.  *
  122.  */
  123.  
  124. #define CKV_M_CTRLY (1 << ('Y'-64))
  125. #define CKV_M_CTRLC (1 << ('C'-64))
  126. #define CKV_K_CTRLC ('C'-64)
  127. #define CKV_K_CTRLY ('Y'-64)
  128.  
  129. /*
  130.  * Partial Buffer size.  This is used by zoutdump() when it gets
  131.  * an incomplete record.
  132.  */
  133.  
  134. #define PARTIAL_BUF_SIZE 1024
  135.