home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d0xx / d026 / c-kermit.lha / C-kermit / src / ckcdeb.h next >
Encoding:
C/C++ Source or Header  |  1986-06-16  |  3.4 KB  |  152 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. #ifdef AMIGA
  64. #define LONG long    /* Works for both Manx and Lattice (fnf) */
  65. #else
  66. typedef long LONG;
  67. #endif    /* AMIGA */
  68. #endif
  69. #endif
  70. #endif
  71. #endif
  72. #endif
  73.      
  74. #ifdef TOWER1
  75. typedef int void;
  76. #endif
  77.      
  78. /* Line delimiter for text files */
  79.      
  80. /*
  81.  If the system uses a single character for text file line delimitation,
  82.  define NLCHAR to the value of that character.  For text files, that
  83.  character will be converted to CRLF upon output, and CRLF will be converted
  84.  to that character on input.
  85. */
  86. #ifdef MAC                /* Macintosh */
  87. #define NLCHAR 015
  88. #else                    /* All Unix-like systems */
  89. #define NLCHAR 012
  90. #endif
  91. /*
  92.  At this point, if there's a system that uses ordinary CRLF line
  93.  delimitation AND the C compiler actually returns both the CR and
  94.  the LF when doing input from a file, then #undef NLCHAR.
  95. */
  96.      
  97. /* The device name of a job's controlling terminal */
  98. /* Special for VMS, same for all Unixes (?), not used by Macintosh */
  99.      
  100. #ifdef vax11c
  101. #define CTTNAM "TT:"
  102. #else
  103. #define CTTNAM "/dev/tty"
  104. #endif
  105.      
  106.      
  107.      
  108. /* Some special includes for VAX/VMS */
  109.      
  110. #ifdef vax11c
  111. #include ssdef
  112. #include stsdef
  113. #endif
  114.      
  115. /* Program return codes for VMS, DECUS C, and Unix */
  116.      
  117. #ifdef vax11c
  118. #define GOOD_EXIT   (SS$_NORMAL | STS$M_INHIB_MSG)
  119. #define BAD_EXIT    SS$_ABORT
  120. #else
  121. #ifdef decus
  122. #define GOOD_EXIT   IO_NORMAL
  123. #define BAD_EXIT    IO_ERROR
  124. #else
  125. #define GOOD_EXIT   0
  126. #define BAD_EXIT    1
  127. #endif
  128. #endif
  129.  
  130. /* special definitions for AMIGA */
  131.  
  132. #ifdef AMIGA
  133.  
  134. /* redefine printf and putchar/getchar to use AMIGA window */
  135. /* (I know this is a kludge, but it works) */
  136.  
  137. #define printf          conol
  138. #define puts            conolNL
  139. #undef  putchar
  140. #define putchar         conocNL
  141. #undef  getchar
  142. #define getchar()       coninc(0)
  143.  
  144. #define isatty(x)       1            /* always a terminal */
  145.  
  146. #else
  147.  
  148. #define printf2         printf       /* make printf2 and printf3 be */
  149. #define printf3         printf       /*  normal printf for all others */
  150.  
  151. #endif
  152.