📄 ckcker.h
字号:
/* ckcker.h -- Symbol and macro definitions for C-Kermit *//* Author: Frank da Cruz <fdc@columbia.edu>, Columbia University Academic Information Systems, New York City. Copyright (C) 1985, 2000, Trustees of Columbia University in the City of New York. All rights reserved. See the C-Kermit COPYING.TXT file or the copyright text in the ckcmai.c module for disclaimer and permissions.*/#ifndef CKCKER_H#define CKCKER_H#define I_AM_KERMIT 0 /* Personalities */#define I_AM_TELNET 1#define I_AM_RLOGIN 2#define I_AM_IKSD 3#ifndef NOSTREAMING#ifndef STREAMING#define STREAMING#endif /* STREAMING */#endif /* NOSTREAMING *//* If NEWDEFAULTS is defined then: - RECEIVE PACKET-LENGTH is 4095 rather than 90 - WINDOW is 30 rather than 1 - BLOCK-CHECK is 3 rather than 1 - FILE TYPE is BINARY rather than TEXT*/#ifdef OS2 /* OS/2, Windows NT, Windows 95 */#ifndef NEWDEFAULTS#define NEWDEFAULTS#endif /* NEWDEFAULTS */#endif /* OS2 */#ifdef NOICP /* No Interactive Command Parser */#ifndef NOSPL /* implies... */#define NOSPL /* No Script Programming Language */#endif /* NOSPL */#ifndef NOCSETS /* No character-set translation */#define NOCSETS /* because the only way to set it up */#endif /* NOCSETS */ /* is with interactive commands */#endif /* NOICP */#ifdef pdp11 /* There is a maximum number of */#ifndef NOCKSPEED /* of -D's allowed on the CC */#define NOCKSPEED /* command line, so some of them */#endif /* NOCKSPEED */ /* have to go here... */#ifndef NOREDIRECT#define NOREDIRECT#endif /* NOREDIRECT */#ifdef WHATAMI#undef WHATAMI#endif /* WHATAMI */#endif /* pdp11 */#ifdef UIDBUFLEN#define LOGINLEN UIDBUFLEN#else#define LOGINLEN 32 /* Length of server login field */#endif /* UIDBUFLEN *//* Bell values */#define XYB_NONE 0 /* No bell */#define XYB_AUD 1 /* Audible bell */#define XYB_VIS 2 /* Visible bell */#define XYB_BEEP 0 /* Audible Beep */#define XYB_SYS 4 /* Audible System Sounds *//* File status bits */#define FS_OK 1 /* File transferred OK */#define FS_REFU 2 /* File was refused */#define FS_DISC 4 /* File was discarded */#define FS_INTR 8 /* Transfer was interrupted by user */#define FS_ERR 16 /* Fatal error during transfer *//* Control-character (un)prefixing options */#define PX_ALL 0 /* Prefix all control chars */#define PX_CAU 1 /* Unprefix cautiously */#define PX_WIL 2 /* Unprefix with wild abandon */#define PX_NON 3 /* Unprefix all (= prefix none) *//* Destination codes */#define DEST_D 0 /* DISK */#define DEST_S 1 /* SCREEN */#define DEST_P 2 /* PRINTER */#define DEST_N 3 /* NOWHERE (calibration run) *//* File transfer protocols */#define PROTO_K 0 /* Kermit */#ifdef CK_XYZ#define PROTO_X 1 /* XMODEM */#define PROTO_XC 2 /* XMODEM-CRC */#define PROTO_Y 3 /* YMODEM */#define PROTO_G 4 /* YMODEM-g */#define PROTO_Z 5 /* ZMODEM */#define PROTO_O 6 /* OTHER */#define NPROTOS 7 /* How many */#else#define NPROTOS 1 /* How many */#endif /* CK_XYZ */struct ck_p { /* C-Kermit Protocol info structure */ char * p_name; /* Protocol name */ int rpktlen; /* Packet length - receive */ int spktlen; /* Packet length - send */ int spktflg; /* ... */ int winsize; /* Window size */ int prefix; /* Control-char prefixing options */ int fnca; /* Filename collision action */ int fncn; /* Filename conversion */ int fnsp; /* Send filename path stripping */ int fnrp; /* Receive filename path stripping */ char * h_b_init; /* Host receive initiation string - text */ char * h_t_init; /* Host receive initiation string - binary */ char * h_x_init; /* Host server string */ char * p_b_scmd; /* SEND cmd for external protocol - text */ char * p_t_scmd; /* SEND cmd for external protocol - binary */ char * p_b_rcmd; /* RECV cmd for external protocol - text */ char * p_t_rcmd; /* RECV cmd for external protocol - binary */};struct filelist { /* Send-file list element */ char * fl_name; /* Filename */ int fl_mode; /* Transfer mode */ char * fl_alias; /* Name to send the file under */ struct filelist * fl_next; /* Pointer to next element */};/* Kermit system IDs and associated properties... */struct sysdata { char *sid_code; /* Kermit system ID code */ char *sid_name; /* Descriptive name */ short sid_unixlike; /* Tree-structured directory with separators */ char sid_dirsep; /* Directory separator character if unixlike */ short sid_dev; /* Can start with dev: */ short sid_case; /* Bit mapped: 1 = case matters, 2 = case preserved */ short sid_recfm; /* Text record separator *//* 0 = unknown or nonstream 1 = cr 2 = lf 3 = crlf*/};#define SET_ON 1 /* General values for settings that can be ON */#define SET_OFF 0 /* OFF, */#define SET_AUTO 2 /* or AUTO */#define PATH_OFF 0 /* Pathnames off (to be stripped) */#define PATH_REL 1 /* Pathnames on, left relative if possible */#define PATH_ABS 2 /* Pathnames absolute always */#define PATH_AUTO 4 /* Pathnames handled automatically *//* GET Options */#define GOPT_DEL 1 /* Delete source file */#define GOPT_REC 2 /* Recursive */#define GOPT_RES 4 /* Recover (Resend) */#define GOPT_CMD 8 /* Filename is a Command *//* GET Transfer Modes */#define GMOD_TXT 0 /* Text */#define GMOD_BIN 1 /* Binary */#define GMOD_AUT 2 /* Auto */#define GMOD_LBL 3 /* Labeled *//* GET Filename Options */#define GNAM_LIT 0 /* Literal */#define GNAM_CNV 1 /* Converted *//* GET Pathname Options */#define GPTH_OFF 0 /* Pathnames Off */#define GPTH_REL 1 /* Pathnames Relative */#define GPTH_ABX 2 /* Pathnames Absolute */#ifndef NOSPL/* The IF REMOTE-ONLY command is available only in versions that actually can be used in remote mode, and only if we have an interactive command parser.*/#define CK_IFRO#ifdef MAC#undef CK_IFRO#else#ifdef GEMDOS#undef CK_IFRO#endif /* GEMDOS */#endif /* MAC */#endif /* NOSPL *//* Systems whose CONNECT modules can execute Application Program Commands */#ifdef NOSPL /* Script programming language */#ifdef CK_APC /* is required for APC. */#undef CK_APC#endif /* CK_APC */#ifndef NOAPC#define NOAPC#endif /* NOAPC */#ifndef NOAUTODL#define NOAUTODL#endif /* NOAUTODL */#endif /* NOSPL */#ifndef NOAPC /* Unless they said NO APC */#ifndef CK_APC /* And they didn't already define it */#ifdef OS2 /* OS/2 gets it */#define CK_APC#endif /* OS2 */#ifdef UNIX /* UNIX gets it */#define CK_APC#endif /* UNIX */#ifdef VMS /* VMS too */#define CK_APC#endif /* VMS */#endif /* CK_APC */#endif /* NOAPC */#ifdef CK_APC /* APC buffer length */#define APCBUFLEN (CMDBL + 10)#define APC_OFF 0 /* APC OFF (disabled) */#define APC_ON 1 /* APC ON (enabled for non-dangerous commands) */#define APC_UNCH 2 /* APC UNCHECKED (enabled for ALL commands) */#define APC_INACTIVE 0 /* APC not in use */#define APC_REMOTE 1 /* APC in use from Remote */#define APC_LOCAL 2 /* APC being used from within Kermit */#ifndef NOAUTODL#ifndef CK_AUTODL /* Autodownload */#ifdef OS2#define CK_AUTODL#else#ifdef UNIX#define CK_AUTODL#else#ifdef VMS#define CK_AUTODL#else#ifdef CK_AUTODL#undef CK_AUTODL#endif /* CK_AUTODL */#endif /* NOAUTODL */#endif /* VMS */#endif /* UNIX */#endif /* OS2 */#endif /* CK_AUTODL */#else /* CK_APC not defined */#ifdef NOICP#ifdef UNIX#ifndef CK_AUTODL#define CK_AUTODL#endif /* CK_AUTODL */#endif /* UNIX */#else /* Not NOICP... */#ifdef CK_AUTODL#undef CK_AUTODL#endif /* CK_AUTODL */#endif /* NOICP */#endif /* CK_APC */#ifdef NOAUTODL#ifdef CK_AUTODL#undef CK_AUTODL#endif /* CK_AUTODL */#endif /* NOAUTODL *//* Codes for what we are doing now - bit mask values */#define W_NOTHING 0 /* Nothing */#define W_INIT 1 /* Initializing protocol */#define W_SEND 2 /* SENDing or MAILing */#define W_RECV 4 /* RECEIVEing or GETting */#define W_REMO 8 /* Doing a REMOTE command */#define W_CONNECT 16 /* CONNECT mode */#define W_COMMAND 32 /* Command mode */#define W_DIALING 64 /* Dialing a modem */#ifndef NOWHATAMI#ifndef WHATAMI#define WHATAMI#endif /* WHATAMI */#endif /* NOWHATAMI */#ifdef WHATAMI /* Bit mask positions for WHATAMI */#define WMI_SERVE 1 /* Server mode */#define WMI_FMODE 2 /* File transfer mode */#define WMI_FNAME 4 /* File name conversion */#define WMI_STREAM 8 /* I have a reliable transport */#define WMI_CLEAR 16 /* I have a clear channel */#define WMI_FLAG 32 /* Flag that WHATAMI field is valid *//* WHATAMI2 bits... */#define WMI2_XMODE 1 /* Transfer mode auto(0)/manual(1) */#define WMI2_RECU 2 /* Transfer is recursive */#define WMI2_FLAG 32 /* Flag that WHATAMI2 field is valid */#endif /* WHATAMI *//* Terminal types */#define VT100 0 /* Also for VT52 mode */#define TEKTRONIX 1/* Normal packet and window size */#define MAXPACK 94 /* Maximum unextended packet size */ /* Can't be more than 94. */#ifdef pdp11 /* Maximum sliding window slots */#define MAXWS 8#else#define MAXWS 32 /* Can't be more than 32. */#endif /* pdp11 *//* Maximum long packet size for sending packets *//* Override these from cc command line via -DMAXSP=nnn */#ifdef DYNAMIC#ifndef MAXSP#define MAXSP 9024#endif /* MAXSP */#else /* not DYNAMIC */#ifndef MAXSP#ifdef pdp11#define MAXSP 1024#else#define MAXSP 2048#endif /* pdp11 */#endif /* MAXSP */#endif /* DYNAMIC *//* Maximum long packet size for receiving packets *//* Override these from cc command line via -DMAXRP=nnn */#ifdef DYNAMIC#ifndef MAXRP#define MAXRP 9024#endif /* MAXRP */#else /* not DYNAMIC */#ifndef MAXRP#ifdef pdp11#define MAXRP 1024#else#define MAXRP 2048#endif /* pdp11 */#endif /* MAXRP */#endif /* DYNAMIC *//* Default sizes for windowed packet buffers. Override these from cc command line via -DSBSIZ=nnn, -DRBSIZ=nnn. Or just -DBIGBUFOK.*/#ifndef MAXGETPATH /* Maximum number of directories */#ifdef BIGBUFOK /* for GET path... */#define MAXGETPATH 128#else#define MAXGETPATH 16#endif /* BIGBUFOK */#endif /* MAXGETPATH */#ifndef NOSPL /* Query buffer length */#ifdef OS2#define QBUFL 4095#else#ifdef BIGBUFOK#define QBUFL 4095#else#define QBUFL 1023#endif /* BIGBUFOK */#endif /* OS2 */#endif /* NOSPL */#ifdef DYNAMIC#ifndef SBSIZ#ifdef BIGBUFOK /* If big buffers are safe... */#define SBSIZ 290000 /* Allow for 10 x 9024 or 20 x 4096 */#else /* Otherwise... */#ifdef pdp11#define SBSIZ 3020#else#define SBSIZ 9050 /* Allow for 3 x 3000, etc. */#endif /* pdp11 */#endif /* BIGBUFOK */#endif /* SBSIZ */#ifndef RBSIZ#ifdef BIGBUFOK#define RBSIZ 290000#else#ifdef pdp11#define RBSIZ 3020#else#define RBSIZ 9050#endif /* pdp11 */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -