📄 ckcker.h
字号:
/* ckcker.h -- Symbol and macro definitions for C-Kermit *//* Author: Frank da Cruz (fdc@columbia.edu, FDCCU@CUVMA.BITNET), Columbia University Center for Computing Activities. First released January 1985. Copyright (C) 1985, 1992, Trustees of Columbia University in the City of New York. Permission is granted to any individual or institution to use this software as long as it is not sold for profit. This copyright notice must be retained. This software may not be included in commercial products without written permission of Columbia University.*/#ifndef CKCKER_H#define CKCKER_H#ifdef NOICP /* No Interactive Command Parser */#ifndef NOSPL /* implies... */#define NOSPL /* No Script Programming Language */#endif /* NOSPL */#endif /* NOICP *//* 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 *//* 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! */#define MAXWS 31 /* Maximum window size */ /* Can't be more than 31! *//* 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#define MAXSP 2048#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 #define MAXRP 2048#endif /* MAXRP */#endif /* DYNAMIC */#ifdef COMMENT /* Restriction removed in edit 185 */#ifdef VMS /* Dynamic or not, */#undef MAXSP /* VMS seems to have an intrinsic */#define MAXSP 1920 /* limit of about 1920. */#undef MAXRP#define MAXRP 1920#endif /* VMS */#endif /* COMMENT *//* Default sizes for windowed packet buffers *//* Override these from cc command line via -DSBSIZ=nnn, -DRBSIZ=nnn */#ifdef DYNAMIC#ifndef SBSIZ #define SBSIZ 9050#endif /* SBSIZ */#ifndef RBSIZ #define RBSIZ 9050#endif /* RBSIZ */#else /* not DYNAMIC */#ifndef SBSIZ#define SBSIZ (MAXPACK * (MAXWS + 1))#endif /* SBSIZ */#ifndef RBSIZ#define RBSIZ (MAXPACK * (MAXWS + 1))#endif /* RBSIZ */#endif /* DYNAMIC */#ifdef COMMENT /* Restriction removed in edit 185 */#ifdef VMS /* VMS again... */#undef SBSIZ#define SBSIZ 1930#undef RBSIZ#define RBSIZ 1930#endif /* VMS */#endif /* COMMENT *//* 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 7 /* Default timeout interval to use. */#define URTIME 10 /* Timeout interval to use on me. */#define DSRVTIM 0 /* Default server cmd wait timeout. */#define DEFTRN 0 /* Default line turnaround handshake */#define DEFPAR 0 /* Default parity */#define MYEOL CR /* Incoming packet terminator. */#define DRPSIZ 90 /* Default incoming packet size. */#define DSPSIZ 90 /* Default outbound packet size. */#define DDELAY 5 /* 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 ZNFILS 11 /* How many defined file numbers *//* Buffered file i/o is used to avoid gratuitous function calls while encoding a packet. The previous way involved 2 nested function calls for EACH character of the file. This way, we only do 2 calls per K of data. This reduces packet encoding time to 1% of its former cost. Originally added by Paul Placeway.*/#ifdef VMS /* In VMS, allow for longest possible RMS record */#ifdef DYNAMIC#define INBUFSIZE 32768 /* File input buffer size */#define OBUFSIZE 32768 /* File output buffer size */#else#define INBUFSIZE 4096 /* File input buffer size */#define OBUFSIZE 4096 /* File output buffer size */#endif /* DYNAMIC */#else /* Not VMS */ /* For all others, just use a 1K buffer */#define INBUFSIZE 1024#define OBUFSIZE 1024#endif /* VMS *//* get the next char; sorta like a getc() macro */#define zminchar() (((--zincnt)>=0) ? ((int)(*zinptr++) & 0377) : zinfill())/* stuff a character into the input buffer */#define zmstuff(c) zinptr--, *zinptr = c, zincnt++/* put a character to a file, like putchar() macro */#define zmchout(c) \((*zoutptr++=(char)(c)),(((++zoutcnt)>=OBUFSIZE)?zoutdump():0))/* Screen functions */#define SCR_FN 1 /* filename */#define SCR_AN 2 /* as-name */#define SCR_FS 3 /* file-size */#define SCR_XD 4 /* x-packet data */#define SCR_ST 5 /* File status: */#define ST_OK 0 /* Transferred OK */#define ST_DISC 1 /* Discarded */#define ST_INT 2 /* Interrupted */#define ST_SKIP 3 /* Skipped */#define ST_ERR 4 /* Fatal Error */#define ST_REFU 5 /* Refused (use Attribute codes for reason) */#define ST_INC 6 /* Incompletely received */#define SCR_PN 6 /* packet number */#define SCR_PT 7 /* packet type or pseudotype */#define SCR_TC 8 /* transaction complete */#define SCR_EM 9 /* error message */#define SCR_WM 10 /* warning message */#define SCR_TU 11 /* arbitrary undelimited text */#define SCR_TN 12 /* arbitrary new text, delimited at beginning */#define SCR_TZ 13 /* arbitrary text, delimited at end */#define SCR_QE 14 /* quantity equals (e.g. "foo: 7") */#define SCR_CW 15 /* close screen window *//* Macros */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -