⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ckcmai.c

📁 KERMIT工具 这在办公室下载不了,很多人都没有载不到.
💻 C
📖 第 1 页 / 共 5 页
字号:
    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,                         /* Debug log is open */    debok = 1,                          /* Debug log is not disabled */    debxlen = 54,                       /* Default length for debug strings */    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 */    xfiletype = -1,                     /* Transfer only text (or binary) */    recursive = 0,                      /* Recursive directory traversal */    nolinks   = 2,                      /* Don't follow symbolic links */    skipbup   = 0,                      /* Skip backup files when sending */    sendmode = SM_SEND,                 /* Which type of SEND operation */    slostart  = 1,                      /* Slow start (grow packet lengths) */    cmask  = 0377,                      /* 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 */    cdactive = 0,                       /* Flag for CD 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 */#ifdef VMS    filepeek = 0,                       /* Inspection of files */#else#ifdef datgeneral    filepeek = 0,#else    filepeek = 1,#endif /* datageneral */#endif /* VMS */    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 NOHELP#ifndef NOCMDL_PROTOTYP( VOID iniopthlp, (void) );    /* Command-line help initializer */#endif /* NOCMDL */#endif /* NOHELP */_PROTOTYP( VOID getexedir, (void) );_PROTOTYP( int putnothing, (char) );#ifdef IKSD_PROTOTYP( VOID doiksdinit, (void) );_PROTOTYP( VOID iksdinit, (void) );_PROTOTYP( VOID doiklog, (void) );_PROTOTYP( int dbinit, (void) );#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 */int adl_err = 1;                        /* 1 = stop on error */#ifdef KUIint adl_ask = 1;			/* 1 = file dialog on autodownload */#elseint adl_ask = 0;			/* 0 = no file dialog */#endif /* KUI */#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;#ifndef NOSERVER/*  Server services:   0 = disabled   1 = enabled in local mode   2 = enabled in remote mode   3 = enabled in both local and remote modes  only as initial (default) values.*/int en_xit = 2;                         /* EXIT */int en_cwd = 3;                         /* CD/CWD */int en_cpy = 3;                         /* COPY   */int en_del = 2;                         /* DELETE */int en_mkd = 3;                         /* MKDIR */int en_rmd = 2;                         /* RMDIR */int en_dir = 3;                         /* DIRECTORY */int en_fin = 3;                         /* FINISH */int en_get = 3;                         /* GET */#ifndef NOPUSHint en_hos = 2;                         /* HOST enabled */#elseint en_hos = 0;                         /* HOST disabled */#endif /* NOPUSH */int en_ren = 3;                         /* RENAME */int en_sen = 3;                         /* SEND */int en_set = 3;                         /* SET */int en_spa = 3;                         /* SPACE */int en_typ = 3;                         /* TYPE */int en_who = 3;                         /* WHO */#ifdef datageneral/* Data General AOS/VS can't do this */int en_bye = 0;                         /* BYE */#elseint en_bye = 2;                         /* PCs in local mode... */#endif /* datageneral */int en_asg = 3;                         /* ASSIGN */int en_que = 3;                         /* QUERY */int en_ret = 2;                         /* RETRIEVE */int en_mai = 3;                         /* MAIL */int en_pri = 3;                         /* PRINT */int en_ena = 3;                         /* ENABLE */#elseint en_xit = 0, en_cwd = 0, en_cpy = 0, en_del = 0, en_mkd = 0, en_rmd = 0,    en_dir = 0, en_fin = 0, en_get = 0, en_hos = 0, en_ren = 0, en_sen = 0,    en_set = 0, en_spa = 0, en_typ = 0, en_who = 0, en_bye = 0, en_asg = 0,    en_que = 0, en_ret = 0, en_mai = 0, en_pri = 0, en_ena = 0;#endif /* NOSERVER */#endif /* NOXFER *//* Miscellaneous */char **xargv;                           /* Global copies of argv */int xargc;                              /* and argc  */int xargs;                              /* an immutable copy of argc */char *xarg0;                            /* and of argv[0] */char *pipedata;                         /* Pointer to -P (pipe) data */extern char *dftty;                     /* Default tty name from ck?tio.c */extern int dfloc;                       /* Default location: remote/local */extern int dfprty;                      /* Default parity */extern int dfflow;                      /* Default flow control */#ifdef TNCODEextern int tn_deb;#endif /* TNCODE *//*  Buffered file input and output buffers.  See getpkt() in ckcfns.c  and zoutdump() in the system-dependent file i/o module (usually ck?fio.c).*/#ifndef DYNAMIC/* Now we allocate them dynamically, see getiobs() below. */char zinbuffer[INBUFSIZE], zoutbuffer[OBUFSIZE];#endif /* DYNAMIC */char *zinptr, *zoutptr;int zincnt, zoutcnt;int zobufsize = OBUFSIZE;int zofbuffer = 1;int zofblock  = 1;#ifdef SESLIMITint seslimit = 0;#endif /* SESLIMIT */#ifdef CK_AUTHENTICATION#include "ckuath.h"#endif /* CK_AUTHENTICATION */_PROTOTYP( int getiobs, (VOID) );/*  M A I N  --  C-Kermit main program  */#include <signal.h>#ifndef NOCCTRAP#include <setjmp.h>#include "ckcsig.h"ckjmpbuf cmjbuf;#ifdef GEMDOS                           /* Special for Atari ST */cc_clean();                             /* This can't be right? */#endif /* GEMDOS */#endif /* NOCCTRAP */#ifndef NOXFER/* Info associated with a system ID */struct sysdata sysidlist[] = {          /* Add others as needed... */  { "0",  "anonymous",    0, NUL,  0, 0, 0 },  { "A1", "Apple II",     0, NUL,  0, 0, 3 }, /* fix this */  { "A3", "Macintosh",    1, ':',  0, 2, 1 },  { "D7", "VMS",          0, ']',  1, 0, 0 },  { "DA", "RSTS/E",       0, ']',  1, 0, 3 }, /* (i think...) */  { "DB", "RT11",         0, NUL,  1, 0, 3 }, /* (maybe...) */  { "F3", "AOS/VS",       1, ':',  0, 0, 2 },  { "I1", "VM/CMS",       0, NUL,  0, 0, 0 },  { "I2", "MVS/TSO",      0, NUL,  0, 0, 0 },  { "I4", "MUSIC",       

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -