📄 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, 1996, Trustees of Columbia University in the City of New York. The C-Kermit software may not be, in whole or in part, licensed or sold for profit as a software product itself, nor may it be included in or distributed with commercial products or otherwise distributed by commercial concerns to their clients or customers without written permission of the Office of Kermit Development and Distribution, Columbia University. This copyright notice must not be removed, altered, or obscured.*/#ifndef CKCKER_H#define CKCKER_H/* If NEWDEFAULTS is defined then: - RECEIVE PACKET-LENGTH is 2048 rather than 90 - WINDOW is 20 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 */#define LOGINLEN 32 /* Length of server login field *//* 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 *//* File transfer protocols */#define PROTO_K 0 /* Kermit */#ifdef CK_XYZ#define PROTO_X 1 /* XMODEM */#define PROTO_Y 2 /* YMODEM */#define PROTO_G 3 /* YMODEM-g */#define PROTO_Z 4 /* ZMODEM */#define PROTO_O 5 /* OTHER */#define NPROTOS 6 /* 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 * 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*/};#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 */#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 NOSPL /* Script programming language */#ifdef CK_APC /* is required for APC. */#undef CK_APC#endif /* CK_APC */#endif /* NOSPL */#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 with Kermit */#ifndef CK_AUTODL /* Autodownload */#ifdef OS2#define CK_AUTODL#else#ifdef UNIX#define CK_AUTODL#else#ifdef VMS#define CK_AUTODL#endif /* VMS */#endif /* UNIX */#endif /* OS2 */#endif /* CK_AUTODL */#endif /* CK_APC *//* Codes for what we are doing now */#define W_NOTHING 0 /* Nothing */#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 */#ifndef NOWHATAMI#ifndef WHATAMI#define WHATAMI#endif /* WHATAMI */#endif /* NOWHATAMI */#ifdef WHATAMI /* Bit mask positions for WHATAMI */#define WM_SERVE 1 /* Server mode */#define WM_FMODE 2 /* File transfer mode */#define WM_FNAME 4 /* File name conversion */#define WM_FLAG3 8 /* Flag for Bit3 */#define WM_FLAG 32 /* Flag that says we got this info */#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#define QBUFL 1023#endif /* OS2 */#endif /* NOSPL */#ifdef DYNAMIC#ifndef SBSIZ #ifdef BIGBUFOK /* If big buffers are safe... */#define SBSIZ 90500 /* 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 90500#else#ifdef pdp11#define RBSIZ 3020#else#define RBSIZ 9050#endif /* pdp11 */#endif /* BIGBUFOK */#endif /* RBSIZ */#else /* not DYNAMIC */#ifdef pdp11#define SBSIZ 3020#define RBSIZ 3020#else#ifndef SBSIZ#define SBSIZ (MAXSP * (MAXWS + 1))#endif /* SBSIZ */#ifndef RBSIZ#define RBSIZ (MAXRP * (MAXWS + 1))#endif /* RBSIZ */#endif /* pdp11 */#endif /* DYNAMIC *//* Kermit parameters and defaults */#define CTLQ '#' /* Control char prefix I will use */#define MYEBQ '&' /* 8th-Bit prefix char I will use */#define MYRPTQ '~' /* Repeat count prefix I will use */#define MAXTRY 10 /* Times to retry a packet */#define MYPADN 0 /* How many padding chars I need */#define MYPADC '\0' /* Which padding character I need */#define DMYTIM 8 /* Initial timeout interval to use. */#define URTIME 15 /* Timeout interval to use on me. */#define DSRVTIM 0 /* Default server cmd wait timeout. */#define DEFTRN 0 /* Default line turnaround handshake */#define MYEOL CR /* Incoming packet terminator. */#ifdef NEWDEFAULTS#define DRPSIZ 4095 /* Default incoming packet size. */#define DFWSIZ 20 /* Default window size */#define DFBCT 3 /* Default block-check type */#else#define DRPSIZ 90 /* Default incoming packet size. */#define DFWSIZ 1 /* Default window size */#define DFBCT 3 /* Default block-check type */#endif /* NEWDEFAULTS */#define DSPSIZ 90 /* Default outbound packet size. */#define DDELAY 1 /* Default delay. */#define DSPEED 9600 /* Default line speed. */#ifdef OS2 /* Default CONNECT-mode */#define DFESC 29 /* escape character */#else#ifdef NEXT /* Ctrl-] for PC and NeXT */#define DFESC 29#else#ifdef GEMDOS /* And Atari ST */#define DFESC 29#else#define DFESC 28 /* Ctrl-backslash for others */#endif /* GEMDOS */#endif /* NEXT */#endif /* OS2 */#ifdef NOPUSH /* NOPUSH implies NOJC */#ifndef NOJC /* (no job control) */#define NOJC#endif /* NOJC */#endif /* NOPUSH */#ifdef UNIX /* Default for SET SUSPEND */#ifdef NOJC /* UNIX but job control disabled */#define DFSUSP 0#else /* UNIX, job control enabled. */#define DFSUSP 1#endif /* NOJC */#else#define DFSUSP 0#endif /* UNIX *//* Files */#define ZCTERM 0 /* Console terminal */#define ZSTDIO 1 /* Standard input/output */#define ZIFILE 2 /* Current input file (SEND, etc) (in) */#define ZOFILE 3 /* Current output file (RECEIVE, GET) (out) */#define ZDFILE 4 /* Current debugging log file (out) */#define ZTFILE 5 /* Current transaction log file (out) */#define ZPFILE 6 /* Current packet log file (out) */#define ZSFILE 7 /* Current session log file (out) */#define ZSYSFN 8 /* Input/Output from a system function */#define ZRFILE 9 /* Local file for READ (in) */#define ZWFILE 10 /* Local file for WRITE (out) */#define ZMFILE 11 /* Miscellaneous output file, e.g. for XLATE */#define ZNFILS 12 /* How many defined file numbers *//* Buffered file i/o ... */#ifdef pdp11#define INBUFSIZE 512#define OBUFSIZE 512#else#ifdef VMS /* In VMS, allow for longest possible RMS record */#define INBUFSIZE 32768 /* File input buffer size */#define OBUFSIZE 32768 /* File output buffer size */#else /* Not VMS */#ifdef BIGBUFOK /* Systems where memory is */#define INBUFSIZE 32768 /* not a problem... */#define OBUFSIZE 32768#else /* Not BIGBUFOK */#ifdef STRATUS#ifdef DYNAMIC#define INBUFSIZE 32767 /* File input buffer size */#define OBUFSIZE 32767 /* File output buffer size */#else /* STRATUS, not DYNAMIC */#define INBUFSIZE 4096 /* File input buffer size */#define OBUFSIZE 4096 /* File output buffer size */#endif /* DYNAMIC */#else /* not STRATUS */#ifdef OS2 /* OS/2 and friends */#ifdef NT#define INBUFSIZE 32768 /* Windows 95 and NT */#define OBUFSIZE 32768#else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -