Commit | Line | Data |
---|---|---|
ee2abe03 C |
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 | typedef unsigned char CHAR; | |
58 | typedef long LONG; | |
59 | #endif | |
60 | #endif | |
61 | #endif | |
62 | ||
63 | #ifdef TOWER1 | |
64 | typedef int void; | |
65 | #endif | |
66 | ||
67 | /* Line delimiter for text files */ | |
68 | ||
69 | /* | |
70 | If the system uses a single character for text file line delimitation, | |
71 | define NLCHAR to the value of that character. For text files, that | |
72 | character will be converted to CRLF upon output, and CRLF will be converted | |
73 | to that character on input. | |
74 | */ | |
75 | #ifdef MAC /* Macintosh */ | |
76 | #define NLCHAR 015 | |
77 | #else /* All Unix-like systems */ | |
78 | #define NLCHAR 012 | |
79 | #endif | |
80 | /* | |
81 | At this point, if there's a system that uses ordinary CRLF line | |
82 | delimitation AND the C compiler actually returns both the CR and | |
83 | the LF when doing input from a file, then #undef NLCHAR. | |
84 | */ | |
85 | ||
86 | /* The device name of a job's controlling terminal */ | |
87 | /* Special for VMS, same for all Unixes (?), not used by Macintosh */ | |
88 | ||
89 | #ifdef vax11c | |
90 | #define CTTNAM "TT:" | |
91 | #else | |
92 | #define CTTNAM "/dev/tty" | |
93 | #endif | |
94 | ||
95 | ||
96 | ||
97 | /* Some special includes for VAX/VMS */ | |
98 | ||
99 | #ifdef vax11c | |
100 | #include ssdef | |
101 | #include stsdef | |
102 | #endif | |
103 | ||
104 | /* Program return codes for VMS, DECUS C, and Unix */ | |
105 | ||
106 | #ifdef vax11c | |
107 | #define GOOD_EXIT (SS$_NORMAL | STS$M_INHIB_MSG) | |
108 | #define BAD_EXIT SS$_ABORT | |
109 | #else | |
110 | #ifdef decus | |
111 | #define GOOD_EXIT IO_NORMAL | |
112 | #define BAD_EXIT IO_ERROR | |
113 | #else | |
114 | #define GOOD_EXIT 0 | |
115 | #define BAD_EXIT 1 | |
116 | #endif | |
117 | #endif |