home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / win100b / wkkdeb.h < prev    next >
C/C++ Source or Header  |  1991-10-19  |  3KB  |  159 lines

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