📄 ckcmai.c
字号:
#ifdef TCPSOCKETint nettype = NET_TCPB; /* Default network type */#else#ifdef SUNX25int nettype = NET_SX25;#else#ifdef IBMX25int nettype = NET_IX25;#else#ifdef HPX25int nettype = NET_HX25;#else#ifdef STRATUSX25int nettype = NET_VX25;#else#ifdef DECNETint nettype = NET_DEC;#else#ifdef SUPERLATint nettype = NET_SLAT;#elseint nettype = NET_NONE;#endif /* SUPERLAT */#endif /* DECNET */#endif /* STRATUSX25 */#endif /* HPX25 */#endif /* IBMX25 */#endif /* SUNX25 */#endif /* TCPSOCKET */#else /* NETCONN */int nettype = NET_NONE;#endif /* NETCONN */#ifdef ANYX25int revcall = 0; /* X.25 reverse call not selected */int closgr = -1; /* X.25 closed user group */int cudata = 0; /* X.25 call user data not specified */char udata[MAXCUDATA]; /* X.25 call user data */#ifdef IBMX25/* I was unable to find any pre-defined MAX values for x25 addresses - the addresses that I've seen have been around 10-12 characters 32 is probably enough, 64 is hopefully safe for everyone.*/ x25addr_t local_nua = {'\0'}; /* local x.25 address */ x25addr_t remote_nua = {'\0'}; /* remote x.25 address */ char x25name[32] = {'\0'}; /* x25 device name, sx25a0 or sx25a1 */ char x25dev[64] = "/dev/x25pkt"; /* x25 device in /dev */ int x25port = 0; /* port used for X.25 - AIX only */#endif /* IBMX25 */#ifndef IBMX25/* This condition is unrelated to the above IBMX25 condition. IBM X.25 doesn't have PAD support.*/ CHAR padparms[MAXPADPARMS+1]; /* X.3 parameters */#endif /* IBMX25 */#endif /* ANYX25 *//* Other items */int isinterrupted = 0; /* Used in exception handling */int what = W_INIT; /* What I am doing */int lastxfer = 0; /* Last transfer (send or receive) */#ifdef NTextern int StartedFromDialer;#ifdef NTSIGextern int TlsIndex;#endif /* NTSIG */#ifdef NTASMunsigned long ESPToRestore; /* Ditto */#endif /* NTASM */#endif /* NT */#ifdef OS2PMint os2pm = 0; /* OS/2 Presentation Manager flag */#endif /* OS2PM *//* Terminal screen size, if known, -1 means unknown. */#ifdef OS2#include "ckocon.h"int tt_rows[VNUM] = {25,24,25,1}; /* Rows (height) */int tt_cols[VNUM] = {80,80,80,80}; /* Columns (width) */int k95stdio = 0; /* Stdio threads */#else /* OS2 */int tt_rows = -1; /* Rows (height) */int tt_cols = -1; /* Columns (width) */#endif /* OS2 */#ifdef OS2int tt_bell = XYB_AUD | XYB_SYS; /* BELL AUDIBLE (system sounds) */#elseint tt_bell = XYB_AUD; /* BELL ON */#endif /* OS2 */int tt_print = 0; /* Transparent print disabled */int tt_escape = 1; /* Escaping back is enabled */int cmd_rows = 24, cmd_cols = 80; /* Command/console screen dimensions */int tn_exit = 0; /* Exit on disconnect */int exitonclose = 0; /* Exit on close */int haveline = 0; /* SET LINE or SET HOST in effect */int tlevel = -1; /* Take-file command level */int hints = 1; /* Whether to give hints */#ifdef NOLOCALint remonly = 1; /* Remote-mode-only advisory (-R) */int nolocal = 1; /* Remote-only strictly enforced */#elseint remonly = 0;int nolocal = 0;#endif /* NOLOCAL */#ifndef NOSPLextern int cmdlvl; /* Command level */extern int maclvl; /* Macro invocation level */#endif /* NOSPL */int protocol = PROTO_K; /* File transfer protocol = Kermit */#ifdef NEWDEFAULTSint prefixing = PX_CAU;#elseint prefixing = PX_ALL;#endif /* NEWDEFAULTS */extern short ctlp[]; /* Control-prefix table */int carrier = CAR_AUT; /* Pay attention to carrier signal */int cdtimo = 0; /* Carrier wait timeout */int xitsta = GOOD_EXIT; /* Program exit status */#ifdef VMS /* Default filename collision action */int fncact = XYFX_X; /* REPLACE for VMS */#elseint fncact = XYFX_B; /* BACKUP for everybody else */#endif /* VMS */int fncsav = -1; /* For saving & restoring the above */int bgset = -1; /* BACKGROUND mode set explicitly */int cmdint = 1; /* Interrupts are allowed */#ifdef UNIXint suspend = DFSUSP; /* Whether SUSPEND command, etc, */#else /* is to be allowed. */int suspend = 0;#endif /* UNIX *//* Statistics variables */long filcnt, /* Number of files in transaction */ filrej, /* Number of files rejected in transaction */ flci, /* Characters from line, current file */ flco, /* Chars to line, current file */ tlci, /* Chars from line in transaction */ tlco, /* Chars to line in transaction */ ffc, /* Chars to/from current file */ tfc, /* Chars to/from files in transaction */ cps = 0L, /* Chars/sec last transfer */ peakcps = 0L, /* Peak chars/sec last transfer */ ccu, /* Control chars unprefixed in transaction */ ccp, /* Control chars prefixed in transaction */ rptn; /* Repeated characters compressed */int tsecs = 0; /* Seconds for transaction */int fsecs = 0; /* Per-file timer */#ifdef GFTIMERCKFLOAT fpfsecs = 0.0, /* Floating point per-file timer */ fptsecs = 0.0; /* and per-transaction timer */#endif /* GFTIMER *//* Flags */int deblog = 0, /* Flag for debug logging */ debses = 0, /* Flag for DEBUG SESSION */ debtim = 0, /* Include timestamp in debug log */ pktlog = 0, /* Flag for packet logging */ seslog = 0, /* Session logging */ dialog = 0, /* DIAL logging */ tralog = 0, /* Transaction logging */ tlogfmt = 1, /* Transaction log format (verbose) */ tlogsep = (int)',', /* Transaction log field separator */ displa = 0, /* File transfer display on/off */ stdouf = 0, /* Flag for output to stdout */ stdinf = 0, /* Flag for input from stdin */ xflg = 0, /* Flag for X instead of F packet */ hcflg = 0, /* Doing Host command */ dest = DEST_D, /* Destination for packet data */ zchkod = 0, /* zchko() should work for dirs too? */ zchkid = 0, /* zchki() should work for dirs too? *//* If you change this, also see struct ptab above... */#ifdef OS2 /* Flag for file name conversion */ fncnv = XYFN_L, /* Default is Literal in OS/2, */ f_save = XYFN_L, /* (saved copy of same) */#else fncnv = XYFN_C, /* elsewhere Convert them */ f_save = XYFN_C, /* (ditto) */#endif /* OS2 */ fnspath = PATH_OFF, /* Send file path */ fnrpath = PATH_AUTO, /* Receive file path */ fackpath = 1, /* Send back path in ACK to F */ binary = XYFT_B, /* Default file transfer mode */ b_save = XYFT_B, /* Saved file mode */ eofmethod = 0, /* EOF detection method (length) */#ifdef OS2 cursor_save = -1, /* Cursor state */#endif /* OS2 */ xfermode = XMODE_A, /* Transfer mode, manual or auto */ recursive = 0, /* Recursive directory traversal */ skipbup = 0, /* Skip backup files when sending */ sendmode = SM_SEND, /* Which type of SEND operation */ slostart = 1, /* Slow start (grow packet lengths) */ cmask = 0177, /* CONNECT (terminal) byte mask */ fmask = 0377, /* File byte mask */ ckwarn = 0, /* Flag for file warning */ quiet = 0, /* Be quiet during file transfer */ local = 0, /* 1 = local mode, 0 = remote mode */ cxtype = CXT_REMOTE, /* Connection type */ server = 0, /* Flag for I Am Server */ query = 0, /* Flag for Query active */ justone = 0, /* Server should do Just One command */ urserver = 0, /* Flag for You Are Server */ bye_active = 0, /* Flag for BYE command active */ diractive = 0, /* Flag for DIRECTORY command active */ cflg = 0, /* Connect before transaction */ cnflg = 0, /* Connect after transaction */ cxseen = 0, /* Flag for cancelling a file */ czseen = 0, /* Flag for cancelling file group */ fatalio = 0, /* Flag for fatal i/o error */ discard = 0, /* Flag for file to be discarded */ keep = SET_AUTO, /* Keep incomplete files = AUTO */ unkcs = 1, /* Keep file w/unknown character set */ nakstate = 0, /* In a state where we can send NAKs */ dblchar = -1, /* Character to double when sending */ moving = 0, /* MOVE = send, then delete */ reliable = SET_AUTO, /* Nonzero if transport is reliable */ xreliable = -1, setreliable = 0, urclear = 0, /* Nonzero for clear channel to you */ clearrq = SET_AUTO, /* SET CLEARCHANEL value */ cleared = 0, streaming = 0, /* Nonzero if streaming is active */ streamok = 0, /* Nonzero if streaming negotiated */ streamrq = SET_AUTO, /* SET STREAMING value */ streamed = -1; /* Whether we streamed last time */char * snd_move = NULL; /* Move file after sending it */char * snd_rename = NULL; /* Rename file after sending it */char * rcv_move = NULL; /* Move file after receiving it */char * rcv_rename = NULL; /* Rename file after receiving it */char * g_snd_move = NULL;char * g_snd_rename = NULL;char * g_rcv_move = NULL;char * g_rcv_rename = NULL;long sendstart = 0L; /* SEND start position */long calibrate = 0L; /* Nonzero if calibration run */#ifdef CK_TRIGGERchar *tt_trigger[TRIGGERS] = { NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL };CHAR *tt_trmatch[TRIGGERS] = { NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL };char *triggerval = NULL;#endif /* CK_TRIGGER */int ckxlogging = 0; /* Flag for syslogging active */int ikdbopen = 0; /* Flag for IKSD database active */int dbinited = 0; /* Flag for IKSDB record init'd */#ifndef CKSYSLOGint ckxsyslog = 0; /* Logging level 0 */#else#ifdef SYSLOGLEVELint ckxsyslog = SYSLOGLEVEL; /* Logging level specified */#elseint ckxsyslog = SYSLG_DF; /* Default logging level */#endif /* SYSLOGLEVEL */#endif /* CKSYSLOG */#ifndef NOICP#ifndef NOHELP#ifndef NOCMDL_PROTOTYP( VOID iniopthlp, (void) ); /* Command-line help initializer */#endif /* NOCMDL */#endif /* NOHELP */#endif /* NOICP */#ifdef IKSD_PROTOTYP( VOID iksdinit, (int) );#endif /* IKSD *//* Variables passed from command parser to protocol module */#ifndef NOSPL#ifndef NOICP#ifdef CK_APC_PROTOTYP( VOID apconect, (void) );#endif /* CK_APC */#ifdef OS2extern int initvik;#endif /* OS2 */#endif /* NOICP */#endif /* NOSPL */char *clcmds = NULL; /* Pointer to command-line commands */#ifndef NOSETKEYextern KEY *keymap;extern MACRO *macrotab;#endif /* NOSETKEY */#ifndef NOPUSHint nopush = 0; /* PUSH enabled */#elseint nopush = 1; /* PUSH disabled */#endif /* NOPUSH */CHAR sstate = (CHAR) 0; /* Starting state for automaton */CHAR zstate = (CHAR) 0; /* For remembering sstate */char * printername = NULL; /* NULL if printer not redirected */int printpipe = 0; /* For SET PRINTER */int noprinter = 0;#ifndef NOXFERchar *cmarg = ""; /* Pointer to command data */char *cmarg2 = ""; /* Pointer to 2nd command data */char **cmlist; /* Pointer to file list in argv */#ifdef CK_AUTODL /* Autodownload */int autodl = 1; /* Enabled by default */#elseint autodl = 0; /* (or if not implemented). */#endif /* CK_AUTODL */#ifdef OS2 /* AUTODOWNLOAD parameters */int adl_kmode = ADL_PACK, /* Match Packet to signal download */ adl_zmode = ADL_PACK;char * adl_kstr = NULL; /* KERMIT Download String */char * adl_zstr = NULL; /* ZMODEM Download String */#endif /* OS2 */int remfile = 0, rempipe = 0, remappd = 0; /* REMOTE output redirection */char * remdest = NULL;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -