Commit | Line | Data |
---|---|---|
ee2abe03 C |
1 | /* ckcker.h -- Symbol and macro definitions for C-Kermit */ |
2 | ||
3 | /* | |
4 | Author: Frank da Cruz (SY.FDC@CU20B), | |
5 | Columbia University Center for Computing Activities, January 1985. | |
6 | Copyright (C) 1985, Trustees of Columbia University in the City of New York. | |
7 | Permission is granted to any individual or institution to use, copy, or | |
8 | redistribute this software so long as it is not sold for profit, provided this | |
9 | copyright notice is retained. | |
10 | */ | |
11 | ||
12 | /* Mnemonics for ASCII characters */ | |
13 | ||
14 | #define NUL 000 /* ASCII Null */ | |
15 | #define SOH 001 /* ASCII Start of header */ | |
16 | #define BEL 007 /* ASCII Bell (Beep) */ | |
17 | #define BS 010 /* ASCII Backspace */ | |
18 | #define LF 012 /* ASCII Linefeed */ | |
19 | #define CR 015 /* ASCII Carriage Return */ | |
20 | #define XON 021 /* ASCII XON */ | |
21 | #define SP 040 /* ASCII Space */ | |
22 | #define DEL 0177 /* ASCII Delete (Rubout) */ | |
23 | ||
24 | /* Kermit parameters and defaults */ | |
25 | ||
26 | #define MAXPACK 94 /* Maximum packet size */ | |
27 | #define RBUFL 200 /* Receive buffer length */ | |
28 | #define CTLQ '#' /* Control char prefix I will use */ | |
29 | #define MYEBQ '&' /* 8th-Bit prefix char I will use */ | |
30 | #define MYRPTQ '~' /* Repeat count prefix I will use */ | |
31 | ||
32 | #define MAXTRY 10 /* Times to retry a packet */ | |
33 | #define MYPADN 0 /* How many padding chars I need */ | |
34 | #define MYPADC '\0' /* Which padding character I need */ | |
35 | ||
36 | #define DMYTIM 7 /* Default timeout interval to use. */ | |
37 | #define URTIME 10 /* Timeout interval to be used on me. */ | |
38 | ||
39 | #define DEFTRN 0 /* Default line turnaround handshake */ | |
40 | #define DEFPAR 0 /* Default parity */ | |
41 | #define MYEOL CR /* End-Of-Line character I need on packets. */ | |
42 | ||
43 | #define DRPSIZ 90 /* Default incoming packet size. */ | |
44 | #define DSPSIZ 90 /* Default outbound packet size. */ | |
45 | ||
46 | #define DDELAY 5 /* Default delay. */ | |
47 | #define DSPEED 9600 /* Default line speed. */ | |
48 | ||
49 | /* Files */ | |
50 | ||
51 | #define ZCTERM 0 /* Console terminal */ | |
52 | #define ZSTDIO 1 /* Standard input/output */ | |
53 | #define ZIFILE 2 /* Current input file */ | |
54 | #define ZOFILE 3 /* Current output file */ | |
55 | #define ZDFILE 4 /* Current debugging log file */ | |
56 | #define ZTFILE 5 /* Current transaction log file */ | |
57 | #define ZPFILE 6 /* Current packet log file */ | |
58 | #define ZSFILE 7 /* Current session log file */ | |
59 | #define ZSYSFN 8 /* Input from a system function */ | |
60 | #define ZNFILS 9 /* How many defined file numbers */ | |
61 | ||
62 | /* Screen functions */ | |
63 | ||
64 | #define SCR_FN 1 /* filename */ | |
65 | #define SCR_AN 2 /* as-name */ | |
66 | #define SCR_FS 3 /* file-size */ | |
67 | #define SCR_XD 4 /* x-packet data */ | |
68 | #define SCR_ST 5 /* File status: */ | |
69 | #define ST_OK 0 /* Transferred OK */ | |
70 | #define ST_DISC 1 /* Discarded */ | |
71 | #define ST_INT 2 /* Interrupted */ | |
72 | #define ST_SKIP 3 /* Skipped */ | |
73 | #define ST_ERR 4 /* Fatal Error */ | |
74 | #define SCR_PN 6 /* packet number */ | |
75 | #define SCR_PT 7 /* packet type or pseudotype */ | |
76 | #define SCR_TC 8 /* transaction complete */ | |
77 | #define SCR_EM 9 /* error message */ | |
78 | #define SCR_WM 10 /* warning message */ | |
79 | #define SCR_TU 11 /* arbitrary undelimited text */ | |
80 | #define SCR_TN 12 /* arbitrary new text, delimited at beginning */ | |
81 | #define SCR_TZ 13 /* arbitrary text, delimited at end */ | |
82 | #define SCR_QE 14 /* quantity equals (e.g. "foo: 7") */ | |
83 | ||
84 | /* Macros */ | |
85 | ||
86 | #define tochar(ch) ((ch) + SP ) /* Number to character */ | |
87 | #define unchar(ch) ((ch) - SP ) /* Character to number */ | |
88 | #define ctl(ch) ((ch) ^ 64 ) /* Controllify/Uncontrollify */ | |
89 | #define unpar(ch) ((ch) & 127) /* Clear parity bit */ |