📄 ckcdeb.h
字号:
#define POSIX_CRTSCTS#endif /* __linux__ */#ifdef __NetBSD__ /* NetBSD */#define POSIX_CRTSCTS#endif /* __NetBSD__ */#ifdef BEBOX#define POSIX_CRTSCTS/* BEBOX defines CRTSFL as (CTSFLOW & RTSFLOW) */#define CRTSCTS CRTSFL#endif /* BEBOX *//* Implementations that have implemented the ttsetflow() function. */#ifndef CK_TTSETFLOW#ifdef UNIX#define CK_TTSETFLOW#endif /* UNIX */#endif /* CK_TTSETFLOW *//* 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 *//* This is mainly for the benefit of ckufio.c (UNIX and OS/2 file support). Systems that have an atomic rename() function, so we don't have to use link() and unlink().*/#ifdef POSIX#ifndef RENAME#define RENAME#endif /* RENAME */#endif /* POSIX */#ifdef OS2#ifndef RENAME#define RENAME#endif /* RENAME */#endif /* OS2 */#ifdef SUNOS41#ifndef RENAME#define RENAME#endif /* RENAME */#endif /* SUNOS41 */#ifdef SVR4#ifndef RENAME#define RENAME#endif /* RENAME */#endif /* SVR4 */#ifdef AIXRS#ifndef RENAME#define RENAME#endif /* RENAME */#endif /* AIXRS */#ifdef BSD44#ifndef RENAME#define RENAME#endif /* RENAME */#endif /* BSD44 */#ifdef NORENAME /* Allow for compile-time override */#ifdef RENAME#undef RENAME#endif /* RENAME */#endif /* NORENAME */#ifdef STRATUS /* Stratus VOS */#ifndef RENAME#define RENAME#endif /* RENAME */#endif /* STRATUS *//* 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#ifdef STRATUSextern char myttystr[];#define CTTNAM myttystr#else /* Anyone else... */#define CTTNAM "stdout" /* This is a kludge used by Mac */#endif /* STRATUS */#endif /* GEMDOS */#endif /* UNIX */#endif /* OS2 */#endif /* OSK */#endif /* datageneral */#endif /* vms */#ifndef ZFCDAT /* zfcdat() function available? */#ifdef UNIX#define ZFCDAT#else#ifdef STRATUS#define ZFCDAT#else#ifdef GEMDOS#define ZFCDAT#else#ifdef AMIGA#define ZFCDAT#else#ifdef OS2#define ZFCDAT#else#ifdef datageneral#define ZFCDAT#else#ifdef VMS#define ZFCDAT#endif /* VMS */#endif /* datageneral */#endif /* OS2 */#endif /* AMIGA */#endif /* GEMDOS */#endif /* STRATUS */#endif /* UNIX */#endif /* ZFCDAT */#ifdef SUNS4S5#define tolower _tolower#define toupper _toupper#endif /* SUNS4S5 *//* Error number */#ifdef _CRAY #ifdef _CRAYCOM /* Cray Computer Corp. */extern int errno;#else /* _CRAYCOM */#include <errno.h> /* Cray Research UNICOS defines */ /* errno as a function. */#endif /* _CRAYCOM */ /* OK for UNICOS 6.1 and 7.0. */#else /* _CRAY */#ifdef STRATUS /* Stratus VOS */#include <errno.h>#else /* not STRATUS */#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 */#endif /* STRATUS */#endif /* _CRAY */#ifndef BIGBUFOK /* Platforms with lots of memory */#ifdef sparc /* SPARC processors */#define BIGBUFOK#endif /* sparc */#ifdef mips /* MIPS processors */#define BIGBUFOK#endif /* mips */#ifdef HPUX10 /* HP-UX 10.0 PA-RISC */#define BIGBUFOK#endif /* HPUX10 */#ifdef NEXT /* NeXTSTEP */#ifdef mc68000 /* on NEXT platforms... */#define BIGBUFOK#endif /* mc68000 */#endif /* NEXT */#ifdef OS2 /* 32-bit OS/2 2.x */#ifdef __32BIT__#define BIGBUFOK#endif /* __32BIT__ */#ifdef NT#define BIGBUFOK#endif /* NT */#endif /* OS2 */#ifdef Plan9 /* Plan 9 is OK */#define BIGBUFOK#endif /* Plan9 */#ifdef VMS /* Any VMS is OK */#define BIGBUFOK#endif /* VMS */#ifdef __alpha /* DEC 64-bit Alpha AXP, e.g. OSF/1 */#ifndef BIGBUFOK /* Might already be defined for VMS */#define BIGBUFOK#endif /* BIGBUFOK */#endif /* __alpha */#ifdef sgi /* SGI with IRIX 4.0 or later */#define BIGBUFOK#endif /* sgi */#endif /* BIGBUFOK *//* 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#ifndef _UCC#define SIGALRM 30 /* May always cancel I/O */#endif /* _UCC */#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 */#ifdef datageneral /* Data General AOS/VS */#ifdef putchar#undef putchar#endif /* putchar */#define putchar(c) conoc(c)#endif /* datageneral *//* 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 */#define FLO_AUTO 10 /* Figure out automatically *//* 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 password; /* (') password for area */ long blksize; /* (() file blocksize */ struct zstr xaccess; /* ()) 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 */#ifdef OS2 struct zstr longname; /* OS/2 longname if applicable */#endif /* OS2 */ struct zstr reply; /* This goes last, used for attribute reply */};/* Kermit file information structure */struct filinfo { int bs; /* Blocksize */ int cs; /* Character set */ long rl; /* Record length */ int org; /* Organization */ int fmt; /* Record format */ int cc; /* Carriage control */ int typ; /* Type (text/binary) */ int dsp; /* Disposition */ char *os_specific; /* OS-specific attributes */#ifdef OS2 unsigned long int lblopts; /* LABELED FILE options bitmask */#else int lblopts; #endif /* OS2 */};#ifndef ZFNQFP /* Versions that have zfnqfp() */#ifdef UNIX#define ZFNQFP#else#ifdef VMS#define ZFNQFP#else#ifdef OS2#define ZFNQFP#endif /* OS2 */#endif /* VMS */#endif /* UNIX */struct zfnfp { int len; char * fpath; char * fname;};#endif /* ZFNQFP *//* Systems that support FILE TYPE LABELED */#ifdef VMS#define CK_LABELED#else#ifdef OS2#ifdef __32BIT__#ifndef NT#define CK_LABELED#endif /* NT */#endif /* __32BIT__ */#endif /* OS2 */#endif /* VMS *//* LABELED FILE options bitmask */#ifdef VMS /* For VMS */#define LBL_NAM 1 /* Ignore incoming name if set */#define LBL_PTH 2 /* Use complete path if set */#define LBL_ACL 4 /* Preserve ACLs if set */#define LBL_BCK 8 /* Preserve backup date if set */#define LBL_OWN 16 /* Preserve ownership if set */#else#ifdef OS2 /* Ditto for OS/2 */#define LBL_NOR 0x0000 /* Normal file */#define LBL_ARC 0x0020 /* Archive */#define LBL_DIR 0x0010 /* Directory */#define LBL_HID 0x0002 /* Hidden file */#define LBL_RO 0x0001 /* Read only file */#define LBL_SYS 0x0004 /* System file */#define LBL_EXT 0x0040 /* Extended */#endif /* OS2 */#endif /* VMS *//* Data types. First the header file for data types so we can pick up the types used for pids, uids, and gids. Override this section by putting -DCKTYP_H=xxx on the command line to specify the header file where your system defines these types.*/#ifndef STRATUS#ifdef __ALPHA#ifdef MULTINET#define CK_TGV_AXP#endif /* MULTINET */#endif /* __ALPHA */#ifdef CK_TGV_AXP /* Alpha, VMS, MultiNet *//* Starting in DECC 5.0, <stdlib.h> no longer includes <types.h>. But before that an elaborate workaround is required, which results in including <types.h> sometimes but not others, evidently depending on whether <types.h> protects itself against multiple inclusion, which in turn probably differentiates between DECC <types.h> and TGV <types.h>. Unfortunately I don't remember the details. (fdc, 25 Oct 96)*/#ifdef COMMENT/* Previously the test here was for DEC version prior to 4.0, but since the test involved an "#if" statement, it was not portable and broke some non-VMS builds. In any case, condition was never satisfied, so the result of commenting this section out is the same as the previous "#if" condition.*/#ifndef __TYPES_LOADED#define __TYPES_LOADED /* Work around bug in .h files */#endif /* __TYPES_LOADED */#endif /* COMMENT */#include <sys/types.h>#else /* !CK_TGV_AXP */#ifdef OSK /* OS-9 */#include <types.h>#else /* General case, not OS-9 */#ifndef CKTYP_H#ifndef VMS#ifndef MAC#ifndef AMIGA#define CKTYP_H <sys/types.h>#endif /* AMIGA */#endif /* MAC */#endif /* VMS */#endif /* CKTYP_H */#ifdef GEMDOS#undef CKTYP_H#include <types.h>#endif /* GEMDOS */#ifdef OS2#undef CKTYP_H#include <sys/types.h>#endif /* OS2 */#ifdef CKTYP_H /* Include it. */#ifdef COHERENT /* Except for COHERENT */#include <sys/types.h>#else#ifdef datageneral /* AOS/VS */#include <sys/types.h>#else#ifdef __bsdi__ /* BSDI */#ifdef POSIX#undef _POSIX_SOURCE#endif /* POSIX */#endif /* __bsdi__ */#include CKTYP_H#ifdef __bsdi__#ifdef POSIX#define _POSIX_SOURCE#endif /* POSIX */#endif /* __bsdi__ */#endif /* datageneral */#endif /* COHERENT */#endif /* CKTYP_H */#endif /* OSK */#endif /* CK_TGV_AXP */#endif /* STRATUS */ /* End of types.h section *//* Data type for pids. If your system uses a different type, put something like -DPID_T=pid_t on command line, or override here.*/#ifndef PID_T
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -