home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / win100 / winckc.h < prev    next >
C/C++ Source or Header  |  1991-10-19  |  4KB  |  160 lines

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