📄 ckcdeb.h
字号:
/* typedef long LONG; */#else#ifdef BSD29typedef char CHAR;/* typedef long LONG; */#else#ifdef datageneral#define CHAR unsigned char /* 3.22 compiler */ #else#ifdef CHAR#undef CHAR#endif /* CHAR */typedef unsigned char CHAR;#endif /* datageneral */#endif /* BSD29 */#endif /* C70 */#endif /* V7 */#endif /* MINIX */#endif /* PROVX1 *//* Debug and transaction logging is included automatically unless you define NODEBUG or NOTLOG. Do this if you want to save the space and overhead. (Note, in version 4F these definitions changed from "{}" to the null string to avoid problems with semicolons after braces, as in: "if (x) tlog(this); else tlog(that);"*/#ifndef NODEBUG#ifndef DEBUG#define DEBUG#endif /* DEBUG */#else#ifdef DEBUG#undef DEBUG#endif /* DEBUG */#endif /* NODEBUG */#ifndef NOTLOG#ifndef TLOG#define TLOG#endif /* TLOG */#endif /* NOTLOG *//* debug() macro style selection. */#ifdef MAC#ifndef IFDEBUG#define IFDEBUG#endif /* IFDEBUG */#endif /* MAC */#ifdef OS2#ifndef IFDEBUG#define IFDEBUG#endif /* IFDEBUG */#endif /* OS2 */#ifndef DEBUG/* Compile all the debug() statements away. Saves a lot of space and time. */#define debug(a,b,c,d)#else#ifndef CKCMAI/* Debugging included. Declare debug log flag in main program only. */extern int deblog;#endif /* CKCMAI *//* Now define the debug() macro. */#ifdef IFDEBUG/* Use this form to avoid function calls: */#define debug(a,b,c,d) if (deblog) dodebug(a,b,(char *)c,(long)d)#else/* Use this form to save space: */#define debug(a,b,c,d) dodebug(a,b,(char *)c,(long)d)#endif /* MAC */_PROTOTYP(int dodebug,(int, char *, char *, long));#endif /* DEBUG */#ifndef TLOG#define tlog(a,b,c,d)#else_PROTOTYP(VOID tlog,(int, char *, char *, long));#endif /* TLOG *//* Formats for debug() and tlog() */#define F000 0#define F001 1#define F010 2#define F011 3#define F100 4#define F101 5#define F110 6#define F111 7/* Kermit feature selection */#ifdef MAC /* For Macintosh, no escape */#define NOPUSH /* to operating system */#endif /* MAC */#ifdef UNIX#ifndef NOPARSEN#define PARSENSE /* Automatic parity detection */#endif /* NOPARSEN */#endif /* UNIX */ /* for Unix */#ifdef VMS /* ... and VMS */#ifndef NOPARSEN#define PARSENSE#endif /* NOPARSEN */#endif /* VMS */#ifdef MAC /* and Macintosh */#ifndef NOPARSEN#define PARSENSE#endif /* NOPARSEN */#endif /* MAC */#ifdef VMS /* Use dynamic memory allocation */#ifndef DYNAMIC#define DYNAMIC /* in VMS version. */#endif /* DYNAMIC */#endif /* VMS */#ifndef CK_LBRK /* Can send Long BREAK */#ifdef UNIX /* (everybody but OS-9) */#define CK_LBRK#endif /* UNIX */#ifdef VMS#define CK_LBRK#endif /* VMS */#ifdef datageneral#define CK_LBRK#endif /* datageneral */#ifdef GEMDOS#define CK_LBRK#endif /* GEMDOS */#ifdef OS2#define CK_LBRK#endif /* OS2 */#ifdef AMIGA#define CK_LBRK#endif /* AMIGA */#endif /* CK_LBRK *//* Carrier treatment *//* These are defined here because they are shared by the system dependent *//* and the system independent modules. */#define CAR_OFF 0 /* On: heed carrier always, except during DIAL. */#define CAR_ON 1 /* Off: ignore carrier always. */#define CAR_AUT 2 /* Auto: heed carrier, but only if line is declared */ /* to be a modem line, and only during CONNECT. *//* Hangup by modem command supported by default */#ifndef NODIAL#ifndef NOMDMHUP#ifndef MDMHUP#define MDMHUP #endif /* MDMHUP */#endif /* NOMDMHUP */#endif /* NODIAL *//* Types of flow control available */#define CK_XONXOFF /* Everybody can do this, right? */#ifdef AMIGA /* Commodore Amiga */#define CK_RTSCTS /* has RTS/CTS */#endif /* AMIGA */#ifdef SUN4S5 /* SunOS in System V environment */#define CK_RTSCTS#else /* SunOS 4.0/4.1 in BSD environment */#ifdef SUNOS4 /* SunOS 4.0+later supports RTS/CTS */#ifdef SUNOS41 /* Easy in 4.1 and later */#define CK_RTSCTS#else /* Harder in 4.0 */#ifndef __GNUC__ /* (see tthflow() in ckutio.c) */#ifndef GNUC#define CK_RTSCTS /* Only if not using GNU gcc */#endif /* __GNUC__ */#endif /* GNUC */#endif /* SUNOS41 */#endif /* SUNOS4 */#endif /* SUN4S5 */#ifdef BSD44 /* And in 4.4 BSD */#define CK_RTSCTS#endif /* BSD44 */#ifdef TERMIOX /* Sys V R4 <termiox.h> */#define CK_RTSCTS /* has RTS/CTS */#define CK_DTRCD /* and DTR/CD */#endif /* TERMIOX */#ifdef STERMIOX /* Sys V R4 <sys/termiox.h> */#define CK_RTSCTS /* Ditto. */#define CK_DTRCD#endif /* STERMIOX *//* Systems where we can expand tilde at the beginning of file or directory names*/#ifdef POSIX#ifndef DTILDE#define DTILDE#endif /* DTILDE */#endif /* POSIX */#ifdef BSD4#ifndef DTILDE#define DTILDE#endif /* DTILDE */#endif /* BSD4 */#ifdef ATTSV#ifndef DTILDE#define DTILDE#endif /* DTILDE */#endif /* ATTSV */#ifdef OSK#ifndef DTILDE#define DTILDE#endif /* DTILDE */#endif /* OSK */#ifdef HPUX /* I don't know why this is */#ifndef DTILDE /* necessary, since -DHPUX */#define DTILDE /* automatically defines ATTSV */#endif /* DTILDE */ /* (see above) ... */#endif /* HPUX *//* Line delimiter for text files *//* If the system uses a single character for text file line delimitation, define NLCHAR to the value of that character. For text files, that character will be converted to CRLF upon output, and CRLF will be converted to that character on input during text-mode (default) packet operations.*/#ifdef MAC /* Macintosh */#define NLCHAR 015#else#ifdef OSK /* OS-9/68K */#define NLCHAR 015#else /* All Unix-like systems */#define NLCHAR 012#endif /* OSK */#endif /* MAC *//* At this point, if there's a system that uses ordinary CRLF line delimitation AND the C compiler actually returns both the CR and the LF when doing input from a file, then #undef NLCHAR.*/#ifdef OS2 /* OS/2 */#undef NLCHAR#endif /* OS2 */#ifdef GEMDOS /* Atari ST */#undef NLCHAR#endif /* GEMDOS *//* VMS file formats are so complicated we need to do all the conversion work in the CKVFIO module, so we tell the rest of C-Kermit not to fiddle with the bytes.*/#ifdef vms#undef NLCHAR#endif /* vms *//* The device name of a job's controlling terminal *//* Special for VMS, same for all Unixes (?), not used by Macintosh */#ifdef vms#define CTTNAM "TT:"#else#ifdef datageneral#define CTTNAM "@output"#else#ifdef OSKextern char myttystr[];#define CTTNAM myttystr#else#ifdef OS2#define CTTNAM "con"#else#ifdef UNIX#define CTTNAM "/dev/tty"#else#ifdef GEMDOS#define CTTNAM "aux:"#else /* Anyone else... */#define CTTNAM "stdout" /* This is a kludge used by Mac */#endif /* GEMDOS */#endif /* UNIX */#endif /* OS2 */#endif /* OSK */#endif /* datageneral */#endif /* vms */#ifdef SUNS4S5#define tolower _tolower#define toupper _toupper#endif /* SUNS4S5 *//* Error number */#ifndef VMS#ifndef OS2/* The following declaration causes problems for VMS and OS/2, in which errno is an "extern volatile int noshare"...*/extern int errno; /* Needed by most modules. */#endif /* OS2 */#endif /* VMS *//* File System Defaults */#ifdef VMS#define DBLKSIZ 512#define DLRECL 512#else#define DBLKSIZ 0#define DLRECL 0#endif/* Program return codes for DECUS C and UNIX (VMS uses UNIX codes) */#ifdef decus#define GOOD_EXIT IO_NORMAL#define BAD_EXIT IO_ERROR#else#define GOOD_EXIT 0#define BAD_EXIT 1#endif /* decus *//* Special hack for Fortune, which doesn't have <sys/file.h>... */#ifdef FT18#define FREAD 0x01#define FWRITE 0x10#endif /* FT18 *//* Special hack for OS-9/68k */#ifdef OSK#define SIGALRM 30 /* May always cancel I/O */#define SIGARB 1234 /* Arbitrary for I/O */SIGTYP (*signal())();#endif /* OSK */#ifdef OS2#ifdef putchar /* MSC 5.1 simply uses a macro which causes */#undef putchar /* no problems. */#endif /* putchar */#endif /* OS2 */#ifdef MINIX#ifdef putchar#undef putchar#endif /* putchar */#define putchar(c) {putc(c,stdout);fflush(stdout);}#endif /* MINIX *//* Escape/quote character used by the command parser */#define CMDQ '\\'/* Symbols for RS-232 modem signals */#define KM_FG 1 /* Frame ground */#define KM_TXD 2 /* Transmit */#define KM_RXD 3 /* Receive */#define KM_RTS 4 /* Request to Send */#define KM_CTS 5 /* Clear to Send */#define KM_DSR 6 /* Data Set Ready */#define KM_SG 7 /* Signal ground */#define KM_DCD 8 /* Carrier Detect */#define KM_DTR 20 /* Data Terminal Ready */#define KM_RI 22 /* Ring Indication *//* Bit mask values for modem signals */#define BM_CTS 0001 /* Clear to send (From DCE) */#define BM_DSR 0002 /* Dataset ready (From DCE) */#define BM_DCD 0004 /* Carrier (From DCE) */#define BM_RNG 0010 /* Ring Indicator (From DCE) */#define BM_DTR 0020 /* Data Terminal Ready (From DTE) */#define BM_RTS 0040 /* Request to Send (From DTE) *//* Codes for full duplex flow control */#define FLO_NONE 0 /* None */#define FLO_XONX 1 /* Xon/Xoff (soft) */#define FLO_RTSC 2 /* RTS/CTS (hard) */#define FLO_DTRC 3 /* DTR/CD (hard) */#define FLO_ETXA 4 /* ETX/ACK (soft) */#define FLO_STRG 5 /* String-based (soft) */#define FLO_DIAL 6 /* DIALing kludge */#define FLO_DIAX 7 /* Cancel dialing kludge */#define FLO_DTRT 8 /* DTR/CTS (hard) */#define FLO_KEEP 9 /* Keep, i.e. don't touch or change *//* And finally... */#ifdef COMMENT /* Make sure this is NOT defined! */#undef COMMENT#endif /* COMMENT *//* Structure definitions for Kermit file attributes *//* All strings come as pointer and length combinations *//* Empty string (or for numeric variables, -1) = unused attribute. */struct zstr { /* string format */ int len; /* length */ char *val; /* value */};struct zattr { /* Kermit File Attribute structure */ long lengthk; /* (!) file length in K */ struct zstr type; /* (") file type (text or binary) */ struct zstr date; /* (#) file creation date yyyymmdd[ hh:mm[:ss]] */ struct zstr creator; /* ($) file creator id */ struct zstr account; /* (%) file account */ struct zstr area; /* (&) area (e.g. directory) for file */ struct zstr passwd; /* (') password for area */ long blksize; /* (() file blocksize */ struct zstr access; /* ()) file access: new, supersede, append, warn */ struct zstr encoding; /* (*) encoding (transfer syntax) */ struct zstr disp; /* (+) disposition (mail, message, print, etc) */ struct zstr lprotect; /* (,) protection (local syntax) */ struct zstr gprotect; /* (-) protection (generic syntax) */ struct zstr systemid; /* (.) ID for system of origin */ struct zstr recfm; /* (/) record format */ struct zstr sysparam; /* (0) system-dependent parameter string */ long length; /* (1) exact length on system of origin */ struct zstr charset; /* (2) transfer syntax character set */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -