home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / ncr9800 / ckcdeb.h next >
C/C++ Source or Header  |  2020-01-01  |  4KB  |  175 lines

  1. /*  C K C D E B . H  */
  2.  
  3. ]/**********************************************************************
  4. *                                                   *
  5. * IVS / MCS-Kermit REL 2                                              *
  6. * source code                                                         *
  7. *                                                                     *
  8. * Change History:                                                     *
  9. *                                                                     *
  10. *                1. Modify C-Kermit(4E) source code to                *
  11. *                   produce new module for MCS/IVS-Kermit             *
  12. *                   ORIGINAL RELEASE                                  *
  13. *                   June 22, 1990                                     *
  14. *                                                                     *
  15. *                                                                     *
  16. ***********************************************************************/
  17.  
  18. /*
  19.  This file is included by all C-Kermit modules, including the modules
  20.  that aren't specific to Kermit (like the command parser and the ck?tio and
  21.  ck?fio modules.  It specifies format codes for debug(), tlog(), and similar
  22.  functions, and includes any necessary typedefs to be used by all C-Kermit
  23.  modules, and also includes some feature selection compile-time switches.
  24. */
  25. /*
  26.  Copyright (C) 1987, 1989, Trustees of Columbia University in the City of New
  27.  York. Permission is granted to any individual or institution to use, copy, or
  28.  redistribute this software so long as it is not sold for profit, provided this
  29.  copyright notice is retained.
  30. */
  31.  
  32. /*
  33.  DEBUG and TLOG should be defined in the Makefile if you want debugging
  34.  and transaction logs.  Don't define them if you want to save the space
  35.  overhead.
  36. */
  37. #ifndef DEBUG
  38. #define debug(a,b,c,d) {}
  39. #endif
  40.  
  41. #ifndef TLOG
  42. #define tlog(a,b,c,d) {}
  43. #endif
  44.  
  45. /* Formats for debug(), tlog(), etc */
  46.  
  47. #define F000 0
  48.  
  49. #define F001 1
  50. #define F010 2
  51. #define F011 3
  52. #define F100 4
  53. #define F101 5
  54. #define F110 6
  55. #define F111 7
  56.  
  57. /* Unix Version Dependencies */
  58.  
  59. /* signal() type, void or int? */
  60. #ifdef SVR3
  61. typedef void SIGTYP;            /* System V R3 and later */
  62. #else
  63. #ifdef SUNOS4
  64. typedef void SIGTYP;            /* SUNOS V 4.0 and later */
  65. #else
  66. typedef int SIGTYP;
  67. #endif
  68. #endif
  69.  
  70. /* C Compiler Dependencies */
  71.  
  72. #ifdef ZILOG
  73. #define setjmp setret
  74. #define longjmp longret
  75. #define jmp_buf ret_buf
  76. typedef int ret_buf[10];
  77. #endif /* zilog */
  78.  
  79. #ifdef PROVX1
  80. typedef char CHAR;
  81. typedef long LONG;
  82. typedef int void;
  83. #else
  84. #ifdef V7
  85. typedef char CHAR;
  86. typedef long LONG;
  87. #else
  88. #ifdef C70
  89. typedef char CHAR;
  90. typedef long LONG;
  91. #else
  92. #ifdef BSD29
  93. typedef char CHAR;
  94. typedef long LONG;
  95. #else
  96. typedef unsigned char CHAR;
  97. typedef long LONG;
  98. #endif
  99. #endif
  100. #endif
  101. #endif
  102.  
  103. #ifdef TOWER1
  104. typedef int void;
  105. #endif
  106.  
  107. /* Line delimiter for text files */
  108.  
  109. /*
  110.  If the system uses a single character for text file line delimitation,
  111.  define NLCHAR to the value of that character.  For text files, that
  112.  character will be converted to CRLF upon output, and CRLF will be converted
  113.  to that character on input during text-mode (default) packet operations.
  114. */
  115. #ifdef MAC                              /* Macintosh */
  116. #define NLCHAR 015
  117. #else                                   /* All Unix-like systems */
  118. #define NLCHAR 012
  119. #endif
  120. /*
  121.  At this point, if there's a system that uses ordinary CRLF line
  122.  delimitation AND the C compiler actually returns both the CR and
  123.  the LF when doing input from a file, then #undef NLCHAR.
  124. */
  125.  
  126. /* The device name of a job's controlling terminal */
  127. /* Special for VMS, same for all Unixes (?), not used by Macintosh */
  128.  
  129. #ifdef vms
  130. #define CTTNAM "TT:"
  131. #else
  132. #ifdef datageneral
  133. #define CTTNAM "@output"
  134. #else
  135. #define CTTNAM "/dev/tty"
  136. #endif
  137. #endif
  138.  
  139. /* Some special includes for VAX/VMS */
  140.  
  141. #ifndef vms
  142. /* The following #includes cause problems for some preprocessors. */
  143. /*
  144. #endif
  145. #ifdef vms
  146. #include ssdef
  147. #include stsdef
  148. #endif
  149. #ifndef vms
  150. */
  151. #endif
  152.  
  153. /* Program return codes for VMS, DECUS C, and Unix */
  154.  
  155. #ifdef vms
  156. #define GOOD_EXIT   (SS$_NORMAL | STS$M_INHIB_MSG)
  157. #define BAD_EXIT    SS$_ABORT
  158. #else
  159. #ifdef decus
  160. #define GOOD_EXIT   IO_NORMAL
  161. #define BAD_EXIT    IO_ERROR
  162. #else
  163. #define GOOD_EXIT   0
  164. #define BAD_EXIT    1
  165. #endif
  166. #endif
  167.  
  168. /* Special hack for Fortune, which doesn't have <sys/file.h>... */
  169.  
  170. #ifdef FT18
  171. #define FREAD 0x01
  172. #define FWRITE 0x10
  173. #endif
  174.  
  175.