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

  1. /*  C K C D E B . H  */
  2.  
  3. /*
  4.  This file is included by all C-Kermit modules, including the modules
  5.  that aren't specific to Kermit (like the command parser and the ck?tio and
  6.  ck?fio modules.  It specifies format codes for debug(), tlog(), and similar
  7.  functions, and includes any necessary typedefs to be used by all C-Kermit
  8.  modules, and also includes some feature selection compile-time switches.
  9. */
  10. /*
  11.  Copyright (C) 1985, Trustees of Columbia University in the City of New York.
  12.  Permission is granted to any individual or institution to use, copy, or
  13.  redistribute this software so long as it is not sold for profit, provided this
  14.  copyright notice is retained.
  15. */
  16.  
  17. /*
  18.  DEBUG and TLOG should be defined in the Makefile if you want debugging
  19.  and transaction logs.  Don't define them if you want to save the space
  20.  and overhead.
  21. */
  22. #ifndef DEBUG
  23. #define debug(a,b,c,d) {}
  24. #endif
  25.  
  26. #ifndef TLOG
  27. #define tlog(a,b,c,d) {}
  28. #endif
  29.  
  30. /* Formats for debug(), tlog(), etc */
  31.  
  32. #define F000 0
  33.  
  34. #define F001 1
  35. #define F010 2
  36. #define F011 3
  37. #define F100 4
  38. #define F101 5
  39. #define F110 6
  40. #define F111 7
  41.  
  42. /* Compiler dependencies */
  43.  
  44. #ifdef PROVX1
  45. typedef char CHAR;
  46. typedef long LONG;
  47. typedef int void;
  48. #else
  49. #ifdef  V7
  50. typedef char CHAR;
  51. typedef long LONG;
  52. #else
  53. #ifdef  C70
  54. typedef char CHAR;
  55. typedef long LONG;
  56. #else
  57. #ifdef BSD29
  58. typedef char CHAR;
  59. typedef long LONG;
  60. #else
  61. typedef unsigned char CHAR;
  62. #ifndef LONG_DEF
  63. typedef long LONG;
  64. #endif
  65. #endif
  66. #endif
  67. #endif
  68. #endif
  69.  
  70. #ifdef TOWER1
  71. typedef int void;
  72. #endif
  73.  
  74. /* Line delimiter for text files */
  75.  
  76. /*
  77.  If the system uses a single character for text file line delimitation,
  78.  define NLCHAR to the value of that character.  For text files, that
  79.  character will be converted to CRLF upon output, and CRLF will be converted
  80.  to that character on input.
  81. */
  82. #ifdef MAC                              /* Macintosh */
  83. #define NLCHAR 015
  84. #else                                   /* All Unix-like systems */
  85. #define NLCHAR 012
  86. #endif
  87. /*
  88.  At this point, if there's a system that uses ordinary CRLF line
  89.  delimitation AND the C compiler actually returns both the CR and
  90.  the LF when doing input from a file, then #undef NLCHAR.
  91. */
  92.  
  93. /* The device name of a job's controlling terminal */
  94. /* Special for VMS, same for all Unixes (?), not used by Macintosh */
  95.  
  96. #ifdef vax11c
  97. #define CTTNAM "TT:"
  98. #else
  99. #define CTTNAM "/dev/tty"
  100. #endif
  101.  
  102.  
  103.  
  104. /* Some special includes for VAX/VMS */
  105.  
  106. #ifdef vax11c
  107. #include ssdef
  108. #include stsdef
  109. #endif
  110.  
  111. /* Program return codes for VMS, DECUS C, and Unix */
  112.  
  113. #ifdef vax11c
  114. #define GOOD_EXIT   (SS$_NORMAL | STS$M_INHIB_MSG)
  115. #define BAD_EXIT    SS$_ABORT
  116. #else
  117. #ifdef decus
  118. #define GOOD_EXIT   IO_NORMAL
  119. #define BAD_EXIT    IO_ERROR
  120. #else
  121. #define GOOD_EXIT   0
  122. #define BAD_EXIT    1
  123. #endif
  124. #endif
  125.  
  126. /* /* Special definitions for AMIGA */
  127. /*
  128. /* These have been commented out because they are no longer necessary, and
  129. /* seem to cause some problems.  Once it is certain they are not needed
  130. /* for anything, they can be removed entirely.  Meanwhile, it has also been
  131. /* suggested that in order to get the program to build successfully on the
  132. /* Amiga, it might also be necessary to create a dummy (empty) pwd.h file
  133. /* so the #include won't fail.
  134. /*
  135. /* #ifdef AMIGA
  136. /*
  137. /* /* redefine printf and putchar/getchar to use AMIGA window */
  138. /* /* (I know this is a kludge, but it works) */
  139. /*
  140. /* #define printf          conol
  141. /* #define puts            conolNL
  142. /* #undef  putchar
  143. /* #define putchar         conocNL
  144. /* #undef  getchar
  145. /* #define getchar()       coninc(0)
  146. /* 
  147. /* #define isatty(x)       1            /* always a terminal */
  148. /* 
  149. /* #else
  150. /*
  151. /* #define printf2         printf       /* make printf2 and printf3 be */
  152. /* #define printf3         printf       /*  normal printf for all others */
  153. /*
  154. /* #endif
  155. /*
  156. /* End of commented-out Amiga conditionals */
  157.