Merge branch 'upstream' into ckermit-212-beta
authorIan Beckwith <ianb@erislabs.net>
Thu, 23 Jun 2011 23:57:35 +0000 (00:57 +0100)
committerIan Beckwith <ianb@erislabs.net>
Thu, 23 Jun 2011 23:57:35 +0000 (00:57 +0100)
35 files changed:
ckcpro.c [deleted file]
debian/README.Debian [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/ckermit.lintian-overrides [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/config [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/iksd.conf [new file with mode: 0644]
debian/kermit.pam [new file with mode: 0644]
debian/kermrc [new file with mode: 0644]
debian/links [new file with mode: 0644]
debian/menu [new file with mode: 0644]
debian/po/POTFILES.in [new file with mode: 0644]
debian/po/cs.po [new file with mode: 0644]
debian/po/da.po [new file with mode: 0644]
debian/po/de.po [new file with mode: 0644]
debian/po/es.po [new file with mode: 0644]
debian/po/fi.po [new file with mode: 0644]
debian/po/fr.po [new file with mode: 0644]
debian/po/gl.po [new file with mode: 0644]
debian/po/it.po [new file with mode: 0644]
debian/po/ja.po [new file with mode: 0644]
debian/po/pt.po [new file with mode: 0644]
debian/po/ru.po [new file with mode: 0644]
debian/po/sv.po [new file with mode: 0644]
debian/po/templates.pot [new file with mode: 0644]
debian/postinst [new file with mode: 0644]
debian/postrm [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/source/format [new file with mode: 0644]
debian/templates [new file with mode: 0644]
debian/watch [new file with mode: 0644]

diff --git a/ckcpro.c b/ckcpro.c
deleted file mode 100644 (file)
index 3c51b6b..0000000
--- a/ckcpro.c
+++ /dev/null
@@ -1,3814 +0,0 @@
-
-/* WARNING -- This C source program generated by Wart preprocessor. */
-/* Do not edit this file; edit the Wart-format source file instead, */
-/* and then run it through Wart to produce a new C source file.     */
-
-/* Wart Version Info: */
-char *wartv = "Wart Version 2.14, 10 Nov 1999";
-
-char *protv =                                                     /* -*-C-*- */
-"C-Kermit Protocol Module 8.0.160, 12 Aug 2007";
-
-int kactive = 0;                       /* Kermit protocol is active */
-
-#define PKTZEROHACK
-
-/* C K C P R O  -- C-Kermit Protocol Module, in Wart preprocessor notation. */
-/*
-  Author: Frank da Cruz <fdc@columbia.edu>,
-  Columbia University Academic Information Systems, New York City.
-
-  Copyright (C) 1985, 2007,
-    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 NOXFER
-#include "ckcsym.h"
-#include "ckcdeb.h"
-#include "ckcasc.h"
-#include "ckcker.h"
-#ifdef OS2
-#ifndef NT
-#define INCL_NOPM
-#define INCL_VIO                       /* Needed for ckocon.h */
-#include <os2.h>
-#undef COMMENT
-#endif /* NT */
-#include "ckocon.h"
-#endif /* OS2 */
-
-/*
- Note -- This file may also be preprocessed by the UNIX Lex program, but
- you must indent the above #include statements before using Lex, and then
- restore them to the left margin in the resulting C program before compilation.
- Also, the invocation of the "wart()" function below must be replaced by an
- invocation  of the "yylex()" function.  It might also be necessary to remove
- comments in the (%)(%)...(%)(%) section.
-*/
-
-/* State definitions for Wart (or Lex) */
-#define ipkt 1
-#define rfile 2
-#define rattr 3
-#define rdpkt 4
-#define ssinit 5
-#define ssfile 6
-#define ssattr 7
-#define ssdata 8
-#define sseof 9
-#define sseot 10
-#define serve 11
-#define generic 12
-#define get 13
-#define rgen 14
-#define ssopkt 15
-#define ropkt 16
-
-_PROTOTYP(static VOID xxproto,(void));
-_PROTOTYP(static VOID wheremsg,(void));
-_PROTOTYP(int wart,(void));
-_PROTOTYP(static int sgetinit,(int,int));
-_PROTOTYP(int sndspace,(int));
-
-/* External C-Kermit variable declarations */
-  extern char *versio, *srvtxt, *cmarg, *cmarg2, **cmlist, *rf_err;
-  extern char * rfspec, * sfspec, * srfspec, * rrfspec;
-  extern char * prfspec, * psfspec, * psrfspec, * prrfspec;
-  extern char *cdmsgfile[];
-  extern char * snd_move, * snd_rename, * srimsg;
-  extern char filnam[], ofilnam[], fspec[], ttname[], ofn1[];
-  extern CHAR sstate, *srvptr, *data;
-  extern int timint, rtimo, nfils, hcflg, xflg, flow, mdmtyp, network;
-  extern int oopts, omode, oname, opath, nopush, isguest, xcmdsrc, rcdactive;
-  extern int rejection, moving, fncact, bye_active, urserver, fatalio;
-  extern int protocol, prefixing, filcnt, carrier, fnspath, interrupted;
-  extern int recursive, inserver, nzxopts, idletmo, srvidl, xfrint;
-  extern struct ck_p ptab[];
-  extern int remfile, rempipe, xferstat, filestatus, wearealike, fackpath;
-  extern int patterns, filepeek, gnferror;
-  extern char * remdest;
-
-#ifdef PKTZEROHACK
-#define PKTZEROLEN 32
-static char ipktack[PKTZEROLEN];
-static int ipktlen = 0;
-#endif /* PKTZEROHACK */
-
-static int s_timint = -1;              /* For saving timeout value */
-static int myjob = 0;
-static int havefs = 0;
-#ifdef CK_LOGIN
-static int logtries = 0;
-#endif /* CK_LOGIN */
-
-static int cancel = 0;
-int fackbug = 0;
-
-#ifdef STREAMING
-extern int streaming, streamok;
-
-static VOID
-streamon() {
-    if (streamok) {
-       debug(F100,"streamon","",0);
-       streaming = 1;
-       timint = 0;                     /* No timeouts while streaming. */
-    }
-}
-
-#ifdef COMMENT                         /* (not used) */
-static VOID
-streamoff() {
-    if (streaming) {
-       debug(F100,"streamoff","",0);
-       streaming = 0;
-       timint = s_timint;              /* Restore timeout */
-    }
-}
-#endif /* COMMENT */
-#else /* STREAMING */
-#define streamon()
-#define streamoff()
-#endif /* STREAMING */
-
-#ifndef NOSPL
-_PROTOTYP( int addmac, (char *, char *) );
-_PROTOTYP( int zzstring, (char *, char **, int *) );
-#endif /* NOSPL */
-#ifndef NOICP
-_PROTOTYP( int cmdsrc, (void) );
-#endif /* NOICP */
-
-#ifndef NOSERVER
-  extern char * x_user, * x_passwd, * x_acct;
-  extern int x_login, x_logged;
-#endif /* NOSERVER */
-
-#include "ckcnet.h"
-
-#ifdef TNCODE
-  extern int ttnproto;                 /* Network protocol */
-#endif /* TNCODE */
-
-#ifdef CK_SPEED
-  extern short ctlp[];                 /* Control-character prefix table */
-#endif /* CK_SPEED */
-
-#ifdef TNCODE
-  extern int tn_b_nlm, tn_b_xfer, tn_nlm;
-#ifdef CK_ENCRYPTION
-  extern int tn_no_encrypt_xfer;
-#endif /* CK_ENCRYPTION */
-#endif /* TNCODE */
-
-#ifdef TCPSOCKET
-#ifndef NOLISTEN
-  extern int tcpsrfd;
-#endif /* NOLISTEN */
-#endif /* TCPSOCKET */
-
-  extern int cxseen, czseen, server, srvdis, local, displa, bctu, bctr, bctl;
-  extern int quiet, tsecs, parity, backgrd, nakstate, atcapu, wslotn, winlo;
-  extern int wslots, success, xitsta, rprintf, discard, cdtimo, keep, fdispla;
-  extern int timef, stdinf, rscapu, sendmode, epktflg, epktrcvd, epktsent;
-  extern int binary, fncnv;
-  extern long speed, ffc, crc16, calibrate, dest;
-#ifdef COMMENT
-  extern char *TYPCMD, *DIRCMD, *DIRCM2;
-#endif /* COMMENT */
-#ifndef OS2
-  extern char *SPACMD, *SPACM2, *WHOCMD;
-#endif /* OS2 */
-  extern CHAR *rdatap;
-  extern struct zattr iattr;
-
-#ifdef VMS
-  extern int batch;
-#endif /* VMS */
-
-#ifdef GFTIMER
-  extern CKFLOAT fptsecs;
-#endif /* GFTIMER */
-
-  extern CHAR *srvcmd;
-  extern CHAR *epktmsg;
-
-#ifdef CK_TMPDIR
-extern int f_tmpdir;                   /* Directory changed temporarily */
-extern char savdir[];                  /* For saving current directory */
-extern char * dldir;
-#endif /* CK_TMPDIR */
-
-  extern int query;                    /* Query-active flag */
-#ifndef NOSPL
-  extern int cmdlvl;
-  char querybuf[QBUFL+1] = { NUL, NUL }; /* QUERY response buffer */
-  char *qbufp = querybuf;              /* Pointer to it */
-  int qbufn = 0;                       /* Length of data in it */
-#else
-  extern int tlevel;
-#endif /* NOSPL */
-
-#ifndef NOICP
-  extern int escape;
-#endif /* NOICP */
-/*
-  If the following flag is nonzero when the protocol module is entered,
-  then server mode persists for exactly one transaction, rather than
-  looping until BYE or FINISH is received.
-*/
-extern int justone;
-
-static int r_save = -1;
-static int p_save = -1;
-
-/* Function to let remote-mode user know where their file(s) went */
-
-int whereflg = 1;                      /* Unset with SET XFER REPORT */
-
-static VOID
-wheremsg() {
-    extern int quiet, filrej;
-    int n;
-    n = filcnt - filrej;
-    debug(F101,"wheremsg n","",n);
-
-    debug(F110,"wheremsg prfspec",prfspec,0);
-    debug(F110,"wheremsg rfspec",rfspec,0);
-    debug(F110,"wheremsg psfspec",psfspec,0);
-    debug(F110,"wheremsg sfspec",sfspec,0);
-
-    debug(F110,"wheremsg prrfspec",prrfspec,0);
-    debug(F110,"wheremsg rrfspec",rrfspec,0);
-    debug(F110,"wheremsg psrfspec",psrfspec,0);
-    debug(F110,"wheremsg srfspec",srfspec,0);
-
-    if (!quiet && !local) {
-       if (n == 1) {
-           switch (myjob) {
-             case 's':
-               if (sfspec) {
-                   printf(" SENT: [%s]",sfspec);
-                   if (srfspec)
-                     printf(" To: [%s]",srfspec);
-                   printf(" (%s)\r\n", success ? "OK" : "FAILED");
-               }
-               break;
-             case 'r':
-             case 'v':
-               if (rrfspec) {
-                   printf(" RCVD: [%s]",rrfspec);
-                   if (rfspec)
-                     printf(" To: [%s]",rfspec);
-                   printf(" (%s)\r\n", success ? "OK" : "FAILED");
-               }
-           }
-       } else if (n > 1) {
-           switch (myjob) {
-             case 's':
-               if (sfspec) {
-                   printf(" SENT: (%d files)",n);
-                   if (srfspec)
-                     printf(" Last: [%s]",srfspec);
-                   printf(" (%s)\r\n", success ? "OK" : "FAILED");
-               }
-               break;
-             case 'r':
-             case 'v':
-               if (rrfspec) {
-                   printf(" RCVD: (%d files)",n);
-                   if (rfspec)
-                     printf(" Last: [%s]",rfspec);
-                   printf(" (%s)\r\n", success ? "OK" : "FAILED");
-               }
-           }
-       } else if (n == 0) {
-           if (myjob == 's')
-             printf(" SENT: (0 files)          \r\n");
-           else if (myjob == 'r' || myjob == 'v')
-             printf(" RCVD: (0 files)          \r\n");
-       }
-    }
-}
-
-static VOID
-rdebug() {
-    if (server)
-      debug(F111,"RESUME","server=1",justone);
-    else
-      debug(F111,"RESUME","server=0",justone);
-}
-
-/* Flags for the ENABLE and DISABLE commands */
-extern int
-  en_cpy, en_cwd, en_del, en_dir, en_fin, en_get, en_bye, en_mai, en_pri,
-  en_hos, en_ren, en_sen, en_spa, en_set, en_typ, en_who, en_ret, en_xit,
-  en_mkd, en_rmd;
-#ifndef NOSPL
-extern int en_asg, en_que;
-#endif /* NOSPL */
-extern int what, lastxfer;
-
-/* Global variables declared here */
-
-  int whatru = 0;                      /* What are you. */
-  int whatru2 = 0;                     /* What are you, cont'd. */
-
-/* Local variables */
-
-  static char vstate = 0;              /* Saved State   */
-  static char vcmd = 0;                /* Saved Command */
-  static int reget = 0;                        /* Flag for executing REGET */
-  static int retrieve = 0;             /* Flag for executing RETRIEVE */
-  static int opkt = 0;                 /* Send Extended GET packet */
-
-  static int x;                                /* General-purpose integer */
-  static char *s;                      /* General-purpose string pointer */
-
-/* Macros - Note, BEGIN is predefined by Wart (and Lex) as "state = ", */
-/* BEGIN is NOT a GOTO! */
-#define TINIT if (tinit(1) < 0) return(-9)
-#define SERVE { TINIT; resetc(); nakstate=1; what=W_NOTHING; cmarg2=""; \
-sendmode=SM_SEND; havefs=0; recursive=r_save; fnspath=p_save; BEGIN serve; }
-#define RESUME { rdebug(); if (!server) { wheremsg(); return(0); } else \
-if (justone) { justone=0; wheremsg(); return(0); } else { SERVE; } }
-
-#ifdef GFTIMER
-#define QUIT x=quiet; quiet=1; clsif(); clsof(1); tsecs=gtimer(); \
- fptsecs=gftimer(); quiet=x; return(success)
-#else
-#define QUIT x=quiet; quiet=1; clsif(); clsof(1); tsecs=gtimer(); quiet=x; \
- return(success)
-#endif /* GFTIMER */
-
-/*
-  By late 1999, the big switch() statement generated from the following state
-  table began choking even gcc, so here we extract the code from the larger
-  states into static routines to reduce the size of the cases and the
-  switch() overall.  The routines follow the state table; the prototypes are
-  here.  Each of these routines simply contains the text from the
-  corresponding case, but with return(-1) added in appropriate places; see
-  instructions after the state table switcher.
-*/
-static int rc;                         /* Return code for these routines */
-static int rcv_s_pkt();                        /* Received an S packet */
-static int rcv_firstdata();            /* Received first Data packet */
-static int rcv_shortreply();           /* Short reply to a REMOTE command  */
-static int srv_query();                        /* Server answers an query */
-static int srv_copy();                 /* Server executes REMOTE COPY */
-static int srv_rename();               /* Server executes REMOTE RENAME */
-static int srv_login();                        /* Server executes REMOTE LOGIN */
-static int srv_timeout();              /* Server times out */
-
-
-#define BEGIN state =
-
-int state = 0;
-
-int
-wart()
-{
-    int c,actno;
-    extern char tbl[];
-    while (1) {
-       c = input() - 32;
-       debug(F000,"PROTO input",ckitoa(state),c+32);
-       if (c < 0 || c > 95) c = 0;
-       if ((actno = tbl[c + state*96]) != -1)
-           switch(actno) {
-case 1:
-    { TINIT;                           /* Send file(s) */
-    if (sinit() > 0) BEGIN ssinit;
-       else RESUME; }
-    break;
-case 2:
-    { TINIT; nakstate = 1; BEGIN get; }
-    break;
-case 3:
-    {                                  /* Client sends a GET command */
-    TINIT;
-    vstate = get;
-    reget = 0;
-    retrieve = 0;
-    opkt = 0;
-    vcmd = 0;
-#ifdef PKTZEROHACK
-    ipktack[0] = NUL;
-#endif /* PKTZEROHACK */
-    if (sipkt('I') >= 0)
-      BEGIN ipkt;
-    else
-      RESUME;
-}
-    break;
-case 4:
-    {                                  /* Client sends a RETRIEVE command */
-    TINIT;
-    vstate = get;
-    reget = 0;
-    retrieve = 1;
-    opkt = 0;
-    vcmd = 0;
-    if (sipkt('I') >= 0)
-      BEGIN ipkt;
-    else
-      RESUME;
-}
-    break;
-case 5:
-    {                                  /* Client sends a REGET command */
-    TINIT;
-    vstate = get;
-    reget = 1;
-    retrieve = 0;
-    opkt = 0;
-    vcmd = 0;
-    if (sipkt('I') >= 0)
-      BEGIN ipkt;
-    else
-      RESUME;
-}
-    break;
-case 6:
-    {                                  /* Client sends Extended GET Packet */
-    TINIT;
-    vstate = get;
-    reget = oopts & GOPT_RES;
-    retrieve = oopts & GOPT_DEL;
-    opkt = 1;
-    vcmd = 0;
-    if (sipkt('I') >= 0)
-      BEGIN ipkt;
-    else
-      RESUME;
-}
-    break;
-case 7:
-    {                                  /* Client sends a Host command */
-    TINIT;
-    vstate = rgen;
-    vcmd = 'C';
-    if (sipkt('I') >= 0)
-      BEGIN ipkt;
-    else
-      RESUME;
-}
-    break;
-case 8:
-    { TINIT;                           /* Client sends a Kermit command */
-    vstate = rgen;
-    vcmd = 'K';
-    if (sipkt('I') >= 0)
-      BEGIN ipkt;
-    else
-      RESUME;
-}
-    break;
-case 9:
-    {                                  /* Client sends a REMOTE command */
-    TINIT;
-    vstate = rgen;
-    vcmd = 'G';
-    if (sipkt('I') >= 0)
-      BEGIN ipkt;
-    else
-      RESUME;
-}
-    break;
-case 10:
-    {                                  /* Enter server mode */
-    int x;
-    x = justone;
-    if (!ENABLED(en_del)) {            /* If DELETE is disabled */
-       if (fncact == XYFX_B ||         /* undo any file collision action */
-           fncact == XYFX_U ||         /* that could result in deletion or */
-           fncact == XYFX_A ||         /* modification of existing files. */
-           fncact == XYFX_X) {
-#ifndef NOICP
-           extern int g_fncact;
-           g_fncact = fncact;          /* Save current setting */
-#endif /* NOICP */
-           fncact = XYFX_R;            /* Change to RENAME */
-           debug(F101,"server DELETE disabled so fncact RENAME","",fncact);
-       }
-    }
-    SERVE;                             /* tinit() clears justone... */
-    justone = x;
-#ifdef IKSDB
-    if (ikdbopen) slotstate(what, "SERVER", "", "");
-#endif /* IKSDB */
-}
-    break;
-case 11:
-    {
-    int b1 = 0, b2 = 0;
-    if (!data) TINIT;                  /* "ABEND" -- Tell other side. */
-#ifndef pdp11
-    if (epktflg) {                     /* If because of E-PACKET command */
-       b1 = bctl; b2 = bctu;           /* Save block check type */
-       bctl = bctu = 1;                /* set it to 1 */
-    }
-#endif /* pdp11 */
-    errpkt((CHAR *)"User cancelled");  /* Send the packet */
-#ifndef pdp11
-    if (epktflg) {                     /* Restore the block check */
-       epktflg = 0;
-       bctl = b1; bctu = b2;
-    }
-#endif /* pdp11 */
-    success = 0;
-    return(0);                         /* Return from protocol. */
-}
-    break;
-case 12:
-    {          /* Receive Send-Init packet. */
-    rc = rcv_s_pkt();
-    cancel = 0;                                /* Reset cancellation counter */
-    debug(F101,"rcv_s_pkt","",rc);
-    if (rc > -1) return(rc);           /* (see below) */
-}
-    break;
-case 13:
-    {                          /* Get ack for I-packet */
-    int x = 0;
-#ifdef PKTZEROHACK
-    ckstrncpy(ipktack,(char *)rdatap,PKTZEROLEN); /* Save a copy of the ACK */
-    ipktlen = strlen(ipktack);
-#endif /* PKTZEROHACK */
-    spar(rdatap);                      /* Set parameters */
-    cancel = 0;
-    winlo = 0;                         /* Set window-low back to zero */
-    debug(F101,"<ipkt>Y winlo","",winlo);
-    urserver = 1;                      /* So I know I'm talking to a server */
-    if (vcmd) {                                /* If sending a generic command */
-       if (tinit(0) < 0) return(-9);   /* Initialize many things */
-       x = scmd(vcmd,(CHAR *)cmarg);   /* Do that */
-       if (x >= 0) x = 0;              /* (because of O-Packet) */
-       debug(F101,"proto G packet scmd","",x);
-       vcmd = 0;                       /* and then un-remember it. */
-    } else if (vstate == get) {
-       debug(F101,"REGET sstate","",sstate);
-       x = srinit(reget, retrieve, opkt); /* GET or REGET, etc */
-    }
-    if (x < 0) {                       /* If command was too long */
-       if (!srimsg)
-         srimsg = "Error sending string";
-       errpkt((CHAR *)srimsg);         /* cancel both sides. */
-       success = 0;
-       RESUME;
-    } else if (x > 0) {                        /* Need to send more O-Packets */
-       BEGIN ssopkt;
-    } else {
-       rtimer();                       /* Reset the elapsed seconds timer. */
-#ifdef GFTIMER
-       rftimer();
-#endif /* GFTIMER */
-       winlo = 0;                      /* Window back to 0, again. */
-       debug(F101,"<ipkt>Y vstate","",vstate);
-       nakstate = 1;                   /* Can send NAKs from here. */
-       BEGIN vstate;                   /* Switch to desired state */
-    }
-}
-    break;
-case 14:
-    {                          /* Got ACK to O-Packet */
-    debug(F100,"CPCPRO <ssopkt>Y","",0);
-    x = sopkt();
-    debug(F101,"CPCPRO <ssopkt>Y x","",x);
-    if (x < 0) {                       /* If error */
-       errpkt((CHAR *)srimsg);         /* cancel both sides. */
-       success = 0;
-       RESUME;
-    } else if (x == 0) {               /* This was the last O-Packet */
-       rtimer();                       /* Reset the elapsed seconds timer. */
-#ifdef GFTIMER
-       rftimer();
-#endif /* GFTIMER */
-       winlo = 0;                      /* Window back to 0, again. */
-       debug(F101,"<ssopkt>Y winlo","",winlo);
-       nakstate = 1;                   /* Can send NAKs from here. */
-       BEGIN vstate;                   /* Switch to desired state */
-    }
-    debug(F101,"CPCPRO <ssopkt>Y not changing state","",x);
-}
-    break;
-case 15:
-    {                          /* Ignore Error reply to I packet */
-    int x = 0;
-    winlo = 0;                         /* Set window-low back to zero */
-    debug(F101,"<ipkt>E winlo","",winlo);
-    if (vcmd) {                                /* In case other Kermit doesn't */
-       if (tinit(0) < 0) return(-9);
-       x = scmd(vcmd,(CHAR *)cmarg);   /* understand I-packets. */
-       if (x >= 0) x = 0;              /* (because of O-Packet) */
-       vcmd = 0;                       /* Otherwise act as above... */
-    } else if (vstate == get) x = srinit(reget, retrieve, opkt);
-    if (x < 0) {                       /* If command was too long */
-       errpkt((CHAR *)srimsg);         /* cancel both sides. */
-       success = 0;
-       RESUME;
-    } else if (x > 0) {                        /* Need to send more O-Packets */
-       BEGIN ssopkt;
-    } else {
-       freerpkt(winlo);                /* Discard the Error packet. */
-       debug(F101,"<ipkt>E winlo","",winlo);
-       winlo = 0;                      /* Back to packet 0 again. */
-       nakstate = 1;                   /* Can send NAKs from here. */
-       BEGIN vstate;
-    }
-}
-    break;
-case 16:
-    {          /* Resend of previous I-pkt ACK, same seq number */
-    freerpkt(0);                       /* Free the ACK's receive buffer */
-    resend(0);                         /* Send the GET packet again. */
-}
-    break;
-case 17:
-    {                          /* Get I-packet */
-#ifndef NOSERVER
-    spar(rdatap);                      /* Set parameters from it */
-    ack1(rpar());                      /* Respond with our own parameters */
-#ifdef COMMENT
-    pktinit();                         /* Reinitialize packet numbers */
-#else
-#ifdef COMMENT
-    /* This can't be right - it undoes the stuff we just negotiated */
-    x = justone;
-    tinit(1);                          /* Reinitialize EVERYTHING */
-    justone = x;                       /* But this... */
-#else
-    tinit(0);                          /* Initialize most things */
-#endif /* COMMENT */
-#endif /* COMMENT */
-#endif /* NOSERVER */
-    cancel = 0;                                /* Reset cancellation counter */
-}
-    break;
-case 18:
-    {                          /* GET */
-#ifndef NOSERVER
-    if (x_login && !x_logged) {
-       errpkt((CHAR *)"Login required");
-       SERVE;
-    } else if (sgetinit(0,0) < 0) {
-       RESUME;
-    } else {
-#ifdef CKSYSLOG
-       if (ckxsyslog >= SYSLG_PR && ckxlogging)
-         cksyslog(SYSLG_PR, 1, "server", "GET", (char *)srvcmd);
-#endif /* CKSYSLOG */
-       BEGIN ssinit;
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 19:
-    {                          /* GET /DELETE (RETRIEVE) */
-#ifndef NOSERVER
-    if (x_login && !x_logged) {
-       errpkt((CHAR *)"Login required");
-       RESUME;
-    } else if (!ENABLED(en_del)) {
-       errpkt((CHAR *)"Deleting files is disabled");
-       RESUME;
-    } else if (sgetinit(0,0) < 0) {
-       RESUME;
-    } else {
-       moving = 1;
-#ifdef CKSYSLOG
-       if (ckxsyslog >= SYSLG_PR && ckxlogging)
-         cksyslog(SYSLG_PR, 1, "server", "GET /DELETE", (char *)srvcmd);
-#endif /* CKSYSLOG */
-       BEGIN ssinit;
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 20:
-    {                          /* GET /RECURSIVE */
-#ifndef NOSERVER
-    recursive = 1;                     /* Set these before sgetinit() */
-    if (fnspath == PATH_OFF)
-      fnspath = PATH_REL;              /* Don't worry, they will be */
-    if (x_login && !x_logged) {                /* reset next time through. */
-       errpkt((CHAR *)"Login required");
-       RESUME;
-    } else if (sgetinit(0,0) < 0) {
-       RESUME;
-    } else {
-#ifdef CKSYSLOG
-       if (ckxsyslog >= SYSLG_PR && ckxlogging)
-         cksyslog(SYSLG_PR, 1, "server", "GET /RECURSIVE", (char *)srvcmd);
-#endif /* CKSYSLOG */
-       BEGIN ssinit;
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 21:
-    {                          /* GET /RECURSIVE /DELETE */
-#ifndef NOSERVER
-    recursive = 1;                     /* Set these before sgetinit() */
-    if (fnspath == PATH_OFF)
-      fnspath = PATH_REL;              /* Don't worry, they will be */
-    moving = 1;                                /* reset next time through. */
-    if (x_login && !x_logged) {
-       errpkt((CHAR *)"Login required");
-       RESUME;
-    } else if (!ENABLED(en_del)) {
-       errpkt((CHAR *)"Deleting files is disabled");
-       RESUME;
-    } else if (sgetinit(0,0) < 0) {
-       RESUME;
-    } else {
-#ifdef CKSYSLOG
-       if (ckxsyslog >= SYSLG_PR && ckxlogging)
-         cksyslog(SYSLG_PR,1,"server",
-                  "GET /RECURSIVE /DELETE",(char *)srvcmd);
-#endif /* CKSYSLOG */
-       BEGIN ssinit;
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 22:
-    {                          /* GET /RECOVER (REGET) */
-#ifndef NOSERVER
-    if (x_login && !x_logged) {
-       errpkt((CHAR *)"Login required");
-       SERVE;
-    } else if (sgetinit(1,0) < 0) {
-       RESUME;
-    } else {
-#ifdef CKSYSLOG
-       if (ckxsyslog >= SYSLG_PR && ckxlogging)
-         cksyslog(SYSLG_PR, 1, "server", "GET /RECOVER", (char *)srvcmd);
-#endif /* CKSYSLOG */
-       BEGIN ssinit;
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 23:
-    {                          /* Extended GET */
-#ifndef NOSERVER
-    if (x_login && !x_logged) {                /* (any combination of options) */
-       errpkt((CHAR *)"Login required");
-       SERVE;
-    } else if ((x = sgetinit(0,1)) < 0) {
-       debug(F101,"CKCPRO <serve>O sgetinit fail","",x);
-       RESUME;
-    } else if (x == 0) {
-       debug(F101,"CKCPRO <serve>O sgetinit done","",x);
-#ifdef CKSYSLOG
-       if (ckxsyslog >= SYSLG_PR && ckxlogging)
-         cksyslog(SYSLG_PR, 1, "server", "EXTENDED GET", (char *)srvcmd);
-#endif /* CKSYSLOG */
-       BEGIN ssinit;
-    } else {                           /* Otherwise stay in this state */
-       debug(F101,"CKCPRO <serve>O sgetinit TBC","",x);
-       ack();
-       BEGIN ropkt;
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 24:
-    {
-#ifndef NOSERVER
-    if (x_login && !x_logged) {                /* (any combination of options) */
-       errpkt((CHAR *)"Login required");
-       SERVE;
-    } else if ((x = sgetinit(0,1)) < 0) {
-       debug(F101,"CKCPRO <ropkt>O sgetinit fail","",x);
-       RESUME;
-    } else if (x == 0) {
-       debug(F101,"CKCPRO <ropkt>O sgetinit done","",x);
-#ifdef CKSYSLOG
-       if (ckxsyslog >= SYSLG_PR && ckxlogging)
-         cksyslog(SYSLG_PR, 1, "server", "EXTENDED GET", (char *)srvcmd);
-#endif /* CKSYSLOG */
-       BEGIN ssinit;
-    } else {                           /* Otherwise stay in this state */
-       debug(F101,"CKCPRO <ropkt>O sgetinit TBC","",x);
-       ack();
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 25:
-    {                          /* Generic server command */
-#ifndef NOSERVER
-    srvptr = srvcmd;                   /* Point to command buffer */
-    decode(rdatap,putsrv,0);           /* Decode packet data into it */
-    putsrv(NUL);                       /* Insert a couple nulls */
-    putsrv(NUL);                       /* for termination */
-    if (srvcmd[0]) {
-       sstate = srvcmd[0];             /* Set requested start state */
-       if (x_login && !x_logged &&     /* Login required? */
-           /* Login, Logout, and Help are allowed when not logged in */
-           sstate != 'I' && sstate != 'L' && sstate != 'H') {
-           errpkt((CHAR *)"Login required");
-           SERVE;
-       } else {
-           nakstate = 0;               /* Now I'm the sender. */
-           what = W_REMO;              /* Doing a REMOTE command. */
-#ifdef STREAMING
-           if (!streaming)
-#endif /* STREAMING */
-             if (timint < 1)
-               timint = chktimo(rtimo,timef); /* Switch to per-packet timer */
-           binary = XYFT_T;            /* Switch to text mode */
-           BEGIN generic;              /* Switch to generic command state */
-       }
-    } else {
-       errpkt((CHAR *)"Badly formed server command"); /* report error */
-       RESUME;                 /* & go back to server command wait */
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 26:
-    {                          /* Receive Host command */
-#ifndef NOSERVER
-    if (x_login && !x_logged) {
-       errpkt((CHAR *)"Login required");
-       SERVE;
-    } else if (!ENABLED(en_hos)) {
-       errpkt((CHAR *)"REMOTE HOST disabled");
-       RESUME;
-    } else if (nopush) {
-       errpkt((CHAR *)"HOST commands not available");
-       RESUME;
-    } else {
-       srvptr = srvcmd;                /* Point to command buffer */
-       decode(rdatap,putsrv,0);        /* Decode command packet into it */
-       putsrv(NUL);                    /* Null-terminate */
-       nakstate = 0;                   /* Now sending, not receiving */
-       binary = XYFT_T;                /* Switch to text mode */
-       if (syscmd((char *)srvcmd,"")) { /* Try to execute the command */
-           what = W_REMO;              /* Doing a REMOTE command. */
-#ifdef STREAMING
-           if (!streaming)
-#endif /* STREAMING */
-             if (timint < 1)
-               timint = chktimo(rtimo,timef); /* Switch to per-packet timer */
-#ifdef CKSYSLOG
-           if (ckxsyslog >= SYSLG_PR && ckxlogging)
-             cksyslog(SYSLG_PR, 1, "server", "REMOTE HOST", (char *)srvcmd);
-#endif /* CKSYSLOG */
-           BEGIN ssinit;               /* If OK, send back its output */
-       } else {                        /* Otherwise */
-           errpkt((CHAR *)"Can't do system command"); /* report error */
-           RESUME;                     /* & go back to server command wait */
-       }
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 27:
-    {                          /* Interrupted or connection lost */
-    rc = srv_timeout();
-    debug(F101,"srv_timeout","",rc);
-    if (rc > -1) return(rc);           /* (see below) */
-}
-    break;
-case 28:
-    {                          /* Server got a NAK in command-wait */
-#ifndef NOSERVER
-    errpkt((CHAR *)"Did you say RECEIVE instead of GET?");
-    RESUME;
-#endif /* NOSERVER */
-}
-    break;
-case 29:
-    {                          /* Any other command in this state */
-#ifndef NOSERVER
-    if (c != ('E' - SP) && c != ('Y' - SP)) /* except E and Y packets. */
-      errpkt((CHAR *)"Unimplemented server function");
-    /* If we answer an E with an E, we get an infinite loop. */
-    /* A Y (ACK) can show up here if we sent back a short-form reply to */
-    /* a G packet and it was echoed.  ACKs can be safely ignored here. */
-    RESUME;                            /* Go back to server command wait. */
-#endif /* NOSERVER */
-}
-    break;
-case 30:
-    {                          /* Login/Out */
-    rc = srv_login();
-    debug(F101,"<generic>I srv_login","",rc);
-    if (rc > -1) return(rc);           /* (see below) */
-}
-    break;
-case 31:
-    {                          /* Got REMOTE CD command */
-#ifndef NOSERVER
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE CD", (char *)srvcmd);
-#endif /* CKSYSLOG */
-    if (!ENABLED(en_cwd)) {
-       errpkt((CHAR *)"REMOTE CD disabled");
-       RESUME;
-    } else {
-       char * p = NULL;
-       x = cwd((char *)(srvcmd+1));    /* Try to change directory */
-#ifdef IKSDB
-       if (ikdbopen) slotstate(what,"REMOTE CD", (char *)(srvcmd+2), "");
-#endif /* IKSDB */
-       if (!x) {                       /* Failed */
-           errpkt((CHAR *)"Can't change directory");
-           RESUME;                     /* Back to server command wait */
-       } else if (x == 2) {            /* User wants message */
-           if (!ENABLED(en_typ)) {     /* Messages (REMOTE TYPE) disabled? */
-               errpkt((CHAR *)"REMOTE TYPE disabled");
-               RESUME;
-           } else {                    /* TYPE is enabled */
-               int i;
-               for (i = 0; i < 8; i++) {
-                   if (zchki(cdmsgfile[i]) > -1) {
-                       break;
-                   }
-               }
-               binary = XYFT_T;        /* Use text mode for this. */
-               if (i < 8 && sndtype(cdmsgfile[i])) { /* Have readme file? */
-                   BEGIN ssinit;       /* OK */
-               } else {                /* not OK */
-                   p = zgtdir();
-                   if (!p) p = "";
-                   success = (*p) ? 1 : 0;
-                   ack1((CHAR *)p);    /* ACK with new directory name */
-                   success = 1;
-                   RESUME;             /* wait for next server command */
-               }
-           }
-       } else {                        /* User doesn't want message */
-           p =zgtdir();
-           if (!p) p = "";
-           success = (*p) ? 1 : 0;
-           ack1((CHAR *)p);
-           success = 1;
-           RESUME;                     /* Wait for next server command */
-       }
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 32:
-    {                          /* Got REMOTE PWD command */
-#ifndef NOSERVER
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE PWD", NULL);
-#endif /* CKSYSLOG */
-    if (!ENABLED(en_cwd)) {
-       errpkt((CHAR *)"REMOTE CD disabled");
-       RESUME;
-    } else {
-       if (encstr((CHAR *)zgtdir()) > -1) { /* Encode current directory */
-           ack1(data);                 /* If it fits, send it back in ACK */
-           success = 1;
-       } else {                        /* Failed */
-           ack();                      /* Send empty ACK */
-           success = 0;                /* and indicate failure locally */
-       }
-       RESUME;                         /* Back to server command wait */
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 33:
-    {                          /* REMOTE DIRECTORY command */
-#ifndef NOSERVER
-    char *n2;
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE DIRECTORY", (char *)srvcmd);
-#endif /* CKSYSLOG */
-    if (!ENABLED(en_dir)) {            /* If DIR is disabled, */
-       errpkt((CHAR *)"REMOTE DIRECTORY disabled"); /* refuse. */
-       RESUME;
-    } else {                           /* DIR is enabled. */
-#ifdef IKSDB
-       if (ikdbopen) slotstate(what,"REMOTE DIR", (char *)(srvcmd+2), "");
-#endif /* IKSDB */
-       if (!ENABLED(en_cwd)) {         /* But CWD is disabled */
-           zstrip((char *)(srvcmd+2),&n2); /* and they included a pathname, */
-           if (strcmp((char *)(srvcmd+2),n2)) { /* so refuse. */
-               errpkt((CHAR *)"Access denied");
-               RESUME;                 /* Remember, this is not a goto! */
-           }
-       }
-       if (state == generic) {                 /* It's OK to go ahead. */
-#ifdef COMMENT
-           n2 = (*(srvcmd+2)) ? DIRCMD : DIRCM2;
-           if (syscmd(n2,(char *)(srvcmd+2)))  /* If it can be done */
-#else
-           int x;
-           if ((x = snddir((char*)(srvcmd+2))) > 0)
-#endif /* COMMENT */
-           {
-               BEGIN ssinit;           /* send the results back; */
-           } else {                    /* otherwise */
-               if (x < 0)
-                 errpkt((CHAR *)"No files match");
-               else
-                 errpkt((CHAR *)"Can't list directory");
-               RESUME;                 /* return to server command wait */
-           }
-       }
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 34:
-    {                          /* REMOTE DELETE (Erase) */
-#ifndef NOSERVER
-    char *n2;
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE DELETE", (char *)srvcmd);
-#endif /* CKSYSLOG */
-    if (!ENABLED(en_del)) {
-       errpkt((CHAR *)"REMOTE DELETE disabled");
-       RESUME;
-    } else {                           /* DELETE is enabled */
-#ifdef IKSDB
-       if (ikdbopen) slotstate(what,"REMOTE DELETE", (char *)(srvcmd+2), "");
-#endif /* IKSDB */
-       if (!ENABLED(en_cwd)) {         /* but CWD is disabled */
-           zstrip((char *)(srvcmd+2),&n2); /* and they included a pathname, */
-           if (strcmp((char *)(srvcmd+2),n2)) { /* so refuse. */
-               errpkt((CHAR *)"Access denied");
-               RESUME;                 /* Remember, this is not a goto! */
-           }
-       } else if (isdir((char *)(srvcmd+2))) { /* A directory name? */
-           errpkt((CHAR *)"It's a directory");
-           RESUME;
-       }
-       if (state == generic) {         /* It's OK to go ahead. */
-           int x;
-           if ((x = snddel((char*)(srvcmd+2))) > 0) {
-               BEGIN ssinit;           /* If OK send results back */
-           } else {                    /* otherwise */
-               if (x < 0)
-                 errpkt((CHAR *)"File not found"); /* report failure */
-               else
-                 errpkt((CHAR *)"DELETE failed");
-               RESUME;                 /* & return to server command wait */
-           }
-       }
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 35:
-    {                          /* FINISH */
-#ifndef NOSERVER
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "FINISH", NULL);
-#endif /* CKSYSLOG */
-#ifdef IKSDB
-    if (ikdbopen) slotstate(what,"SERVER FINISH", "", "");
-#endif /* IKSDB */
-    if (!ENABLED(en_fin)) {
-       errpkt((CHAR *)"FINISH disabled");
-       RESUME;
-    } else {
-       ack();                          /* Acknowledge */
-       xxscreen(SCR_TC,0,0L,"");       /* Display */
-       success = 1;
-       return(0);                      /* Done */
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 36:
-    {                          /* EXIT */
-#ifndef NOSERVER
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE EXIT", NULL);
-#endif /* CKSYSLOG */
-#ifdef IKSDB
-    if (ikdbopen) slotstate(what,"REMOTE EXIT", "", "");
-#endif /* IKSDB */
-    if (!ENABLED(en_xit)) {
-       errpkt((CHAR *)"EXIT disabled");
-       RESUME;
-    } else {
-       ack();                          /* Acknowledge */
-       xxscreen(SCR_TC,0,0L,"");       /* Display */
-       doexit(GOOD_EXIT,xitsta);
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 37:
-    {                          /* BYE (Logout) */
-#ifndef NOSERVER
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "BYE", NULL);
-#endif /* CKSYSLOG */
-#ifdef IKSDB
-    if (ikdbopen) slotstate(what,"SERVER BYE", "", "");
-#endif /* IKSDB */
-    if (!ENABLED(en_bye)) {
-       errpkt((CHAR *)"BYE disabled");
-       RESUME;
-    } else {
-       ack();                          /* Acknowledge */
-       success = 1;
-       msleep(750);                    /* Give the ACK time to get out */
-       if (local)
-         ttres();                      /* Reset the terminal */
-       xxscreen(SCR_TC,0,0L,"");       /* Display */
-       doclean(1);                     /* Clean up files, etc */
-#ifdef DEBUG
-       debug(F100,"C-Kermit BYE - Loggin out...","",0);
-       zclose(ZDFILE);
-#endif /* DEBUG */
-#ifdef IKSD
-#ifdef CK_LOGIN
-       if (inserver)
-         ckxlogout();
-       else
-#endif /* CK_LOGIN */
-#endif /* IKSD */
-#ifdef TCPSOCKET
-#ifndef NOLISTEN
-         if (network && tcpsrfd > 0 && !inserver)
-           doexit(GOOD_EXIT,xitsta);
-       else
-#endif /* NOLISTEN */
-#endif /* TCPSOCKET */
-         return(zkself());             /* Try to log self out */
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 38:
-    {                          /* REMOTE HELP */
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE HELP", NULL);
-#endif /* CKSYSLOG */
-#ifdef IKSDB
-    if (ikdbopen) slotstate(what,"REMOTE HELP", "", "");
-#endif /* IKSDB */
-#ifndef NOSERVER
-    if (sndhlp()) {
-       BEGIN ssinit;                   /* try to send it */
-    } else {                           /* If not ok, */
-       errpkt((CHAR *)"Can't send help"); /* send error message instead */
-       RESUME;                         /* and return to server command wait */
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 39:
-    {                            /* REMOTE RENAME */
-    rc = srv_rename();
-    debug(F101,"srv_rename","",rc);
-    if (rc > -1) return(rc);           /* (see below) */
-}
-    break;
-case 40:
-    {                            /* REMOTE COPY */
-    rc = srv_copy();
-    debug(F101,"srv_copy","",rc);
-    if (rc > -1) return(rc);           /* (see below) */
-}
-    break;
-case 41:
-    {                          /* REMOTE SET */
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE SET", (char *)srvcmd);
-#endif /* CKSYSLOG */
-#ifndef NOSERVER
-#ifdef IKSDB
-    if (ikdbopen) slotstate(what,"REMOTE SET", (char *)(srvcmd+1), "");
-#endif /* IKSDB */
-    if (!ENABLED(en_set)) {
-       errpkt((CHAR *)"REMOTE SET disabled");
-       RESUME;
-    } else {
-       if (remset((char *)(srvcmd+1))) { /* Try to do what they ask */
-           success = 1;
-           ack();                      /* If OK, then acknowledge */
-       } else                          /* Otherwise */
-         errpkt((CHAR *)"Unknown REMOTE SET parameter"); /* give error msg */
-       RESUME;                         /* Return to server command wait */
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 42:
-    {                          /* REMOTE TYPE */
-#ifndef NOSERVER
-    char *n2;
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE TYPE", (char *)srvcmd);
-#endif /* CKSYSLOG */
-    if (!ENABLED(en_typ)) {
-       errpkt((CHAR *)"REMOTE TYPE disabled");
-       RESUME;
-    } else {
-#ifdef IKSDB
-       if (ikdbopen) slotstate(what,"REMOTE TYPE", (char *)(srvcmd+2), "");
-#endif /* IKSDB */
-       if (!ENABLED(en_cwd)) {         /* If CWD disabled */
-           zstrip((char *)(srvcmd+2),&n2); /* and they included a pathname, */
-           if (strcmp((char *)(srvcmd+2),n2)) { /* refuse. */
-               errpkt((CHAR *)"Access denied");
-               RESUME;                 /* Remember, this is not a goto! */
-           }
-       }
-       if (state == generic) {         /* It's OK to go ahead. */
-           binary = XYFT_T;            /* Use text mode for this. */
-           if (                        /* (RESUME didn't change state) */
-#ifdef COMMENT
-             syscmd(TYPCMD,(char *)(srvcmd+2)) /* Old way */
-#else
-             sndtype((char *)(srvcmd+2)) /* New way */
-#endif /* COMMENT */
-               )
-             BEGIN ssinit;             /* OK */
-           else {                      /* not OK */
-               errpkt((CHAR *)"Can't type file"); /* give error message */
-               RESUME;                 /* wait for next server command */
-           }
-       }
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 43:
-    {                          /* REMOTE MKDIR */
-#ifndef NOSERVER
-#ifdef CK_MKDIR
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE MKDIR", (char *)srvcmd);
-#endif /* CKSYSLOG */
-#ifdef IKSDB
-    if (ikdbopen) slotstate(what,"REMOTE MKDIR", (char *)(srvcmd+2), "");
-#endif /* IKSDB */
-    if (!ENABLED(en_mkd)) {
-       errpkt((CHAR *)"REMOTE MKDIR disabled");
-       RESUME;
-    } else if (!ENABLED(en_cwd)) {     /* If CWD disabled */
-       errpkt((CHAR *)"Directory access restricted");
-       RESUME;                         /* Remember, this is not a goto! */
-    }
-    if (state == generic) {            /* OK to go ahead. */
-       char *p = NULL;
-       x = ckmkdir(0,(char *)(srvcmd+2),&p,0,1); /* Make the directory */
-       if (!p) p = "";
-       if (x > -1) {
-           encstr((CHAR *)p);          /* OK - encode the name */
-           ack1(data);                 /* Send short-form response */
-           success = 1;
-           RESUME;
-       } else {                        /* not OK */
-           if (!*p) p = "Directory creation failure";
-           errpkt((CHAR *)p);          /* give error message */
-           RESUME;                     /* Wait for next server command */
-       }
-    }
-#else
-    errpkt((CHAR *)"REMOTE MKDIR not available");
-    RESUME;
-#endif /* CK_MKDIR */
-#endif /* NOSERVER */
-}
-    break;
-case 44:
-    {                          /* REMOTE RMDIR */
-#ifndef NOSERVER
-#ifdef CK_MKDIR
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE RMDIR", (char *)srvcmd);
-#endif /* CKSYSLOG */
-#ifdef IKSDB
-    if (ikdbopen) slotstate(what,"REMOTE RMDIR", (char *)(srvcmd+2), "");
-#endif /* IKSDB */
-    if (!ENABLED(en_rmd)) {
-       errpkt((CHAR *)"REMOTE RMDIR disabled");
-       RESUME;
-    } else if (!ENABLED(en_cwd)) {     /* If CWD disabled */
-       errpkt((CHAR *)"Directory access restricted");
-       RESUME;                         /* Remember, this is not a goto! */
-    }
-    if (state == generic) {            /* OK to go ahead. */
-       char *p = NULL;
-       x = ckmkdir(1,(char *)(srvcmd+2),&p,0,1);
-       if (!p) p = "";
-       if (x > -1) {
-           encstr((CHAR *)p);          /* OK - encode the name */
-           ack1(data);                 /* Send short-form response */
-           success = 1;
-           RESUME;
-       } else {                        /* not OK */
-           if (!*p) p = "Directory removal failure";
-           errpkt((CHAR *)p);          /* give error message */
-           RESUME;                     /* Wait for next server command */
-       }
-    }
-#else
-    errpkt((CHAR *)"REMOTE RMDIR not available");
-    RESUME;
-#endif /* CK_MKDIR */
-#endif /* NOSERVER */
-}
-    break;
-case 45:
-    {                          /* REMOTE SPACE */
-#ifndef NOSERVER
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE SPACE", (char *)srvcmd);
-#endif /* CKSYSLOG */
-    if (!ENABLED(en_spa)) {
-       errpkt((CHAR *)"REMOTE SPACE disabled");
-       RESUME;
-    } else {
-       x = srvcmd[1];                  /* Get area to check */
-       x = ((x == NUL) || (x == SP)
-#ifdef OS2
-            || (x == '!') || (srvcmd[3] == ':')
-#endif /* OS2 */
-            );
-#ifdef IKSDB
-       if (ikdbopen) slotstate(what,
-                             "REMOTE SPACE",
-                             (x ? "" : (char *)srvcmd),
-                             ""
-                             );
-#endif /* IKSDB */
-       if (!x && !ENABLED(en_cwd)) {   /* CWD disabled */
-           errpkt((CHAR *)"Access denied"); /* and non-default area given, */
-           RESUME;                     /* refuse. */
-       } else {
-#ifdef OS2
-_PROTOTYP(int sndspace,(int));
-           if (sndspace(x ? toupper(srvcmd[2]) : 0)) {
-               BEGIN ssinit;           /* send the report. */
-           } else {                    /* If not ok, */
-               errpkt((CHAR *)"Can't send space"); /* send error message */
-               RESUME;                 /* and return to server command wait */
-           }
-#else
-            if (nopush)
-              x = 0;
-            else
-              x = (x ? syscmd(SPACMD,"") : syscmd(SPACM2,(char *)(srvcmd+2)));
-           if (x) {                    /* If we got the info */
-               BEGIN ssinit;           /* send it */
-           } else {                    /* otherwise */
-               errpkt((CHAR *)"Can't check space"); /* send error message */
-               RESUME;                 /* and await next server command */
-           }
-#endif /* OS2 */
-       }
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 46:
-    {                          /* REMOTE WHO */
-#ifndef NOSERVER
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE WHO", (char *)srvcmd);
-#endif /* CKSYSLOG */
-#ifdef IKSDB
-    if (ikdbopen) slotstate(what,"REMOTE WHO", (char *)(srvcmd+2), "");
-#endif /* IKSDB */
-    if (!ENABLED(en_who)) {
-       errpkt((CHAR *)"REMOTE WHO disabled");
-       RESUME;
-    } else {
-#ifdef OS2
-_PROTOTYP(int sndwho,(char *));
-           if (sndwho((char *)(srvcmd+2))) {
-               BEGIN ssinit;           /* try to send it */
-           } else {                    /* If not ok, */
-               errpkt((CHAR *)"Can't do who command"); /* send error msg */
-               RESUME;                 /* and return to server command wait */
-           }
-#else
-       if (syscmd(WHOCMD,(char *)(srvcmd+2))) {
-           BEGIN ssinit;
-       } else {
-           errpkt((CHAR *)"Can't do who command");
-           RESUME;
-       }
-#endif /* OS2 */
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 47:
-    {                          /* Variable query or set */
-    rc = srv_query();
-    debug(F101,"srv_query","",rc);
-    if (rc > -1) return(rc);
-}
-    break;
-case 48:
-    {                          /* REMOTE MESSAGE command */
-#ifndef NOSERVER
-    debug(F110,"RMSG",(char *)srvcmd+2,0);
-    xxscreen(SCR_MS,0,0L,(char *)(srvcmd+2));
-    ack();
-    RESUME;
-#endif /* NOSERVER */
-}
-    break;
-case 49:
-    {                          /* Interrupted or connection lost */
-#ifndef NOSERVER
-    if (fatalio) {                     /* Connection lost */
-#ifdef CKSYSLOG
-       if (ckxsyslog >= SYSLG_PR && ckxlogging)
-         cksyslog(SYSLG_PR, 1, "server", "Interrupted", NULL);
-#endif /* CKSYSLOG */
-       success = 0;
-       xitsta |= (what & W_KERMIT);
-       QUIT;
-    } else if (interrupted) {
-       if (!ENABLED(en_fin)) {         /* Ctrl-C typed */
-           errpkt((CHAR *)"QUIT disabled");
-           RESUME;
-       } else {
-#ifdef CKSYSLOG
-           if (ckxsyslog >= SYSLG_PR && ckxlogging)
-             cksyslog(SYSLG_PR, 1, "server", "Interrupted", NULL);
-#endif /* CKSYSLOG */
-           success = 0;
-           xitsta |= (what & W_KERMIT);
-           QUIT;
-       }
-    } else {                           /* Shouldn't happen */
-       debug(F100,"SERVER (generic) GOT UNEXPECTED 'q'","",0);
-       QUIT;
-    }
-#endif /* NOSERVER */
-}
-    break;
-case 50:
-    {                          /* Anything else in this state... */
-#ifndef NOSERVER
-    errpkt((CHAR *)"Unimplemented REMOTE command"); /* Complain */
-    RESUME;                            /* and return to server command wait */
-#endif /* NOSERVER */
-}
-    break;
-case 51:
-    {                          /* Sent BYE and connection broken */
-    if (bye_active && ttchk() < 0) {
-       msleep(500);
-       bye_active = 0;
-       ttclos(0);                      /* Close our end of the connection */
-       clsof(0);
-       return(success = 1);
-    } else {                           /* Other generic command */
-       return(success = 0);            /* or connection not broken */
-    }
-}
-    break;
-case 52:
-    {                          /* Short-Form reply */
-    rc = rcv_shortreply();
-    debug(F101,"<rgen>Y rcv_shortreply","",rc);
-    if (rc > -1) return(rc);
-}
-    break;
-case 53:
-    {                          /* File header */
-    /* char *n2; */
-    extern int rsn;
-    debug(F101,"<rfile>F winlo 1","",winlo);
-    xflg = 0;                          /* Not screen data */
-    if (!czseen)
-      cancel = 0;                      /* Reset cancellation counter */
-#ifdef CALIBRATE
-    if (dest == DEST_N)
-      calibrate = 1;
-#endif /* CALIBRATE */
-    if (!rcvfil(filnam)) {             /* Figure out local filename */
-       errpkt((CHAR *)rf_err);         /* Trouble */
-       RESUME;
-    } else {                           /* Real file, OK to receive */
-       char * fnp;
-       debug(F111,"<rfile>F winlo 2",fspec,winlo);
-       if (filcnt == 1)                /* rcvfil set this to 1 for 1st file */
-         crc16 = 0L;                   /* Clear file CRC */
-       fnp = fspec;                    /* This is the full path */
-       if (server && !ENABLED(en_cwd) || /* if DISABLE CD */
-           !fackpath                     /* or F-ACK-PATH OFF */
-           ) {
-           zstrip(fspec,&fnp);         /* don't send back full path */
-       }
-       encstr((CHAR *)fnp);
-       if (fackbug)
-         ack();
-       else
-         ack1(data);                   /* Send it back in ACK */
-       initattr(&iattr);               /* Clear file attribute structure */
-       streamon();
-       if (window(wslotn) < 0) {       /* Allocate negotiated window slots */
-           errpkt((CHAR *)"Can't open window");
-           RESUME;
-       }
-#ifdef IKSDB
-       if (ikdbopen) slotstate(what,
-                             server ? "SERVER" : "",
-                             "RECEIVE",
-                             fspec
-                             );
-#endif /* IKSDB */
-       BEGIN rattr;                    /* Now expect Attribute packets */
-    }
-}
-    break;
-case 54:
-    {                          /* X-packet instead of file header */
-    xflg = 1;                          /* Screen data */
-    if (!czseen)
-      cancel = 0;                      /* Reset cancellation counter */
-    ack();                             /* Acknowledge the X-packet */
-    initattr(&iattr);                  /* Initialize attribute structure */
-    streamon();
-    if (window(wslotn) < 0) {          /* allocate negotiated window slots */
-       errpkt((CHAR *)"Can't open window");
-       RESUME;
-    }
-#ifndef NOSPL
-    if (query) {                       /* If this is the response to */
-       qbufp = querybuf;               /* a query that we sent, initialize */
-       qbufn = 0;                      /* the response buffer */
-       querybuf[0] = NUL;
-    }
-#endif /* NOSPL */
-    what = W_REMO;                     /* we're doing a REMOTE command */
-#ifdef IKSDB
-    if (ikdbopen) slotstate(what,
-                         server ? "SERVER" : "",
-                         "RECEIVE",
-                         fspec
-                         );
-#endif /* IKSDB */
-    BEGIN rattr;                       /* Expect Attribute packets */
-}
-    break;
-case 55:
-    {                          /* Attribute packet */
-    if (gattr(rdatap,&iattr) == 0) {   /* Read into attribute structure */
-#ifdef CK_RESEND
-       ack1((CHAR *)iattr.reply.val);  /* Reply with data */
-#else
-       ack();                          /* If OK, acknowledge */
-#endif /* CK_RESEND */
-    } else {                           /* Otherwise */
-       extern long fsize;
-       char *r;
-       r = getreason(iattr.reply.val);
-       ack1((CHAR *)iattr.reply.val);  /* refuse to accept the file */
-       xxscreen(SCR_ST,ST_REFU,0L,r);  /* reason */
-#ifdef TLOG
-       if (tralog && !tlogfmt)
-         doxlog(what,filnam,fsize,binary,1,r);
-#endif /* TLOG */
-    }
-}
-    break;
-case 56:
-    {                          /* First data packet */
-    debug(F100,"<rattr> D firstdata","",0);
-    rc = rcv_firstdata();
-    debug(F101,"rcv_firstdata rc","",rc);
-    if (rc > -1) return(rc);           /* (see below) */
-}
-    break;
-case 57:
-    {                          /* EOT, no more files */
-    ack();                             /* Acknowledge the B packet */
-    reot();                            /* Do EOT things */
-#ifdef CK_TMPDIR
-/* If we were cd'd temporarily to another device or directory ... */
-    if (f_tmpdir) {
-       int x;
-       x = zchdir((char *) savdir);    /* ... restore previous directory */
-       f_tmpdir = 0;                   /* and remember we did it. */
-       debug(F111,"ckcpro.w B tmpdir restoring",savdir,x);
-    }
-#endif /* CK_TMPDIR */
-    RESUME;                            /* and quit */
-}
-    break;
-case 58:
-    {                          /* Got Data packet */
-    debug(F101,"<rdpkt>D cxseen","",cxseen);
-    debug(F101,"<rdpkt>D czseen","",czseen);
-    if (cxseen || czseen || discard) { /* If file or group interruption */
-       CHAR * msg;
-       msg = czseen ? (CHAR *)"Z" : (CHAR *)"X";
-#ifdef STREAMING
-       if (streaming) {                /* Need to cancel */
-           debug(F111,"<rdpkt>D streaming cancel",msg,cancel);
-           if (cancel++ == 0) {        /* Only do this once */
-               ack1(msg);              /* Put "X" or "Z" in ACK */
-           } else if (czseen) {
-               errpkt((CHAR *)"User canceled");
-               RESUME;
-           } else {
-               fastack();
-           }
-       } else
-#endif /* STREAMING */
-         ack1(msg);
-    } else {                           /* No interruption */
-       int rc, qf;
-#ifndef NOSPL
-       qf = query;
-#else
-       qf = 0;
-#endif /* NOSPL */
-#ifdef CKTUNING
-       rc = (binary && !parity) ?
-         bdecode(rdatap,putfil):
-           decode(rdatap, qf ? puttrm : putfil, 1);
-#else
-       rc = decode(rdatap, qf ? puttrm : putfil, 1);
-#endif /* CKTUNING */
-       if (rc < 0) {
-           discard = (keep == 0 || (keep == SET_AUTO && binary != XYFT_T));
-           errpkt((CHAR *)"Error writing data"); /* If failure, */
-           RESUME;
-       } else                          /* Data written OK, send ACK */
-#ifdef STREAMING
-         if (streaming)
-           fastack();
-       else
-#endif /* STREAMING */
-         ack();
-    }
-}
-    break;
-case 59:
-    {                          /* EOF immediately after A-Packet. */
-    rf_err = "Can't create file";
-    timint = s_timint;
-    if (discard) {                     /* Discarding a real file... */
-       x = 1;
-    } else if (xflg) {                 /* If screen data */
-       if (remfile) {                  /* redirected to file */
-           if (rempipe)                /* or pipe */
-             x = openc(ZOFILE,remdest); /* Pipe: start command */
-           else
-             x = opena(remdest,&iattr); /* File: open with attributes */
-       } else {                        /* otherwise */
-           x = opent(&iattr);          /* "open" the screen */
-       }
-#ifdef CALIBRATE
-    } else if (calibrate) {            /* If calibration run */
-       x = ckopenx(&iattr);            /* do this */
-#endif /* CALIBRATE */
-    } else {                           /* otherwise */
-       x = opena(filnam,&iattr);       /* open the file, with attributes */
-       if (x == -17) {                 /* REGET skipped because same size */
-           discard = 1;
-           rejection = 1;
-       }
-    }
-    if (!x || reof(filnam, &iattr) < 0) { /* Close output file */
-       errpkt((CHAR *) rf_err);        /* If problem, send error msg */
-       RESUME;                         /* and quit */
-    } else {                           /* otherwise */
-       if (x == -17)
-         xxscreen(SCR_ST,ST_SKIP,SKP_RES,"");
-       ack();                          /* acknowledge the EOF packet */
-       BEGIN rfile;                    /* and await another file */
-    }
-}
-    break;
-case 60:
-    {                                  /* Ctrl-C or connection loss. */
-    timint = s_timint;
-    window(1);                         /* Set window size back to 1... */
-    cxseen = 1;
-    x = clsof(1);                      /* Close file */
-    return(success = 0);               /* Failed */
-}
-    break;
-case 61:
-    {                          /* End Of File (EOF) Packet */
-/*  wslots = 1;        */                      /* (don't set) Window size back to 1 */
-#ifndef COHERENT /* Coherent compiler blows up on this switch() statement. */
-    x = reof(filnam, &iattr);          /* Handle the EOF packet */
-    switch (x) {                       /* reof() sets the success flag */
-      case -5:                         /* Handle problems */
-       errpkt((CHAR *)"RENAME failed"); /* Fatal */
-       RESUME;
-       break;
-      case -4:
-       errpkt((CHAR *)"MOVE failed");  /* Fatal */
-       RESUME;
-       break;
-      case -3:                         /* If problem, send error msg */
-       errpkt((CHAR *)"Can't print file"); /* Fatal */
-       RESUME;
-       break;
-      case -2:
-       errpkt((CHAR *)"Can't mail file"); /* Fatal */
-       RESUME;
-       break;
-      case 2:                          /* Not fatal */
-      case 3:
-       xxscreen(SCR_EM,0,0L,"Receiver can't delete temp file");
-       RESUME;
-       break;
-      default:
-       if (x < 0) {                    /* Fatal */
-           errpkt((CHAR *)"Can't close file");
-           RESUME;
-       } else {                        /* Success */
-#ifndef NOSPL
-           if (query)                  /* Query reponses generally */
-             conoll("");               /* don't have line terminators */
-#endif /* NOSPL */
-           if (czseen) {               /* Batch canceled? */
-               if (cancel++ == 0) {    /* If we haven't tried this yet */
-                   ack1((CHAR *)"Z");  /* Try it once */
-               } else {                /* Otherwise */
-                   errpkt((CHAR *)"User canceled"); /* quite with Error */
-                   RESUME;
-               }
-           } else
-             ack();                    /* Acknowledge the EOF packet */
-           BEGIN rfile;                /* and await another file */
-       }
-    }
-#else
-    if (reof(filnam, &iattr) < 0) {    /* Close the file */
-       errpkt((CHAR *)"Error at end of file");
-       RESUME;
-    } else {                           /* reof() sets success flag */
-       ack();
-       BEGIN rfile;
-    }
-#endif /* COHERENT */
-}
-    break;
-case 62:
-    {                          /* ACK for Send-Init */
-    spar(rdatap);                      /* set parameters from it */
-    cancel = 0;
-    bctu = bctr;                       /* switch to agreed-upon block check */
-    bctl = (bctu == 4) ? 2 : bctu;     /* Set block-check length */
-#ifdef CK_RESEND
-    if ((sendmode == SM_RESEND) && (!atcapu || !rscapu)) { /* RESEND */
-       errpkt((CHAR *) "RESEND capabilities not negotiated");
-       RESUME;
-    } else {
-#endif /* CK_RESEND */
-       what = W_SEND;                  /* Remember we're sending */
-       lastxfer = W_SEND;
-       x = sfile(xflg);                /* Send X or F header packet */
-       cancel = 0;                     /* Reset cancellation counter */
-       if (x) {                        /* If the packet was sent OK */
-           if (!xflg && filcnt == 1)   /* and it's a real file */
-             crc16 = 0L;               /* Clear the file CRC */
-           resetc();                   /* reset per-transaction counters */
-           rtimer();                   /* reset timers */
-#ifdef GFTIMER
-           rftimer();
-#endif /* GFTIMER */
-           streamon();                 /* turn on streaming */
-#ifdef IKSDB
-           if (ikdbopen) slotstate(what,
-                                 (server ? "SERVER" : ""),
-                                 "SEND",
-                                 filnam
-                                 );
-#endif /* IKSDB */
-           BEGIN ssfile;               /* and switch to receive-file state */
-       } else {                        /* otherwise send error msg & quit */
-           s = xflg ? "Can't execute command" : (char *)epktmsg;
-           if (!*s) s = "Can't open file";
-           errpkt((CHAR *)s);
-           RESUME;
-       }
-#ifdef CK_RESEND
-    }
-#endif /* CK_RESEND */
-}
-    break;
-case 63:
-    {                          /* R packet was retransmitted. */
-    xsinit();                          /* Resend packet 0 */
-}
-    break;
-case 64:
-    {                          /* Same deal if G packet comes again */
-    xsinit();
-}
-    break;
-case 65:
-    {                          /* Same deal if C packet comes again */
-    xsinit();
-}
-    break;
-case 66:
-    {                          /* ACK for F or X packet */
-    srvptr = srvcmd;                   /* Point to string buffer */
-    decode(rdatap,putsrv,0);           /* Decode data field, if any */
-    putsrv(NUL);                       /* Terminate with null */
-    ffc = 0L;                          /* Reset file byte counter */
-    debug(F101,"<ssfile>Y cxseen","",cxseen);
-    if (*srvcmd) {                     /* If remote name was recorded */
-        if (sendmode != SM_RESEND) {
-           if (fdispla == XYFD_C || fdispla == XYFD_S)
-             xxscreen(SCR_AN,0,0L,(char *)srvcmd);
-           tlog(F110," remote name:",(char *) srvcmd,0L);
-           makestr(&psrfspec,(char *)srvcmd);
-        }
-    }
-    if (cxseen||czseen) {              /* Interrupted? */
-       debug(F101,"<ssfile>Y canceling","",0);
-       x = clsif();                    /* Close input file */
-       sxeof(1);                       /* Send EOF(D) */
-       BEGIN sseof;                    /* and switch to EOF state. */
-    } else if (atcapu) {               /* If attributes are to be used */
-       if (sattr(xflg | stdinf, 1) < 0) { /* send them */
-           errpkt((CHAR *)"Can't send attributes"); /* if problem, say so */
-           RESUME;                     /* and quit */
-       } else BEGIN ssattr;            /* if ok, switch to attribute state */
-    } else {                           /* Attributes not negotiated */
-       if (window(wslotn) < 0) {       /* Open window */
-           errpkt((CHAR *)"Can't open window");
-           RESUME;
-       } else if ((x = sdata()) == -2) { /* Send first data packet data */
-           window(1);                  /* Connection lost, reset window */
-           x = clsif();                /* Close input file */
-           return(success = 0);        /* Return failure */
-       } else if (x == -9) {           /* User interrupted */
-           errpkt((CHAR *)"User cancelled"); /* Send Error packet */
-           window(1);                  /* Set window size back to 1... */
-           timint = s_timint;          /* Restore timeout */
-           return(success = 0);        /* Failed */
-       } else if (x < 0) {             /* EOF (empty file) or interrupted */
-           window(1);                  /* put window size back to 1, */
-           debug(F101,"<ssfile>Y cxseen","",cxseen);
-           x = clsif();                /* If not ok, close input file, */
-           if (x < 0)                  /* treating failure as interruption */
-             cxseen = 1;               /* Send EOF packet */
-           seof(cxseen||czseen);
-           BEGIN sseof;                /* and switch to EOF state. */
-       } else {                        /* First data sent OK */
-           BEGIN ssdata;               /* All ok, switch to send-data state */
-       }
-    }
-}
-    break;
-case 67:
-    {                          /* Got ACK to A packet */
-    ffc = 0L;                          /* Reset file byte counter */
-    debug(F101,"<ssattr>Y cxseen","",cxseen);
-    if (cxseen||czseen) {              /* Interrupted? */
-       debug(F101,"<sattr>Y canceling","",0);
-       x = clsif();                    /* Close input file */
-       sxeof(1);                       /* Send EOF(D) */
-       BEGIN sseof;                    /* and switch to EOF state. */
-    } else if (rsattr(rdatap) < 0) {   /* Was the file refused? */
-       discard = 1;                    /* Set the discard flag */
-       clsif();                        /* Close the file */
-       sxeof(1);                       /* send EOF with "discard" code */
-       BEGIN sseof;                    /* switch to send-EOF state */
-    } else if ((x = sattr(xflg | stdinf, 0)) < 0) { /* Send more? */
-       errpkt((CHAR *)"Can't send attributes"); /* Trouble... */
-       RESUME;
-    } else if (x == 0) {               /* No more to send so now the data */
-       if (window(wslotn) < 0) {       /* Allocate negotiated window slots */
-           errpkt((CHAR *)"Can't open window");
-           RESUME;
-       }
-       if ((x = sdata()) == -2) {      /* File accepted, send first data */
-           window(1);                  /* Connection broken */
-           x = clsif();                /* Close file */
-           return(success = 0);        /* Return failure */
-       } else if (x == -9) {           /* User interrupted */
-           errpkt((CHAR *)"User cancelled"); /* Send Error packet */
-           window(1);                  /* Set window size back to 1... */
-           timint = s_timint;          /* Restore timeout */
-           return(success = 0);        /* Failed */
-       } else if (x < 0) {             /* If data was not sent */
-           window(1);                  /* put window size back to 1, */
-           debug(F101,"<ssattr>Y cxseen","",cxseen);
-           if (clsif() < 0)            /* Close input file */
-             cxseen = 1;               /* Send EOF packet */
-           seof(cxseen||czseen);
-           BEGIN sseof;                /* and switch to EOF state. */
-       } else {
-           BEGIN ssdata;               /* All ok, switch to send-data state */
-       }
-    }
-}
-    break;
-case 68:
-    {                                  /* Ctrl-C or connection loss. */
-    window(1);                         /* Set window size back to 1... */
-    cxseen = 1;                                /* To indicate interruption */
-    x = clsif();                       /* Close file */
-    return(success = 0);               /* Failed */
-}
-    break;
-case 69:
-    {                          /* Got ACK to Data packet */
-    canned(rdatap);                    /* Check if file transfer cancelled */
-    debug(F111,"<ssdata>Y cxseen",rdatap,cxseen);
-    debug(F111,"<ssdata>Y czseen",rdatap,czseen);
-    if ((x = sdata()) == -2) {         /* Try to send next data */
-       window(1);                      /* Connection lost, reset window */
-       x = clsif();                    /* Close file */
-       return(success = 0);            /* Failed */
-    } else if (x == -9) {              /* User interrupted */
-       errpkt((CHAR *)"User cancelled"); /* Send Error packet */
-       window(1);                      /* Set window size back to 1... */
-       timint = s_timint;              /* Restore original timeout */
-       return(success = 0);            /* Failed */
-    } else if (x < 0) {                        /* EOF - finished sending data */
-       debug(F101,"<ssdata>Y cxseen","",cxseen);
-       window(1);                      /* Set window size back to 1... */
-       if (clsif() < 0)                /* Close input file */
-         cxseen = 1;                   /* Send EOF packet */
-       debug(F101,"<ssdata>Y CALLING SEOF()","",cxseen);
-       seof(cxseen||czseen);
-       BEGIN sseof;                    /* and enter send-eof state */
-    }
-    /* NOTE: If x == 0 it means we're draining: see sdata()! */
-}
-    break;
-case 70:
-    {                          /* Got ACK to EOF */
-    int g, xdiscard;
-    canned(rdatap);                    /* Check if file transfer cancelled */
-    debug(F111,"<sseof>Y cxseen",rdatap,cxseen);
-    debug(F111,"<sseof>Y czseen",rdatap,czseen);
-    debug(F111,"<sseof>Y discard",rdatap,discard);
-    xdiscard = discard;
-    discard = 0;
-    success = (cxseen == 0 && czseen == 0); /* Transfer status... */
-    debug(F101,"<sseof>Y success","",success);
-    if (success && rejection > 0)          /* If rejected, succeed if */
-      if (rejection != '#' &&              /* reason was date */
-         rejection != 1 && rejection != '?') /* or name; */
-       success = 0;                        /* fail otherwise. */
-    cxseen = 0;                                /* This goes back to zero. */
-    if (success) {                     /* Only if transfer succeeded... */
-       xxscreen(SCR_ST,ST_OK,0L,"");
-       if (!xdiscard) {
-           makestr(&sfspec,psfspec);   /* Record filenames for WHERE */
-           makestr(&srfspec,psrfspec);
-       }
-       if (moving) {                   /* If MOVE'ing */
-           x = zdelet(filnam);         /* Try to delete the source file */
-#ifdef TLOG
-           if (tralog) {
-               if (x > -1) {
-                   tlog(F110," deleted",filnam,0);
-               } else {
-                   tlog(F110," delete failed:",ck_errstr(),0);
-               }
-           }
-#endif /* TLOG */
-       } else if (snd_move) {          /* Or move it */
-           int x;
-           x = zrename(filnam,snd_move);
-#ifdef TLOG
-           if (tralog) {
-               if (x > -1) {
-                   tlog(F110," moved to ",snd_move,0);
-               } else {
-                   tlog(F110," move failed:",ck_errstr(),0);
-               }
-           }
-#endif /* TLOG */
-       } else if (snd_rename) {        /* Or rename it */
-           char *s = snd_rename;       /* Renaming string */
-#ifndef NOSPL
-           int y;                      /* Pass it thru the evaluator */
-           extern int cmd_quoting;     /* for \v(filename) */
-           if (cmd_quoting) {          /* But only if cmd_quoting is on */
-               y = MAXRP;
-               s = (char *)srvcmd;
-               zzstring(snd_rename,&s,&y);
-               s = (char *)srvcmd;
-           }
-#endif /* NOSPL */
-           if (s) if (*s) {
-               int x;
-               x = zrename(filnam,s);
-#ifdef TLOG
-           if (tralog) {
-               if (x > -1) {
-                   tlog(F110," renamed to",s,0);
-               } else {
-                   tlog(F110," rename failed:",ck_errstr(),0);
-               }
-           }
-#endif /* TLOG */
-#ifdef COMMENT
-               *s = NUL;
-#endif /* COMMENT */
-           }
-       }
-    }
-    if (czseen) {                      /* Check group interruption flag */
-       g = 0;                          /* No more files if interrupted */
-    } else {                           /* Otherwise... */
-#ifdef COMMENT
-       /* This code makes any open error fatal to a file-group transfer. */
-       g = gnfile();
-       debug(F111,"<sseof>Y gnfile",filnam,g);
-       if (g > 0) {                    /* Any more files to send? */
-           if (sfile(xflg))            /* Yes, try to send next file header */
-             BEGIN ssfile;             /* if ok, enter send-file state */
-           else {                      /* otherwise */
-               s = xflg ? "Can't execute command" : (char *)epktmsg;
-               if (!*s) s = "Can't open file";
-               errpkt((CHAR *)s);      /* send error message */
-               RESUME;                 /* and quit */
-           }
-       } else {                        /* No next file */
-           tsecs = gtimer();           /* get statistics timers */
-#ifdef GFTIMER
-           fptsecs = gftimer();
-#endif /* GFTIMER */
-           seot();                     /* send EOT packet */
-           BEGIN sseot;                /* enter send-eot state */
-       }
-#else  /* COMMENT */
-       while (1) {                     /* Keep trying... */
-           g = gnfile();               /* Get next file */
-           debug(F111,"<sseof>Y gnfile",filnam,g);
-           if (g == 0 && gnferror == 0) /* No more, stop trying */
-             break;
-           if (g > 0) {                /* Have one */
-               if (sfile(xflg)) {      /* Try to open and send F packet */
-                   BEGIN ssfile;       /* If OK, enter send-file state */
-                   break;              /* and break out of loop. */
-               }
-           } /* Otherwise keep trying to get one we can send... */
-       }
-    }
-    if (g == 0) {
-       debug(F101,"<sseof>Y no more files","",czseen);
-       tsecs = gtimer();               /* Get statistics timers */
-#ifdef GFTIMER
-       fptsecs = gftimer();
-#endif /* GFTIMER */
-       seot();                         /* Send EOT packet */
-       BEGIN sseot;                    /* Enter send-eot state */
-    }
-#endif /* COMMENT */
-}
-    break;
-case 71:
-    {                          /* Got ACK to EOT */
-    debug(F101,"sseot justone","",justone);
-    RESUME;                            /* All done, just quit */
-}
-    break;
-case 72:
-    {                                  /* Got Error packet, in any state */
-    char *s = "";
-    window(1);                         /* Close window */
-    timint = s_timint;                 /* Restore original timeout */
-    if (*epktmsg)                      /* Message from Error packet */
-      s = (char *)epktmsg;
-    if (!*s) {                         /* If not there then maybe here */
-       s = (char *)rdatap;
-       ckstrncpy((char *)epktmsg,(char *)rdatap,PKTMSGLEN);
-    }
-    if (!*s)                           /* Hopefully we'll never see this. */
-      s = "Unknown error";
-    success = 0;                       /* For IF SUCCESS/FAIL. */
-    debug(F101,"ckcpro.w justone at E pkt","",justone);
-
-    success = 0;                       /* Transfer failed */
-    xferstat = success;                        /* Remember transfer status */
-    if (!epktsent) {
-       x = quiet; quiet = 1;           /* Close files silently, */
-       epktrcvd = 1;                   /* Prevent messages from clsof() */
-       clsif();
-       clsof(1);                       /* discarding any output file. */
-       ermsg(s);                       /* Issue the message (calls screen). */
-       quiet = x;                      /* Restore quiet state */
-    }
-    tstats();                          /* Get stats */
-/*
-  If we are executing commands from a command file or macro, let the command
-  file or macro decide whether to exit, based on SET { TAKE, MACRO } ERROR.
-*/
-    if (
-#ifndef NOICP
-       !xcmdsrc &&
-#endif /* NOICP */
-       backgrd && !server)
-      fatal("Protocol error");
-    xitsta |= (what & W_KERMIT);       /* Save this for doexit(). */
-#ifdef CK_TMPDIR
-/* If we were cd'd temporarily to another device or directory ... */
-    if (f_tmpdir) {
-       int x;
-       x = zchdir((char *) savdir);    /* ... restore previous directory */
-       f_tmpdir = 0;                   /* and remember we did it. */
-       debug(F111,"ckcpro.w E tmpdir restored",savdir,x);
-    }
-#endif /* CK_TMPDIR */
-#ifdef IKSDB
-    if (ikdbopen) slotstate(what,"ERROR", (char *)epktmsg, "");
-#endif /* IKSDB */
-    RESUME;
-}
-    break;
-case 73:
-    { success = 0; QUIT; }
-    break;
-case 74:
-    {                                  /* Anything not accounted for above */
-    errpkt((CHAR *)"Unexpected packet type"); /* Give error message */
-    window(1);
-    xitsta |= (what & W_KERMIT);       /* Save this for doexit(). */
-    RESUME;                            /* and quit */
-}
-    break;
-
-           }
-    }
-}
-
-char tbl[] = {
- -1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 72, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 73,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74, 74,
- -1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 15, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 13, 74, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 73,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74, 74,
- -1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 57, 74, 74, 72, 53, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 54, 74, 74, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 73,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74, 74,
- -1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 55, 74, 74, 56, 72, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 59, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 73,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74, 74,
- -1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 58, 72, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 61, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 60,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74, 74,
- -1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 65, 74, 72, 74, 64, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 63, 74, 74, 74, 74, 74, 74, 62, 74, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 73,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74, 74,
- -1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 72, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 66, 74, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 73,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74, 74,
- -1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 72, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 67, 74, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 73,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74, 74,
- -1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 72, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 69, 74, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 68,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74, 74,
- -1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 72, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 70, 74, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 73,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74, 74,
- -1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 72, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 71, 74, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 73,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74, 74,
- -1, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
- 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
- 29, 29, 29, 26, 29, 29, 29, 25, 19, 17, 22, 29, 29, 29, 28, 23,
- 29, 29, 18, 12, 29, 29, 20, 21, 29, 29, 29, 29, 29, 29, 29, 29,
- 29, 11, 29,  7, 29, 29, 29,  9,  4, 29,  5,  8, 29, 29, 29,  6,
- 29, 27,  3,  1, 29, 29,  2, 29, 10, 29, 29, 29, 29, 29, 29, 29,
- -1, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
- 50, 32, 50, 31, 33, 34, 35, 50, 38, 30, 50, 40, 37, 48, 50, 50,
- 50, 50, 39, 41, 42, 45, 47, 46, 36, 50, 50, 50, 50, 50, 50, 50,
- 50, 11, 50,  7, 44, 50, 50,  9,  4, 50,  5,  8, 50, 43, 50,  6,
- 50, 49,  3,  1, 50, 50,  2, 50, 10, 50, 50, 50, 50, 50, 50, 50,
- -1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 72, 74, 74, 74, 17, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 12, 74, 74, 74, 74, 74, 16, 74, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 73,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74, 74,
- -1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 72, 53, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 12, 74, 74, 74, 74, 54, 52, 74, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 51,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74, 74,
- -1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 72, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 14, 74, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 73,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74, 74,
-  0, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 74, 74, 74, 74, 72, 74, 74, 74, 74, 74, 74, 74, 74, 74, 24,
- 74, 74, 74, 12, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
- 74, 11, 74,  7, 74, 74, 74,  9,  4, 74,  5,  8, 74, 74, 74,  6,
- 74, 73,  3,  1, 74, 74,  2, 74, 10, 74, 74, 74, 74, 74, 74,74
-};
-
-
-/*
-  From here down to proto() are routines that were moved out of the state
-  table switcher because the resulting switch() had become too large.
-  To move the contents of a state-table case to a routine:
-    1. Add a prototype to the list above the state table switcher.
-    2. Make a routine with an appropriate name, returning int.
-    3. Move the code into it.
-    4. Put a call to the new routine in the former spot:
-         rc = name_of_routine();
-         if (rc > -1) return(rc);
-    5. Add "return(-1);" after every RESUME, SERVE, or BEGIN macro and
-       at the end if the code is open-ended.
-*/
-static int
-rcv_firstdata() {
-    extern int dispos;
-    debug(F101,"rcv_firstdata","",dispos);
-
-    if (discard) {                     /* if we're discarding the file */
-       ack1((CHAR *)"X");              /* just ack the data like this. */
-       cancel++;                       /* and count it */
-       BEGIN rdpkt;                    /* and wait for more data packets. */
-       return(-1);
-    } else {                           /* Not discarding. */
-       rf_err = "Can't open file";
-       if (xflg) {                     /* If screen data */
-           if (remfile) {              /* redirected to file */
-               if (rempipe)            /* or pipe */
-                 x = openc(ZOFILE,remdest); /* Pipe: start command */
-               else
-                 x = opena(remdest,&iattr); /* File: open with attributes */
-           } else {                    /* otherwise */
-               x = opent(&iattr);      /* "open" the screen */
-           }
-       } else {                        /* otherwise */
-#ifdef CALIBRATE
-           if (calibrate) {            /* If calibration run */
-               x = ckopenx(&iattr);    /* open nothing */
-#ifdef STREAMING
-               if (streaming)          /* Streaming */
-                 fastack();            /* ACK without ACKing. */
-               else
-#endif /* STREAMING */
-                 ack();                /* Send real ACK */
-               BEGIN rdpkt;            /* Proceed to next state */
-               return(-1);
-           } else
-#endif /* CALIBRATE */
-#ifdef UNIX
-/*
-  In UNIX we can pipe the file data into the mail program, which is to be
-  preferred to writing it out to a temp file and then mailing it afterwards.
-  This depends rather heavily on all UNIXes having a mail command that
-  accepts '-s "subject"' on the command line.  MAILCMD (e.g. mail, Mail, mailx)
-  is defined in ckufio.c.
-*/
-           if (dispos == 'M') {        /* Mail... */
-               char *s;
-               char * tmp = NULL;
-               int n = 0;
-               extern char *MAILCMD;
-               s = iattr.disp.val + 1;
-               n = (int)strlen(MAILCMD) +    /* Mail command */
-                 (int)strlen(s) +            /* address */
-                 (int)strlen(ofilnam) + 32;  /* subject */
-               if (tmp = (char *)malloc(n)) {
-                   ckmakxmsg(tmp,n,
-                             MAILCMD," -s \"",ofilnam,"\" ",s,
-                             NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-                   debug(F111,"rcv_firsdata mail",tmp,(int)strlen(tmp));
-                   x = openc(ZOFILE,(char *)tmp);
-                   free(tmp);
-               } else
-                 x = 0;
-           } else if (dispos == 'P') { /* Ditto for print */
-               char * tmp = NULL;
-               int n;
-               extern char *PRINTCMD;
-               n = (int)strlen(PRINTCMD) + (int)strlen(iattr.disp.val+1) + 4;
-               if (tmp = (char *)malloc(n)) {
-                   sprintf(tmp,        /* safe (prechecked) */
-                           "%s %s", PRINTCMD, iattr.disp.val + 1);
-                   x = openc(ZOFILE,(char *)tmp);
-                   free(tmp);
-               } else
-                 x = 0;
-           } else
-#endif /* UNIX */
-             x = opena(filnam,&iattr); /* open the file, with attributes */
-       }
-       if (x) {                        /* If file was opened ok */
-           int rc, qf;
-#ifndef NOSPL
-           qf = query;
-#else
-           qf = 0;
-#endif /* NOSPL */
-
-#ifdef CKTUNING
-           rc = (binary && !parity) ?
-             bdecode(rdatap,putfil):
-              decode(rdatap, qf ? puttrm : putfil, 1);
-#else
-           rc = decode(rdatap, qf ? puttrm : putfil, 1);
-#endif /* CKTUNING */
-           if (rc < 0) {
-               errpkt((CHAR *)"Error writing data");
-               RESUME;
-               return(-1);
-           }
-#ifdef STREAMING
-           if (streaming)              /* Streaming was negotiated */
-             fastack();                /* ACK without ACKing. */
-           else
-#endif /* STREAMING */
-             ack();                    /* acknowledge it */
-           BEGIN rdpkt;                /* and switch to receive-data state */
-           return(-1);
-       } else {                        /* otherwise */
-           errpkt((CHAR *) rf_err);    /* send error packet */
-           RESUME;                     /* and quit. */
-           return(-1);
-       }
-    }
-}
-
-static int
-rcv_shortreply() {
-#ifdef PKTZEROHACK
-    success = 0;
-    debug(F111,"rcv_shortreply",rdatap,ipktlen);
-    if (ipktack[0] && !strncmp(ipktack,(char *)rdatap,ipktlen)) {
-       /* No it's the ACK to the I packet again */
-       x = scmd(vcmd,(CHAR *)cmarg);   /* So send the REMOTE command again */
-       /* Maybe this should be resend() */
-       debug(F110,"IPKTZEROHACK",ipktack,x);
-       if (x < 0) {
-           errpkt((CHAR *)srimsg);
-           RESUME;
-           return(-1);
-       }
-    } else {
-       ipktack[0] = NUL;
-#endif /* PKTZEROHACK */
-       urserver = 1;
-#ifndef NOSERVER
-#ifndef NOSPL
-       if (query) {                    /* If to query, */
-           qbufp = querybuf;           /*  initialize query response buffer */
-           qbufn = 0;
-           querybuf[0] = NUL;
-       }
-#endif /* NOSPL */
-       x = 1;
-       if (remfile) {                  /* Response redirected to file */
-           rf_err = "Can't open file";
-           if (rempipe)                /* or pipe */
-             x =
-#ifndef NOPUSH
-               zxcmd(ZOFILE,remdest)   /* Pipe: Start command */
-#else
-               0
-#endif /* NOPUSH */
-               ;
-           else
-             x = opena(remdest,&iattr); /* File: Open with attributes */
-           debug(F111,"rcv_shortreply remfile",remdest,x);
-       } else {
-           x = opent(&iattr);          /* "open" the screen */
-       }
-       if (x) {                        /* If file was opened ok */
-           if (decode(rdatap,
-#ifndef NOSPL
-                      (query || !remfile) ? puttrm :
-#else
-                      !remfile ? puttrm :
-#endif /* NOSPL */
-                      zputfil, 1) < 0) { /* Note: zputfil, not putfil. */
-               errpkt((CHAR *)"Error writing data");
-               RESUME;
-               return(-1);
-           } else {
-               if (rdatap)             /* If we had data */
-                 if (*rdatap)          /* add a line terminator */
-                   if (remfile) {      /* to file */
-                       zsoutl(ZOFILE,"");
-                   } else {            /* or to screen. */
-#ifndef NOICP
-                       if (!query || !xcmdsrc)
-#endif /* NOICP */
-                         if (!(quiet && rcdactive))
-                           conoll("");
-                   }
-               if (bye_active && network) { /* I sent BYE or REMOTE LOGOUT */
-                   msleep(500);        /* command and got the ACK... */
-                   bye_active = 0;
-                   ttclos(0);
-               }
-               clsof(0);
-               if (!epktsent && !epktrcvd) /* If no error packet... */
-                 success = 1;          /* success. */
-               RESUME;
-               return(-1);
-           }
-       } else {                        /* File not opened OK */
-           errpkt((CHAR *) rf_err);    /* send error message */
-           RESUME;                     /* and quit. */
-           return(-1);
-       }
-#endif /* NOSERVER */
-#ifdef PKTZEROHACK
-    }
-#endif /* PKTZEROHACK */
-    debug(F101,"rcv_shortreply fallthru","",success);
-    return(-1);
-}
-
-
-static int
-srv_query() {
-#ifndef NOSERVER
-#ifndef NOSPL
-    char c;
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE QUERY", (char *)srvcmd);
-#endif /* CKSYSLOG */
-#ifdef IKSDB
-    if (ikdbopen) slotstate(what,"REMOTE QUERY", (char *)(srvcmd+2), "");
-#endif /* IKSDB */
-    c = *(srvcmd+2);                   /* Q = Query, S = Set */
-    if (c == 'Q') {                    /* Query */
-       if (!ENABLED(en_que)) { /* Security */
-           errpkt((CHAR *)"REMOTE QUERY disabled");
-           RESUME;
-           return(-1);
-       } else {                        /* Query allowed */
-           int n; char *p, *q;
-           qbufp = querybuf;           /* Wipe out old stuff */
-           qbufn = 0;
-           querybuf[0] = NUL;
-           p = (char *) srvcmd + 3;    /* Pointer for making wrapper */
-           n = strlen((char *)srvcmd); /* Position of end */
-           c = *(srvcmd+4);            /* Which type of variable */
-
-           if (*(srvcmd+6) == CMDQ) {  /* Starts with command quote? */
-               p = (char *) srvcmd + 6; /* Take it literally */
-               if (*p == CMDQ) p++;
-           } else {                    /* They played by the rules */
-               if (c == 'K') {         /* Kermit variable */
-                   int k;
-                   k = (int) strlen(p);
-                   if (k > 0 && p[k-1] == ')') {
-                       p = (char *)(srvcmd + 4);
-                       *(srvcmd+4) = CMDQ;
-                       *(srvcmd+5) = 'f'; /* Function, so make it \f...() */
-                   } else {
-                       *(srvcmd+3) = CMDQ; /* Stuff wrapping into buffer */
-                       *(srvcmd+4) = 'v';  /* Variable, so make it \v(...) */
-                       *(srvcmd+5) = '(';  /* around variable name */
-                       *(srvcmd+n) = ')';
-                       *(srvcmd+n+1) = NUL;
-                   }
-               } else {
-                   *(srvcmd+3) = CMDQ; /* Stuff wrapping into buffer */
-                   *(srvcmd+4) = 'v'; /*  Variable, so make it \v(...) */
-                   *(srvcmd+5) = '(';  /* around variable name */
-                   *(srvcmd+n) = ')';
-                   *(srvcmd+n+1) = NUL;
-                   if (c == 'S') {     /* System variable */
-                       *(srvcmd+4) = '$'; /*  so it's \$(...) */
-                   } else if (c == 'G') { /* Non-\ Global variable */
-                       *(srvcmd+4) = 'm'; /*  so wrap it in \m(...) */
-                   }
-               }
-           }                           /* Now evaluate it */
-           n = QBUFL;                  /* Max length */
-           q = querybuf;               /* Where to put it */
-           if (zzstring(p,&q,&n) < 0) {
-               errpkt((n > 0) ? (CHAR *)"Can't get value"
-                              : (CHAR *)"Value too long"
-                      );
-               RESUME;
-               return(-1);
-           } else {
-               if (encstr((CHAR *)querybuf) > -1) { /* Encode it */
-                   ack1(data);         /* If it fits, send it back in ACK */
-                   success = 1;
-                   RESUME;
-                   return(-1);
-               } else if (sndstring(querybuf)) { /* Long form response */
-                   BEGIN ssinit;
-                   return(-1);
-               } else {                /* sndhlp() fails */
-                   errpkt((CHAR *)"Can't send value");
-                   RESUME;
-                   return(-1);
-               }
-           }
-       }
-    } else if (c == 'S') {             /* Set (assign) */
-       if (!ENABLED(en_asg)) {         /* Security */
-           errpkt((CHAR *)"REMOTE ASSIGN disabled");
-           RESUME;
-           return(-1);
-       } else {                        /* OK */
-           int n;
-           n = xunchar(*(srvcmd+3));   /* Length of name */
-           n = 3 + n + 1;              /* Position of length of value */
-           *(srvcmd+n) = NUL;          /* Don't need it */
-           if (addmac((char *)(srvcmd+4),(char *)(srvcmd+n+1)) < 0)
-             errpkt((CHAR *)"REMOTE ASSIGN failed");
-           else {
-               ack();
-               success = 1;
-           }
-           RESUME;
-           return(-1);
-       }
-    } else {
-       errpkt((CHAR *)"Badly formed server command");
-       RESUME;
-       return(-1);
-    }
-#else
-    errpkt((CHAR *)"Variable query/set not available");
-    RESUME;
-    return(-1);
-#endif /* NOSPL */
-#endif /* NOSERVER */
-}
-
-static int
-srv_copy() {
-#ifndef NOSERVER
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE COPY", (char *)srvcmd);
-#endif /* CKSYSLOG */
-#ifdef ZCOPY
-    if (!ENABLED(en_cpy)) {
-       errpkt((CHAR *)"REMOTE COPY disabled");
-       RESUME;
-       return(-1);
-    } else {
-       char *str1, *str2, f1[256], f2[256];
-       int  len1, len2;
-        len1 = xunchar(srvcmd[1]);     /* Separate the parameters */
-        len2 = xunchar(srvcmd[2+len1]);
-        strncpy(f1,(char *)(srvcmd+2),len1);
-        f1[len1] = NUL;
-        strncpy(f2,(char *)(srvcmd+3+len1),len2);
-        f2[len2] = NUL;
-#ifdef IKSDB
-       if (ikdbopen) slotstate(what,"REMOTE COPY", f1, f2);
-#endif /* IKSDB */
-       if (!ENABLED(en_cwd)) {         /* If CWD is disabled */
-           zstrip(f1,&str1);           /* and they included a pathname, */
-            zstrip(f2,&str2);
-           if (strcmp(f1,str1) || strcmp(f2,str2)) { /* Refuse. */
-               errpkt((CHAR *)"Access denied");
-               RESUME;                 /* Remember, this is not a goto! */
-               return(-1);
-           }
-       }
-       if (state == generic) {         /* It's OK to go ahead. */
-            if (zcopy(f1,f2)) {                /* Try */
-               errpkt((CHAR *)"Can't copy file"); /* give error message */
-           } else {
-               success = 1;
-               ack();
-           }
-            RESUME;                    /* wait for next server command */
-           return(-1);
-       }
-    }
-    return(-1);
-#else /* no ZCOPY */
-    errpkt((CHAR *)"REMOTE COPY not available"); /* give error message */
-    RESUME;                            /* wait for next server command */
-    return(-1);
-#endif /* ZCOPY */
-#endif /* NOSERVER */
-}
-
-static int
-srv_rename() {
-#ifndef NOSERVER
-#ifdef CKSYSLOG
-    if (ckxsyslog >= SYSLG_PR && ckxlogging)
-      cksyslog(SYSLG_PR, 1, "server", "REMOTE RENAME", (char *)srvcmd);
-#endif /* CKSYSLOG */
-#ifdef ZRENAME
-    if (!ENABLED(en_ren)) {
-       errpkt((CHAR *)"REMOTE RENAME disabled");
-       RESUME;
-       return(-1);
-    } else {                           /* RENAME is enabled */
-       char *str1, *str2, f1[256], f2[256];
-       int len1, len2;
-       len1 = xunchar(srvcmd[1]);      /* Separate the parameters */
-       len2 = xunchar(srvcmd[2+len1]);
-       strncpy(f1,(char *)(srvcmd+2),len1);
-       f1[len1] = NUL;
-       strncpy(f2,(char *)(srvcmd+3+len1),len2);
-       f2[len2] = NUL;
-       len2 = xunchar(srvcmd[2+len1]);
-       strncpy(f1,(char *)(srvcmd+2),len1);
-       f1[len1] = NUL;
-       strncpy(f2,(char *)(srvcmd+3+len1),len2);
-       f2[len2] = NUL;
-#ifdef IKSDB
-       if (ikdbopen) slotstate(what,"REMOTE RENAME", f1, f2);
-#endif /* IKSDB */
-       if (!ENABLED(en_cwd)) {         /* If CWD is disabled */
-           zstrip(f1,&str1);           /* and they included a pathname, */
-           zstrip(f2,&str2);
-           if ( strcmp(f1,str1) || strcmp(f2,str2) ) { /* refuse. */
-               errpkt((CHAR *)"Access denied");
-               RESUME;                 /* Remember, this is not a goto! */
-               return(-1);
-           }
-       }
-       if (state == generic) {         /* It's OK to go ahead. */
-           if (zrename(f1,f2)) {       /* Try */
-               errpkt((CHAR *)"Can't rename file"); /* Give error msg */
-           } else {
-               success = 1;
-               ack();
-           }
-           RESUME;                     /* Wait for next server command */
-           return(-1);
-       }
-    }
-    return(-1);
-#else /* no ZRENAME */
-    /* Give error message */
-    errpkt((CHAR *)"REMOTE RENAME not available");
-    RESUME;                            /* Wait for next server command */
-    return(-1);
-#endif /* ZRENAME */
-#endif /* NOSERVER */
-}
-
-static int
-srv_login() {
-#ifndef NOSERVER
-    char f1[LOGINLEN+1], f2[LOGINLEN+1], f3[LOGINLEN+1];
-    CHAR *p;
-    int len, i;
-
-    debug(F101,"REMOTE LOGIN x_login","",x_login);
-    debug(F101,"REMOTE LOGIN x_logged","",x_logged);
-
-    f1[0] = NUL; f2[0] = NUL; f3[0] = NUL;
-    len = 0;
-    if (srvcmd[1])                     /* First length field */
-      len = xunchar(srvcmd[1]);                /* Separate the parameters */
-
-    if (x_login) {                     /* Login required */
-       if (x_logged) {                 /* And already logged in */
-           if (len > 0) {              /* Logging in again */
-               errpkt((CHAR *)"Already logged in.");
-           } else {                    /* Logging out */
-               debug(F101,"REMOTE LOGOUT","",x_logged);
-#ifdef CKSYSLOG
-               if (ckxsyslog >= SYSLG_PR && ckxlogging)
-                 cksyslog(SYSLG_PR, 1, "server", "REMOTE LOGOUT", NULL);
-#endif /* CKSYSLOG */
-#ifdef IKSDB
-               if (ikdbopen) slotstate(what,"REMOTE LOGOUT", "", "");
-#endif /* IKSDB */
-               tlog(F110,"Logged out",x_user,0);
-               ack1((CHAR *)"Logged out");
-               success = 1;
-               msleep(500);
-#ifdef CK_LOGIN
-               x_logged = 0;
-#ifdef IKSD
-               if (inserver)
-                 ckxlogout();
-#endif /* IKSD */
-#endif /* CK_LOGIN */
-           }
-       } else {                        /* Not logged in yet */
-           debug(F101,"REMOTE LOGIN len","",len);
-           if (len > 0) {              /* Have username */
-#ifdef CKSYSLOG
-               if (ckxsyslog >= SYSLG_PR && ckxlogging)
-                 cksyslog(SYSLG_PR, 1, "server", "REMOTE LOGIN", NULL);
-#endif /* CKSYSLOG */
-               if (len > LOGINLEN) {
-                   errpkt((CHAR *)"Username too long");
-               }
-               p = srvcmd + 2;         /* Point to it */
-               for (i = 0; i < len; i++) /* Copy it */
-                 f1[i] = p[i];
-               f1[len] = NUL;          /* Terminate it */
-               p += len;               /* Point to next length field */
-               if (*p) {               /* If we have one */
-                   len = xunchar(*p++); /* decode it */
-                   if (len > 0 && len <= LOGINLEN) {
-                       for (i = 0; i < len; i++) /* Same deal for password */
-                         f2[i] = p[i];
-                       f2[len] = NUL;
-                       p += len;       /* And account */
-                       if (*p) {
-                           len = xunchar(*p++);
-                           if (len > 0 && len <= LOGINLEN) {
-                               for (i = 0; i < len; i++)
-                                 f3[i] = p[i]; /* Set but never used */
-                               f3[len] = NUL; /* (because account not used) */
-                           }
-                       }
-                   }
-               }
-               debug(F101,"REMOTE LOGIN 1","",x_logged);
-#ifdef IKSD
-#ifdef CK_LOGIN
-               if (inserver) {         /* Log in to system for real */
-                   x_logged = ckxlogin((CHAR *)f1,(CHAR *)f2,NULL,0);
-                   debug(F101,"REMOTE LOGIN 2","",x_logged);
-                   if (x_logged) {     /* Count attempts */
-                       logtries = 0;
-                       justone = 1;
-                   } else {
-                       logtries++;
-                       sleep(logtries);
-                   }
-               } else
-#endif /* CK_LOGIN */
-#endif /* IKSD */
-                 if (x_user && x_passwd) { /* User and password must match */
-                     if (!strcmp(x_user,f1)) /* SET SERVER LOGIN */
-                       if (!strcmp(x_passwd,f2))
-                         x_logged = 1;
-                     debug(F101,"REMOTE LOGIN 3","",x_logged);
-                 } else if (x_user) {  /* Only username given, no password */
-                     if (!strcmp(x_user,f1)) /* so only username must match */
-                       x_logged = 1;
-                     debug(F101,"REMOTE LOGIN 4","",x_logged);
-                 }
-#ifdef CK_LOGIN 
-                else {
-                   x_logged = ckxlogin((CHAR *)f1,(CHAR *)f2,NULL,0);
-                   debug(F101,"REMOTE LOGIN 5","",x_logged);
-                }
-#endif /* CK_LOGIN */
-               if (x_logged) {         /* Logged in? */
-                   tlog(F110,"Logged in", x_user, 0);
-                   if (isguest)
-                     ack1((CHAR *)"Logged in as guest - restrictions apply");
-                   else
-                     ack1((CHAR *)"Logged in");
-                   success = 1;
-               } else {
-                   tlog(F110,"Login failed", f1, 0);
-                   errpkt((CHAR *)"Access denied.");
-#ifdef IKSD
-#ifdef CK_LOGIN
-                   if (inserver && logtries > 2)
-                     ckxlogout();
-#endif /* CK_LOGIN */
-#endif /* IKSD */
-               }
-           } else {                    /* LOGOUT */
-               errpkt((CHAR *)"Logout ignored");
-           }
-       }
-    } else {                           /* Login not required */
-       if (len > 0)
-         errpkt((CHAR *)"Login ignored.");
-       else
-         errpkt((CHAR *)"Logout ignored.");
-    }
-#endif /* NOSERVER */
-    RESUME;
-    return(-1);
-}
-
-static int
-srv_timeout() {
-    /* K95 does this its own way */
-    if (idletmo) {
-#ifdef IKSD
-        if (inserver) {
-           printf("\r\nIKSD IDLE TIMEOUT: %d sec\r\n", srvidl);
-           doexit(GOOD_EXIT,xitsta);
-        }
-#endif /* IKSD */
-       idletmo = 0;
-       printf("\r\nSERVER IDLE TIMEOUT: %d sec\r\n", srvidl);
-       xitsta |= (what & W_KERMIT);
-       QUIT;
-    }
-#ifndef NOSERVER
-    else if (fatalio) {                        /* Connection lost */
-#ifdef CKSYSLOG
-         if (ckxsyslog >= SYSLG_PR && ckxlogging)
-           cksyslog(SYSLG_PR, 1, "server", "Connection lost", NULL);
-#endif /* CKSYSLOG */
-#ifdef IKSDB
-         if (ikdbopen) slotstate(what,"SERVER DISCONNECT",(char *)srvcmd, "");
-#endif /* IKSDB */
-       xitsta |= what;
-       QUIT;
-    } else if (interrupted) {          /* Interrupted by hand */
-       if (!ENABLED(en_fin)) {
-           errpkt((CHAR *)"QUIT disabled");
-           RESUME;
-           return(-1);
-       } else {
-           if (what == W_SEND || what == W_RECV || what == W_REMO) {
-               success = 0;
-#ifdef CKSYSLOG
-               if (ckxsyslog >= SYSLG_PR && ckxlogging)
-                 cksyslog(SYSLG_PR, 1, "server", "Interrupted", NULL);
-#endif /* CKSYSLOG */
-           } else if (what == W_NOTHING && filcnt == 0) {
-               success = 1;
-           } /* Otherwise leave success alone */
-           xitsta |= (what & W_KERMIT);
-           QUIT;
-       }
-    } else {                           /* Shouldn't happen */
-       debug(F100,"SERVER (top) GOT UNEXPECTED 'q'","",0);
-       QUIT;
-    }
-#endif /* NOSERVER */
-}
-
-static int
-rcv_s_pkt() {
-#ifndef NOSERVER
-    if (state == rgen)
-      urserver = 1;
-    if (/* state == serve && */ x_login && !x_logged) {
-       errpkt((CHAR *)"Login required");
-       SERVE;
-    } else
-#endif /* NOSERVER */
-      if (state == serve && !ENABLED(en_sen)) { /* Not in server mode */
-       errpkt((CHAR *)"SEND disabled"); /* when SEND is disabled. */
-       RESUME;
-       return(-1);
-    } else {                           /* OK to go ahead. */
-#ifdef CK_TMPDIR
-       if (dldir && !f_tmpdir) {       /* If they have a download directory */
-           debug(F110,"receive download dir",dldir,0);
-           if (s = zgtdir()) {         /* Get current directory */
-               debug(F110,"receive current dir",s,0);
-               if (zchdir(dldir)) {    /* Change to download directory */
-                   debug(F100,"receive zchdir ok","",0);
-                   ckstrncpy(savdir,s,TMPDIRLEN);
-                   f_tmpdir = 1;       /* Remember that we did this */
-               } else
-                 debug(F100,"receive zchdir failed","",0);
-           }
-       }
-#endif /* CK_TMPDIR */
-       nakstate = 1;                   /* Can send NAKs from here. */
-       rinit(rdatap);                  /* Set parameters */
-       bctu = bctr;                    /* Switch to agreed-upon block check */
-       bctl = (bctu == 4) ? 2 : bctu;  /* Set block-check length */
-       what = W_RECV;                  /* Remember we're receiving */
-       lastxfer = W_RECV;
-       resetc();                       /* Reset counters */
-       rtimer();                       /* Reset timer */
-#ifdef GFTIMER
-       rftimer();
-#endif /* GFTIMER */
-       streamon();
-       BEGIN rfile;                    /* Go into receive-file state */
-    }
-    return(-1);
-}
-
-
-/* END OF ROUTINES MOVED OUT OF STATE MACHINE */
-
-
-/*  P R O T O  --  Protocol entry function  */
-
-static int is_tn = 0;                  /* It's a Telnet connection */
-
-#ifdef CK_SPEED
-int f_ctlp = 0;                                /* Control-character prefix table */
-#ifdef COMMENT
-short s_ctlp[256];
-#endif /* COMMENT */
-#endif /* CK_SPEED */
-
-/*
-  This is simply a wrapper for the real protocol function just below,
-  that saves any items that might be changed automatically by protocol
-  negotiations and then restores them upon exit from protocol mode.
-*/
-VOID
-proto() {
-    extern int b_save, f_save, c_save, ss_save, slostart, reliable, urclear;
-#ifndef NOCSETS
-    extern int fcharset, fcs_save, tcharset, tcs_save;
-#endif /* NOCSETS */
-
-#ifdef PIPESEND
-    extern int pipesend;
-#endif /* PIPESEND */
-#ifndef NOLOCAL
-#ifdef OS2
-    extern int cursorena[], cursor_save, term_io;
-    extern BYTE vmode;
-    extern int display_demo;
-    int term_io_save;
-#endif /* OS2 */
-#endif /* NOLOCAL */
-#ifdef TNCODE
-    int _u_bin=0, _me_bin = 0;
-#ifdef IKS_OPTION
-    int /* _u_start=0, */ _me_start = 0;
-#endif /* IKS_OPTION */
-#endif /* TNCODE */
-#ifdef PATTERNS
-    int pa_save;
-    int i;
-#endif /* PATTERNS */
-    int scan_save;
-
-#ifdef PATTERNS
-    pa_save = patterns;
-#endif /* PATTERNS */
-    scan_save = filepeek;
-
-    myjob = sstate;
-
-#ifdef CK_LOGIN
-    if (isguest) {                     /* If user is anonymous */
-       en_pri = 0;                     /* disable printing */
-       en_mai = 0;                     /* and disable email */
-       en_del = 0;                     /* and file deletion */
-    }
-#endif /* CK_LOGIN */
-
-#ifndef NOLOCAL
-#ifdef OS2
-    cursor_save = cursorena[vmode];
-    cursorena[vmode] = 0;
-    term_io_save = term_io;
-    term_io = 0;
-#endif /* OS2 */
-#endif /* NOLOCAL */
-    b_save = binary;                   /* SET FILE TYPE */
-    f_save = fncnv;                    /* SET FILE NAMES */
-    c_save = bctr;
-    p_save = fnspath;
-    r_save = recursive;
-    s_timint = timint;
-    ss_save = slostart;
-#ifndef NOCSETS
-    fcs_save = fcharset;
-    tcs_save = tcharset;
-#endif /* NOCSETS */
-
-#ifdef COMMENT
-/* Don't do this because then user can never find out what happened. */
-#ifdef CK_SPEED
-    for (i = 0; i < 256; i++)
-      s_ctlp[i] = ctlp[i];
-    f_ctlp = 1;
-#endif /* CK_SPEED */
-#endif /* COMMENT */
-    if (reliable == SET_ON)
-      slostart = 0;
-    is_tn = (!local && sstelnet)
-#ifdef TNCODE
-      || (local && network && ttnproto == NP_TELNET)
-#endif /* TNCODE */
-       ;
-#ifdef TNCODE
-    if (is_tn) {
-        if (tn_b_xfer && !(sstelnet || inserver)) {
-           /* Save the current state of Telnet Binary */
-           _u_bin = TELOPT_U(TELOPT_BINARY);
-           _me_bin = TELOPT_ME(TELOPT_BINARY);
-
-           /* If either direction is not Binary attempt to negotiate it */
-           if (!_u_bin && TELOPT_U_MODE(TELOPT_BINARY) != TN_NG_RF) {
-               tn_sopt(DO,TELOPT_BINARY);
-               TELOPT_UNANSWERED_DO(TELOPT_BINARY) = 1;
-           }
-           if (!_me_bin && TELOPT_ME_MODE(TELOPT_BINARY) != TN_NG_RF) {
-               tn_sopt(WILL,TELOPT_BINARY);
-               TELOPT_UNANSWERED_WILL(TELOPT_BINARY) = 1;
-           }
-           if (!(_me_bin && _u_bin))
-             tn_wait("proto set binary mode");
-        }
-#ifdef IKS_OPTION
-#ifdef CK_XYZ
-        if (protocol != PROTO_K) {     /* Non-Kermit protocol selected */
-            if (TELOPT_U(TELOPT_KERMIT) &&
-                TELOPT_SB(TELOPT_KERMIT).kermit.u_start) {
-                iks_wait(KERMIT_REQ_STOP,0); /* Stop the other Server */
-               /* _u_start = 1; */
-            }
-            if (TELOPT_ME(TELOPT_KERMIT) &&
-                TELOPT_SB(TELOPT_KERMIT).kermit.me_start) {
-                tn_siks(KERMIT_STOP);  /* I'm not servering */
-               TELOPT_SB(TELOPT_KERMIT).kermit.me_start = 0;
-               _me_start = 1;
-            }
-        } else
-#endif /* CK_XYZ */
-        if (sstate == 'x' || sstate == 'v') { /* Responding to a request */
-            if (!inserver && TELOPT_U(TELOPT_KERMIT) &&
-                TELOPT_SB(TELOPT_KERMIT).kermit.u_start) {
-                iks_wait(KERMIT_REQ_STOP,0); /* Stop the other Server */
-               /* _u_start = 1; */
-            }
-            if (TELOPT_ME(TELOPT_KERMIT) &&
-                !TELOPT_SB(TELOPT_KERMIT).kermit.me_start) {
-                tn_siks(KERMIT_START); /* Send Kermit-Server Start */
-               TELOPT_SB(TELOPT_KERMIT).kermit.me_start = 1;
-            }
-        } else {                       /* Initiating a request */
-            if (TELOPT_ME(TELOPT_KERMIT) &&
-                TELOPT_SB(TELOPT_KERMIT).kermit.me_start) {
-                tn_siks(KERMIT_STOP);  /* I'm not servering */
-               TELOPT_SB(TELOPT_KERMIT).kermit.me_start = 0;
-               _me_start = 1;
-            }
-            if (TELOPT_U(TELOPT_KERMIT) &&
-               !TELOPT_SB(TELOPT_KERMIT).kermit.u_start) {
-               /* Send Req-Server-Start */
-                if (!iks_wait(KERMIT_REQ_START,0)) {
-                    if (sstate != 's') {
-                       success = 0;    /* Other Kermit refused to serve */
-                       if (local)
-                         printf("A Kermit Server is not available\r\n");
-                       debug(F110,"proto()",
-                             "A Kermit Server is not available",0);
-                       tlog(F110,"IKS client/server failure",
-                             "A Kermit Server is not available",0);
-                       goto xxprotox;
-                    }
-               }
-            }
-        }
-#endif /* IKS_OPTION */
-#ifdef CK_ENCRYPTION
-        if (tn_no_encrypt_xfer && !(sstelnet || inserver)) {
-            ck_tn_enc_stop();
-        }
-#endif /* CK_ENCRYPTION */
-    }
-#endif /* TNCODE */
-
-    if (!xfrint) connoi();
-    xxproto();                         /* Call the real protocol function */
-
-#ifdef IKS_OPTION
-  xxprotox:
-#endif /* IKS_OPTION */
-    xferstat = success;                        /* Remember transfer status */
-    kactive = 0;
-
-#ifdef TNCODE
-#ifdef CK_ENCRYPTION
-        if (tn_no_encrypt_xfer && !(sstelnet || inserver)) {
-            ck_tn_enc_start();
-        }
-#endif /* CK_ENCRYPTION */
-#ifdef IKS_OPTION
-    if (TELOPT_ME(TELOPT_KERMIT) &&
-        TELOPT_SB(TELOPT_KERMIT).kermit.me_start && !_me_start) {
-        tn_siks(KERMIT_STOP);          /* Server is stopped */
-       TELOPT_SB(TELOPT_KERMIT).kermit.me_start = 0;
-    }
-#endif /* IKS_OPTION */
-    if (is_tn && tn_b_xfer && !(sstelnet || inserver)) {
-        /* if we negotiated Binary mode try to reset it */
-        if (!_u_bin) {
-            /* Check to see if the state changed during the transfer */
-           if (TELOPT_U(TELOPT_BINARY)) {
-               tn_sopt(DONT,TELOPT_BINARY);
-               TELOPT_UNANSWERED_DONT(TELOPT_BINARY) = 1;
-           } else
-             _u_bin = 1;               /* So we don't call tn_wait() */
-        }
-        if (!_me_bin) {
-            /* Check to see if the state changed during the transfer */
-           if (TELOPT_ME(TELOPT_BINARY)) {
-               tn_sopt(WONT,TELOPT_BINARY);
-               TELOPT_UNANSWERED_WONT(TELOPT_BINARY) = 1;
-           } else
-             _me_bin = 1;              /* So we don't call tn_wait() */
-       }
-       if (!(_me_bin && _u_bin))
-         tn_wait("proto reset binary mode");
-    }
-#endif /* TNCODE */
-
-#ifdef PATTERNS
-    patterns = pa_save;
-#endif /* PATTERNS */
-    filepeek = scan_save;
-
-#ifdef STREAMING
-    streaming = 0;
-    /* streamok = 0; */
-#endif /* STREAMING */
-#ifdef COMMENT
-#ifdef CK_SPEED
-    for (i = 0; i < 256; i++)
-      ctlp[i] = s_ctlp[i];
-    f_ctlp = 0;
-#endif /* CK_SPEED */
-#endif /* COMMENT */
-    urclear = 0;
-    if (!success) {
-       xitsta |= (what & W_KERMIT);
-       tlog(F110," failed:",(char *)epktmsg,0);
-    }
-    debug(F111,"proto xferstat",epktmsg,xferstat);
-    slostart = ss_save;
-    if (s_timint > -1) {               /* Because of REMOTE SET */
-       timint = s_timint;
-       s_timint = -1;
-    }
-    recursive = r_save;
-    fnspath = p_save;
-    if (c_save > -1) {                 /* Because of REMOTE SET */
-       bctr = c_save;
-       c_save = -1;
-    }
-    fncnv   = f_save;
-    binary  = b_save;
-#ifdef PIPESEND
-    pipesend = 0;                      /* Next time might not be pipesend */
-#endif /* PIPESEND */
-#ifndef NOLOCAL
-#ifdef OS2
-    cursorena[vmode] = cursor_save;
-    term_io = term_io_save;
-    display_demo = 1;
-#endif /* OS2 */
-#endif /* NOLOCAL */
-}
-
-static VOID
-xxproto() {
-    int x;
-    long lx;
-#ifdef CK_XYZ
-#ifdef XYZ_INTERNAL
-_PROTOTYP( int pxyz, (int) );
-#endif /* XYZ_INTERNAL */
-#endif /* CK_XYZ */
-
-    char xss[2];                       /* String representation of sstate */
-    xss[0] = sstate;
-    xss[1] = NUL;
-    s_timint = timint;
-
-    debug(F101,"xxproto entry justone","",justone);
-    success = 0;
-
-    retrieve = 0;                      /* Reset these ... */
-    reget = 0;
-    opkt = 0;
-
-    if (local && ttchk() < 0) {                /* Giving BYE or FIN */
-       if (bye_active) {               /* but there is no connection */
-           ttclos(0);
-           success = 1;
-           return;
-       }
-       /* Ditto for any REMOTE command */
-       if (sstate == 'g' && cmarg ) {
-           if (*cmarg == 'L' || *cmarg == 'F' || *cmarg == 'X')
-             success = 1;
-           else
-             printf("?No connection\r\n");
-           return;
-       }
-    }
-
-/* Set up the communication line for file transfer. */
-/* NOTE: All of the xxscreen() calls prior to the wart() invocation */
-/* could just as easily be printf's or, for that matter, hints. */
-
-    if (local && (speed < 0L) && (network == 0)) {
-       xxscreen(SCR_EM,0,0L,"Sorry, you must 'set speed' first");
-       return;
-    }
-    x = -1;
-    if (ttopen(ttname,&x,mdmtyp,cdtimo) < 0) {
-       debug(F111,"failed: proto ttopen local",ttname,local);
-       xxscreen(SCR_EM,0,0L,"Can't open line");
-       return;
-    }
-    if (x > -1) local = x;
-    debug(F111,"proto ttopen local",ttname,local);
-
-    lx = (local && !network) ? speed : -1;
-#ifdef NETCONN
-#ifdef CK_SPEED
-    if (is_tn) {
-       ctlp[(unsigned)255] = ctlp[CR] = 1;
-       if (parity == 'e' || parity == 'm') ctlp[127] = 1;
-       if (flow == FLO_XONX) {         /* Also watch out for Xon/Xoff */
-           ctlp[17] = ctlp[19] = 1;
-           ctlp[17+128] = ctlp[19+128] = 1;
-       }
-    }
-#endif /* CK_SPEED */
-#endif /* NETCONN */
-    if (ttpkt(lx,flow,parity) < 0) {   /* Put line in packet mode, */
-       xxscreen(SCR_EM,0,0L,"Can't condition line");
-       return;
-    }
-    if (local && !network && carrier != CAR_OFF) {
-       int x;                          /* Serial connection */
-       x = ttgmdm();                   /* with carrier checking */
-       if (x > -1) {
-           if (!(x & BM_DCD)) {
-               debug(F101,"proto ttgmdm","",0);
-               xxscreen(SCR_EM,0,0L,"Carrier required but not detected");
-               return;
-           }
-       }
-    }
-    /* Send remote side's "receive" or "server" startup string, if any */
-    if (local && ckindex((char *)xss,"srgcjhk",0,0,1)) {
-       char *s = NULL;
-        if (
-#ifdef IKS_OPTION
-           /* Don't send auto-blah string if we know other side is serving */
-           !TELOPT_U(TELOPT_KERMIT) ||
-           !TELOPT_SB(TELOPT_KERMIT).kermit.u_start
-#else
-           1
-#endif /* IKS_OPTION */
-           ) {
-           if (sstate == 's') {        /* Sending file(s) */
-               s = binary ? ptab[protocol].h_b_init : ptab[protocol].h_t_init;
-           } else if (protocol == PROTO_K) { /* Command for server */
-               s = ptab[protocol].h_x_init;
-           }
-       }
-#ifdef CK_SPEED
-#ifndef UNPREFIXZERO
-       if (protocol == PROTO_K)        /* Because of C-strings... */
-         ctlp[0] = 1;
-#endif /* UNPREFIXZERO */
-#endif /* CK_SPEED */
-       if (s) if (*s) {                /* If we have a command to send... */
-           char tmpbuf[356];
-           int tmpbufsiz = 356;
-           int stuff = -1, stuff2 = -1, len = 0;
-           extern int tnlm;
-           if (sstate == 's') {        /* Sending file(s) */
-#ifdef CK_XYZ
-               if (protocol == PROTO_X) {
-                   char * s2;
-                   s2 = cmarg2[0] ? cmarg2 : cmarg;
-                   if ((int)strlen(s) + (int)strlen(s2) + 4 < 356)
-                     sprintf(tmpbuf, s, s2);
-                   else
-                     tmpbuf[0] = NUL;
-               } else {
-#endif /* CK_XYZ */
-                   ckmakmsg(tmpbuf, 356, s, NULL, NULL, NULL);
-#ifdef CK_XYZ
-               }
-#endif /* CK_XYZ */
-           } else {                    /* Command for server */
-               ckstrncpy(tmpbuf,s,356);
-           }
-           ckstrncat(tmpbuf, "\015",sizeof(tmpbuf));
-           if (tnlm)                   /* TERMINAL NEWLINE ON */
-             stuff = LF;               /* Stuff LF */
-#ifdef TNCODE
-           /* TELNET NEWLINE MODE */
-           if (is_tn) {
-               switch (TELOPT_ME(TELOPT_BINARY) ? tn_b_nlm : tn_nlm) {
-                 case TNL_CR:
-                   break;
-                 case TNL_CRNUL:
-                   break;
-                 case TNL_CRLF:
-                   stuff2 = stuff;
-                   stuff = LF;
-                   break;
-               }
-           }
-#endif /* TNCODE */
-
-#ifdef NETCONN
-#ifdef TCPSOCKET
-#ifdef RLOGCODE
-           if (network && ttnproto == NP_RLOGIN) {
-               switch (tn_b_nlm) { /* Always BINARY */
-                 case TNL_CR:
-                   break;
-                 case TNL_CRNUL:
-                   stuff2 = stuff;
-                   stuff  = NUL;
-                   break;
-                 case TNL_CRLF:
-                   stuff2 = stuff;
-                   stuff = LF;
-                   break;
-               }
-           }
-#endif /* RLOGCODE */
-#endif /* TCPSOCKET */
-#endif /* NETCONN */
-
-           len = strlen(tmpbuf);
-           if (stuff >= 0 && len < tmpbufsiz - 1) {
-               tmpbuf[len++] = stuff;
-               if (stuff2 >= 0 && len < tmpbufsiz - 1)
-                 tmpbuf[len++] = stuff2;
-               tmpbuf[len] = NUL;
-           }
-           ttol((CHAR *)tmpbuf,len);
-           if (protocol == PROTO_K)    /* Give remote Kermit time to start */
-             msleep(400);
-       }
-    }
-
-#ifdef CK_XYZ
-    if (protocol != PROTO_K) {         /* Non-Kermit protocol selected */
-       char tmpbuf[356];
-       int tmpbufsiz = 356;
-       char * s = "";
-
-#ifdef CK_TMPDIR
-       if (sstate == 'v') {            /* If receiving and... */
-           if (dldir && !f_tmpdir) {   /* if they have a download directory */
-               if (s = zgtdir()) {     /* Get current directory */
-                   if (zchdir(dldir)) { /* Change to download directory */
-                       ckstrncpy(savdir,s,TMPDIRLEN);
-                       f_tmpdir = 1;   /* Remember that we did this */
-                   }
-               }
-           }
-       }
-#endif /* CK_TMPDIR */
-
-#ifdef XYZ_INTERNAL                    /* Internal */
-       success = !pxyz(sstate);
-#else
-#ifdef CK_REDIR                                /* External */
-       switch (sstate) {
-         case 's':                     /* 'Tis better to SEND... */
-           s = binary ? ptab[protocol].p_b_scmd : ptab[protocol].p_t_scmd;
-           break;
-         case 'v':                     /* ... than RECEIVE */
-           s = binary ? ptab[protocol].p_b_rcmd : ptab[protocol].p_t_rcmd;
-           break;
-       }
-       if (!s) s = "";
-       if (*s) {
-           if (sstate == 's') {        /* Sending */
-               extern int xfermode;
-               int k = 0, x = 0, b = binary;
-               /*
-                 If just one file we can scan it to set the xfer mode.
-                 Otherwise it's up to the external protocol program.
-               */
-               if (patterns && xfermode == XMODE_A && !iswild(fspec)) {
-                   extern int nscanfile;
-                   k = scanfile(fspec,&x,nscanfile);
-                   if (k > -1) {
-                       b = (k == FT_BIN) ? XYFT_B : XYFT_T;
-                       s = b ?
-                           ptab[protocol].p_b_scmd :
-                           ptab[protocol].p_t_scmd;
-                   }
-               }
-               if ((int)strlen(s) + (int)strlen(fspec) < tmpbufsiz) {
-                   sprintf(tmpbuf,s,fspec); /* safe (prechecked) */
-                   tlog(F110,"Sending",fspec,0L);
-               }
-           } else {                    /* Receiving */
-               if ((int)strlen(s) + (int)strlen(cmarg2) < tmpbufsiz) {
-                   sprintf(tmpbuf,s,cmarg2); /* safe (prechecked) */
-                   tlog(F110,"Receiving",cmarg2,0L);
-               }
-           }
-           tlog(F110," via external protocol:",tmpbuf,0);
-           debug(F110,"ckcpro ttruncmd",tmpbuf,0);
-           success = ttruncmd(tmpbuf);
-           tlog(F110," status:",success ? "OK" : "FAILED", 0);
-       } else {
-           printf("?Sorry, no external protocol defined for %s\r\n",
-                  ptab[protocol].p_name
-                  );
-       }
-#else
-       printf(
-"Sorry, only Kermit protocol is supported in this version of Kermit\n"
-              );
-#endif /* CK_REDIR */
-#endif /* XYZ_INTERNAL */
-       return;
-    }
-#endif /* CK_XYZ */
-
-#ifdef NTSIGX
-    conraw();
-    connoi();
-#else
-    if (!local)
-      connoi();                                /* No console interrupts if remote */
-#endif /* NTSIG */
-
-    kactive = 1;
-    if (sstate == 'x') {               /* If entering server mode, */
-       extern int howcalled;
-       server = 1;                     /* set flag, */
-       debug(F101,"server backgrd","",backgrd);
-       debug(F101,"server quiet","",quiet);
-       debug(F100,"SHOULD NOT SEE THIS IF IN BACKGROUND!","",0);
-       if (howcalled == I_AM_SSHSUB) { /* and issue appropriate message. */
-           ttol((CHAR *)"KERMIT READY TO SERVE...\015\012",26);
-       } else if (!local) {
-           if (!quiet && !backgrd
-#ifdef IKS_OPTION
-                && !TELOPT_ME(TELOPT_KERMIT) /* User was told by negotiation */
-#endif /* IKS_OPTION */
-               ) {
-               conoll(srvtxt);
-               conoll("KERMIT READY TO SERVE...");
-           }
-       } else {
-           conol("Entering server mode on ");
-           conoll(ttname);
-           conoll("Type Ctrl-C to quit.");
-           if (srvdis) intmsg(-1L);
-#ifdef TCPSOCKET
-#ifndef NOLISTEN
-           if (network && tcpsrfd > 0)
-             ttol((CHAR *)"KERMIT READY TO SERVE...\015\012",26);
-#endif /* NOLISTEN */
-#endif /* TCPSOCKET */
-       }
-    } else
-      server = 0;
-#ifdef VMS
-    if (!quiet && !backgrd)    /* So message doesn't overwrite prompt */
-      conoll("");
-    if (local) conres();       /* So Ctrl-C will work */
-#endif /* VMS */
-/*
-  If in remote mode, not shushed, not in background, and at top command level,
-  issue a helpful message telling what to do...
-*/
-    if (!local && !quiet && !backgrd) {
-       if (sstate == 'v') {
-           conoll("Return to your local Kermit and give a SEND command.");
-           conoll("");
-           conoll("KERMIT READY TO RECEIVE...");
-       } else if (sstate == 's') {
-           conoll("Return to your local Kermit and give a RECEIVE command.");
-           conoll("");
-           conoll("KERMIT READY TO SEND...");
-       } else if ( sstate == 'g' || sstate == 'r' || sstate == 'h' ||
-                   sstate == 'j' || sstate == 'c' ) {
-           conoll("Return to your local Kermit and give a SERVER command.");
-           conoll("");
-           conoll((sstate == 'r' || sstate == 'j' || sstate == 'h') ?
-                  "KERMIT READY TO GET..." :
-                  "KERMIT READY TO SEND SERVER COMMAND...");
-       }
-    }
-#ifdef COMMENT
-    if (!local) sleep(1);
-#endif /* COMMENT */
-/*
-  The 'wart()' function is generated by the wart program.  It gets a
-  character from the input() routine and then based on that character and
-  the current state, selects the appropriate action, according to the state
-  table above, which is transformed by the wart program into a big case
-  statement.  The function is active for one transaction.
-*/
-    rtimer();                          /* Reset elapsed-time timer */
-#ifdef GFTIMER
-    rftimer();
-#endif /* GFTIMER */
-    resetc();                          /* & other per-transaction counters. */
-
-    debug(F101,"proto calling wart, justone","",justone);
-
-    wart();                            /* Enter the state table switcher. */
-/*
-  Note: the following is necessary in case we have just done a remote-mode
-  file transfer, in which case the controlling terminal modes have been
-  changed by ttpkt().  In particular, special characters like Ctrl-C and
-  Ctrl-\ might have been turned off (see ttpkt).  So this call to ttres() is
-  essential.  IMPORTANT: restore interrupt handlers first, otherwise any
-  terminal interrupts that occur before this is done in the normal place
-  later will cause a crash.
-*/
-#ifdef OS2
-    ttres();                           /* Reset the communication device */
-#else
-    if (!local) {
-       setint();                       /* Arm interrupt handlers FIRST */
-       msleep(500);
-       ttres();                        /* Then restore terminal. */
-    }
-#endif /* OS2 */
-    xxscreen(SCR_TC,0,0L,"");          /* Transaction complete */
-    x = quiet;
-    quiet=1;
-    clsif();                           /* Failsafe in case we missed */
-    clsof(1);                          /* a case in the state machine. */
-    quiet = x;
-
-    if (server) {                      /* Back from packet protocol. */
-       if (!quiet && !backgrd
-#ifdef IKSD
-           && !inserver
-#endif /* IKSD */
-           ) {                         /* Give appropriate message */
-           conoll("");
-           conoll("C-Kermit server done");
-        }
-        server = 0;                    /* Not a server any more */
-    }
-}
-
-/*  S G E T I N I T  --  Handle incoming GET-Class packets  */
-
-/*
-  Returns:
-   -1: On error
-    0: GET packet processed OK - ready to Send.
-    1: Extended GET processed OK - wait for another.
-*/
-static int
-sgetinit(reget,xget) int reget, xget; {        /* Server end of GET command */
-    char * fs = NULL;                  /* Pointer to filespec */
-    int i, n, done = 0;
-#ifdef PIPESEND
-    extern int usepipes, pipesend;
-#endif /* PIPESEND */
-    extern int nolinks;
-
-    if (!ENABLED(en_get)) {            /* Only if not disabled!  */
-       errpkt((CHAR *)"GET disabled");
-       return(-1);
-    }
-
-    /* OK to proceed */
-
-    nolinks = recursive;
-    filcnt = 0;
-
-#ifdef WHATAMI
-    /* If they are alike this was already done in whoarewe() */
-    debug(F101,"sgetinit whatru","",whatru);
-    if (whatru & WMI_FLAG) {           /* Did we get WHATAMI info? */
-       debug(F101,"sgetinit binary (1)","",binary);
-#ifdef VMS
-       if (binary != XYFT_I && binary != XYFT_L)
-#else
-#ifdef OS2
-         if (binary != XYFT_L)
-#endif /* OS2 */
-#endif /* VMS */
-           binary = (whatru & WMI_FMODE) ? /* Yes, set file type */
-             XYFT_B : XYFT_T;  /* automatically */
-       debug(F101,"sgetinit binary (2)","",binary);
-       if (!wearealike)
-         fncnv = (whatru & WMI_FNAME) ? 1 : 0; /* And name conversion */
-    }
-#endif /* WHATAMI */
-
-    fs = (char *)srvcmd;
-    srvptr = srvcmd;                   /* Point to server command buffer */
-    decode(rdatap,putsrv,0);           /* Decode the GET command into it */
-    /* Accept multiple filespecs */
-    cmarg2 = "";                       /* Don't use cmarg2 */
-    cmarg = "";                                /* Don't use cmarg */
-
-    done = 1;                          /* Only 1 packet needed... */
-    if (xget) {                                /* Special decoding for Extended GET */
-       char L, next, c;                /* PLV items */
-       int len, val;                   /* More PLV items */
-       char * p = (char *)srvcmd;      /* String to decode */
-
-       done = 0;                       /* Maybe more packets needed */
-       fs = NULL;                      /* We don't know the filespec yet */
-       c = *p++;                       /* Get first parameter */
-
-       while (c) {                     /* For all parameters... */
-           debug(F000,"sgetinit c","",c);
-           L = *p++;                   /* Get length */
-           if (L >= SP)                /* Decode length */
-             len = xunchar(L);
-           else if (c == '@') {        /* Allow missing EOP length field */
-               len = 0;
-           } else {
-               len = (xunchar(*p++) * 95);
-               len += xunchar(*p++);
-           }
-           debug(F101,"sgetinit len","",len);
-           next = *(p+len);            /* Get next parameter */
-           *(p+len) = NUL;             /* Zero it out to terminal value */
-           debug(F110,"sgetinit p",p,0);
-           switch (c) {                /* Do the parameter */
-             case 'O':                 /* GET Options */
-               val = atoi(p);          /* Convert to int */
-               debug(F101,"sgetinit O val","",val);
-               if (val & GOPT_DEL) moving = 1;
-               if (val & GOPT_RES) reget = 1;
-               if (val & GOPT_REC) {
-                   recursive = 1;
-                   nolinks = 2;
-                   if (fnspath == PATH_OFF)
-                     fnspath = PATH_REL;
-               }
-               break;
-             case 'M':                 /* Transfer Mode */
-               val = atoi(p);
-               debug(F101,"sgetinit M val","",val);
-               if (val < 1)
-                 break;
-               patterns = 0;           /* Takes precedence over patterns */
-               filepeek = 0;           /* and FILE SCAN */
-               if (val == GMOD_TXT) binary = XYFT_T; /* Text */
-               if (val == GMOD_BIN) binary = XYFT_B; /* Binary */
-               if (val == GMOD_LBL) binary = XYFT_L; /* Labeled */
-               break;
-             case 'F':                 /* Filename */
-               fs = p;
-               debug(F110,"sgetinit filename",fs,0);
-               break;
-             case '@':                 /* End Of Parameters */
-               done = 1;
-               debug(F100,"sgetinit EOP","",0);
-               break;
-             default:
-               errpkt((CHAR *)"Unknown GET Parameter");
-               debug(F100,"sgetinit unknown parameter","",0);
-               return(-1);
-           }
-           p += (len + 1);
-           c = next;
-       }
-    }
-    if (!fs) fs = "";                  /* A filename is required */
-    if (*fs) {
-       havefs = 1;
-       n = 0;                          /* Check for quoted name */
-       if ((n = strlen(fs)) > 1) {
-           /* Note: this does not allow for multiple quoted names */
-           if ((fs[0] == '{' && fs[n-1] == '}') ||
-               (fs[0] == '"' && fs[n-1] == '"')) {
-               fs[n-1] = '\0';
-               fs++;
-               debug(F111,"sgetinit unquoted filename",fs,n);
-           } else
-             n = 0;                    /* This means no quoting */
-       }
-
-#ifdef PIPESEND
-       debug(F111,"sgetinit",fs,usepipes);
-       if (usepipes && ENABLED(en_hos) && *fs == '!') {
-           cmarg = fs + 1;             /* Point past the bang */
-           *fs = NUL;
-           nfils = -1;
-           pipesend = 1;
-           debug(F111,"sgetinit pipesend",cmarg,pipesend);
-       }
-       if (!pipesend) {                /* If it's not a pipe */
-#endif /* PIPESEND */
-           if (n == 0) {               /* If the name was not quoted */
-#ifndef NOMSEND
-               nfils = fnparse(fs);    /* Allow it to be a list of names */
-               debug(F111,"sgetinit A",fs,nfils);
-#ifdef COMMENT
-/* This doesn't work if a GET-PATH is set. */
-               if (nfils == 1 && !iswild(fs)) { /* Single file */
-                   char * m;
-                   if ((x = zchki(fs)) < 0) { /* Check if it's sendable */
-                       switch (x) {
-                         case -1: m = "File not found"; break;
-                         case -2: m = "Not a regular file"; break;
-                         case -3: m = "Read access denied"; break;
-                       }
-                       errpkt((CHAR *)m);
-                       return(-1);
-                   }
-               }
-#endif /* COMMENT */
-           } else {                    /* If it was quoted */
-#endif /* NOMSEND */
-               nzxopts = 0;
-#ifdef UNIXOROSK
-               if (matchdot)  nzxopts |= ZX_MATCHDOT;
-#endif /* UNIXOROSK */
-               if (recursive) nzxopts |= ZX_RECURSE;
-               /* Treat as a single filespec */
-               nfils = 0 - nzxpand(fs,nzxopts);
-               debug(F111,"sgetinit B",fs,nfils);
-               cmarg = fs;
-           }
-#ifdef PIPESEND
-       }
-#endif /* PIPESEND */
-    }
-    if (!done) {                       /* Need more O packets... */
-       debug(F100,"sgetinit O-Packet TBC","",0); /* To Be Continued */
-       return(1);
-    }
-    debug(F100,"sgetinit O-Packet done - havefs","",havefs);
-    if (!havefs) {                     /* Done - make sure we have filename */
-       errpkt((CHAR *)"GET without filename");
-       return(-1);
-    }
-    freerpkt(winlo);
-    winlo = 0;                         /* Back to packet 0 again. */
-    debug(F101,"sgetinit winlo","",winlo);
-    nakstate = 0;                      /* Now I'm the sender! */
-    if (reget) sendmode = SM_RESEND;
-    if (sinit() > 0) {                 /* Send Send-Init */
-#ifdef STREAMING
-       if (!streaming)
-#endif /* STREAMING */
-         timint = chktimo(rtimo,timef); /* Switch to per-packet timer */
-       return(0);                      /* If successful, switch state */
-    } else return(-1);                 /* Else back to server command wait */
-}
-
-#else  /* NOXFER */
-
-#include "ckcdeb.h"
-
-VOID
-proto() {
-    extern int success;
-    success = 0;
-}
-#endif /* NOXFER */
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644 (file)
index 0000000..54628e7
--- /dev/null
@@ -0,0 +1,42 @@
+ckermit for Debian
+------------------
+
+June 29 2004:
+ Crypto options (kerberos and SSL) have been temporarily disabled to
+ get a up-to-date version into debian in time for Sarge. They will be
+ re-enabled once the issue of whether crypto-enabled ckermit belongs
+ in non-free or non-US/non-free has been decided by the ftpmasters.
+
+
+The site for ckermit, which has lots more documentation, is at:
+
+http://www.columbia.edu/kermit/
+
+On startup, kermit looks for .kermrc in your home directory.
+If this is not found, it uses /etc/kermit/kermrc. This in
+turn looks for .mykermrc in your home directory.
+
+Kermit scripts can be run with shebang (#!) notation, i.e. by making
+the script executable and setting the first line to
+
+#!/usr/bin/kermit
+
+As most users do not need the full config file, a minimal config file
+is installed by default. If you wish to run kermit with the full
+config file, run it as "kermrc".
+
+/usr/bin/kermrc is a symbolic link to /etc/kermit/kermrc.full,
+which can be edited to taste.
+
+iksd (the Internet Kermit Service Daemon) can be enabled or disabled
+using:
+
+dpkg-reconfigure ckermit
+
+iksd uses /etc/kermit/iksd.conf on startup.  If you have enabled
+anonymous use, it uses /etc/kermit/iksd-anon.conf *within* the
+anonymous chroot, so if you use the default, it will look for
+
+/home/ftp/etc/kermit/iksd-anon.conf
+
+ -- Ian Beckwith <ianb@nessie.mcc.ac.uk>, Tue Jun 29 12:31:58 2004
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..e5d4ae7
--- /dev/null
@@ -0,0 +1,207 @@
+ckermit (212-1) unstable; urgency=low
+
+  * New upstream beta release.
+
+ -- Ian Beckwith <ianb@debian.org>  Fri, 17 Jun 2011 20:37:51 +0100
+
+ckermit (211-15) unstable; urgency=low
+
+  * Add Italian translation. Thanks to Luca Bruno. (Closes: #602240).
+  * Standards-Version: 3.9.1 (no changes).
+
+ -- Ian Beckwith <ianb@debian.org>  Mon, 08 Nov 2010 20:49:06 +0000
+
+ckermit (211-14) unstable; urgency=low
+
+  * Switch to 3.0 (quilt) source format:
+    + Add debian/source/format.
+    + Remove quilt from debian/rules.
+    + Remove quilt from Build-Depends.
+    + Remove debian/README.source.
+  * 060_speeling.patch: fix more spelling errors.
+  * Add lintian overrides for spelling false-positives.
+  * Update maintainer email address.
+  * Remove DM-Upload-Allowed flag.
+  * Debhelper compat level 7.
+  * Standards-Version: 3.8.4 (no changes).
+
+ -- Ian Beckwith <ianb@debian.org>  Wed, 12 May 2010 02:15:29 +0100
+
+ckermit (211-13) unstable; urgency=low
+
+  * Weaken inetd Depends: to Recommends (Closes: #511564).
+  * postinst: if IKSD requested, complain if no inetd installed.
+  * templates: new template ckermit/iksd-no-inetd.
+  * Translations:
+    + New:
+      * Finnish, thanks to Esko Arajärvi (Closes: #518197).
+      * Spanish, thanks to Francisco Javier Cuadrado (Closes: #518914).
+    + Updated:
+      * Czech, thanks to Martin Šín (Closes: #517357).
+      * German, thanks to Matthias Julius & Andre Gorgus (Closes: #517855).
+      * Galician, thanks to Marce Villarino (Closes: #517516).
+      * Japanese, thanks to Hideki Yamane (Closes: #517648).
+      * Swedish, thanks to Martin Bagge (Closes: #518327).
+      * French, thanks to Florentin Duneau (Closes: #518576).
+      * Russian, thanks to Yuri Kozlov (Closes: #518702).
+      * Portuguese, thanks to Américo Monteiro (Closes: #519004).
+      * Danish, thanks to Jacob Sparre Andersen.
+  * Fix typos, unfuzzy translations. Thanks to Esko Arajärvi.
+  * Mark 'dpkg-reconfigure ckermit' non-translatable. Thanks to Jacob
+    Sparre Andersen.
+  * Standards-Version: 3.8.1 (no changes).
+
+ -- Ian Beckwith <ianb@erislabs.net>  Sun, 15 Mar 2009 00:26:29 +0000
+
+ckermit (211-12) unstable; urgency=low
+
+  * Add debian/README.source pointing to quilt docs.
+  * debian/copyright: note that ckermit is non-free and not part of
+    Debian, and explain why.
+  * control: add Homepage: field.
+  * postinst, postrm, config: switch from /bin/sh -e to set -e.
+  * Standards-version: 3.8.0.
+  * New patch 06_speeling: fix spelling errors.
+  * 05_ck_patch: bump ck_patch value.
+
+ -- Ian Beckwith <ianb@erislabs.net>  Thu, 26 Feb 2009 22:31:09 +0000
+
+ckermit (211-11) unstable; urgency=low
+
+  * New Russian debconf translation (Closes: #511935)
+    Thanks to Yuri Kozlov.
+
+ -- Ian Beckwith <ianb@erislabs.net>  Sun, 18 Jan 2009 06:47:05 +0000
+
+ckermit (211-10) unstable; urgency=low
+
+  * Add DM-Upload-Allowed: yes.
+  * Switch to linking with libsocks4 as libsocksd is no longer in testing.
+  * Split up source patches and apply them at build time with quilt.
+  * Remove nostrip handling, dh_strip does it for us.
+  * Bump debhelper compat level to 6.
+
+ -- Ian Beckwith <ianb@erislabs.net>  Wed, 16 Jan 2008 11:36:09 +0000
+
+ckermit (211-9) unstable; urgency=low
+
+  * Fix iksd user information disclosure when PAM is used (Closes: #417247).
+  * Update maintainer email address.
+  * Bump ck_patch to 2.
+  * Fix menu section.
+  * Stop ignoring return code of 'make clean'.
+  * Cut out unneeeded linkage: added "-Wl,-z,defs -Wl,--as-needed" to LNKFLAGS
+  * Bump Standards-Version to 3.7.3
+
+ -- Ian Beckwith <ianb@erislabs.net>  Thu, 13 Dec 2007 20:49:55 +0000
+
+ckermit (211-8) unstable; urgency=low
+
+  * Change netbase dependency to openbsd-inetd | inet-superserver.
+  * Tweak debconf templates to keep lintian happy.
+  * Bumped debconf compatability level to 5.
+  * Tidied debian/rules.
+
+ -- Ian Beckwith <ianb@nessie.mcc.ac.uk>  Sat, 09 Jun 2007 23:12:49 +0100
+
+ckermit (211-7) unstable; urgency=low
+
+  * New debconf translations:
+    + German - thanks to Matthias Julius.  (Closes: #408586).
+    + Portuguese - thanks to Ricardo Silva (Closes: #413748).
+    + Galician - thanks to Jacobo Tarrio   (Closes: #413757).
+  * debian/control:
+    + Updated Standards-Version (no changes).
+    + Added XS-Autobuild: yes.
+
+ -- Ian Beckwith <ianb@nessie.mcc.ac.uk>  Thu,  8 Mar 2007 05:09:34 +0000
+
+ckermit (211-6) unstable; urgency=low
+
+  * Applied fix to IF tests from ckdaily snapshot (Closes: #323510).
+  * Set ck_patch to "1" per discussion with upstream.
+  * New debconf translations:
+    + Czech - thanks to Martin Sín (Closes: #319577).
+    + Swedish - thanks to Daniel Nylander (Closes: #330429).
+  * debian/control:
+    + Added ${misc:Depends} to pick up right debconf dependency (Closes: #331779).
+    + Added dependency on netbase.
+    + Standards-Version: 3.6.2 (No changes).
+    + Updated Recommends to openssh-client | ssh-client
+  * debian/postrm: removed bashism.
+  * debian/copyright: added note from upstream about autobuilding.
+
+ -- Ian Beckwith <ianb@nessie.mcc.ac.uk>  Sat, 22 Oct 2005 20:43:57 +0100
+
+ckermit (211-5) unstable; urgency=low
+
+  * New translations:
+    + French - Thanks to Olivier Trichet (Closes: #260090)
+    + Danish - Thanks to Morten Brix Pederson (Closes: #268368)
+    + Japanese - Thanks to Hideki Yamane (Closes: #270927)
+
+ -- Ian Beckwith <ianb@nessie.mcc.ac.uk>  Wed, 23 Feb 2005 15:16:11 +0000
+
+ckermit (211-4) unstable; urgency=low
+
+  * Temporarily removed crypto (kerberos and SSL)
+  until the non-US/non-free issue is resolved, so we
+  don't miss sarge.
+  * debian/control:
+    + Section: reverted to non-free/comm.
+    + Build-Depends: removed kerberos and openssl.
+
+ -- Ian Beckwith <ianb@nessie.mcc.ac.uk>  Tue, 29 Jun 2004 14:22:41 +0100
+
+ckermit (211-3) unstable; urgency=low
+
+  * Included minor changes upstream sneaked in without bumping
+  the version number. As previous 211- versions haven't made it into
+  debian, there should be no problems with the .orig.tar.gz changing.
+  * debian/rules: clean target now deletes wermit, as upstream makefile
+  no longer does.
+
+ -- Ian Beckwith <ianb@nessie.mcc.ac.uk>  Sat, 26 Jun 2004 17:09:46 +0100
+
+ckermit (211-2) unstable; urgency=low
+
+  * Uploaded to non-US/non-free instead of non-free as crypto options now enabled.
+  * Fixes for new lintian warnings:
+    + iksd man page link moved to section 8.
+    + Converted - in kermit man page to \- or \(hy as appropriate.
+
+ -- Ian Beckwith <ianb@nessie.mcc.ac.uk>  Tue,  4 May 2004 06:40:09 +0100
+
+ckermit (211-1) unstable; urgency=low
+
+  * New Maintainer (Closes: #143649).
+  * New upstream version (Closes: #58634).
+  * Ack NMU (Closes: #54901).
+  * Add -DTIMEH to KFLAGS, replacing NMU patch (Closes: #91281).
+  * Sorted out docs dir (Closes: #229309).
+  * errno problem should be fixed by this recompile (Closes: #222096, #228728).
+  * Kerberos 4/5 support with MIT libs (Closes: #95135).
+  * Support for Socks4 (libsocksd), openssl, pam, shadow passwds and IKSD.
+  * Converted to po-debconf.
+  * Added support for /etc/kermit/kermrc (Closes: #123336).
+  * Attempt to remove /etc/kermit/ on purge in postrm.
+  * debian/control: changed Section: to non-US/non-free
+
+ -- Ian Beckwith <ianb@nessie.mcc.ac.uk>  Wed, 14 Apr 2004 03:17:56 +0100
+
+ckermit (196-1.1) unstable; urgency=low
+
+  * Non-maintainer Upload
+  * As part of BSP, fixing RC bug 91281. Added compiler directive to
+    sense <time.h>
+  * Added Build-Depends forestalling possible RC bugs in future
+
+ -- Gopal Narayanan <gopal@debian.org>  Sat, 14 Apr 2001 00:17:22 +0000
+
+ckermit (196-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Vaidhyanathan G Mayilrangam <vaidhy@debian.org>  Tue,  4 Jan 2000 15:22:47 -0500
+
+
diff --git a/debian/ckermit.lintian-overrides b/debian/ckermit.lintian-overrides
new file mode 100644 (file)
index 0000000..56c14aa
--- /dev/null
@@ -0,0 +1,6 @@
+# valid spelling of a variable name in a debug message
+ckermit: spelling-error-in-binary ./usr/bin/kermit nam name
+# telnet IAC DONT
+ckermit: spelling-error-in-binary ./usr/bin/kermit dont don't
+# Viet Nam is apparently a valid name
+ckermit: spelling-error-in-binary ./usr/bin/kermit Nam Name
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/debian/config b/debian/config
new file mode 100644 (file)
index 0000000..f702fc2
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+db_input medium ckermit/iksd || true
+db_go || true
+
+db_get ckermit/iksd || true
+
+if [ "$RET"     = true ]
+then
+    db_input medium ckermit/iksd-anon || true
+    db_go || true
+
+    db_get ckermit/iksd-anon || true
+    if [ "$RET" = true ]
+    then
+        db_input medium ckermit/iksd-anondir || true
+        db_go || true
+    fi
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..6de758e
--- /dev/null
@@ -0,0 +1,19 @@
+Source: ckermit
+Section: non-free/comm
+Priority: extra
+Maintainer: Ian Beckwith <ianb@debian.org>
+Build-Depends: libncurses5-dev, debhelper (>= 7), libpam0g-dev, libsocks4
+Standards-Version: 3.9.1
+XS-Autobuild: yes
+Homepage: http://www.kermit-project.org
+
+Package: ckermit
+Architecture: any
+Pre-Depends: debconf (>=0.2.17)
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Recommends: openbsd-inetd | inet-superserver, openssh-client | ssh-client
+Description: a serial and network communications package
+ C-Kermit is a combined serial and network communication software package
+ offering a consistent, medium-independent, cross-platform approach to
+ connection establishment, terminal sessions, file transfer,
+ character-set translation, and automation of communication tasks.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..9986df5
--- /dev/null
@@ -0,0 +1,137 @@
+This package was (re)debianized by Ian Beckwith <ianb@erislabs.net> on
+Mon, 24 Nov 2003 13:02:10 +0000.
+
+An earlier version was debianized and maintained by Vaidhyanathan G
+Mayilrangam <vaidhy@debian.org>
+
+It was downloaded from http://www.columbia.edu/kermit/ckermit.html
+
+ckermit is in the non-free archive, and as such is not part of
+Debian GNU/Linux. This is chiefly because the license forbids
+distributing ckermit along with non-free commercial products.
+
+Upstream Authors: Kermit Team at Columbia University
+
+Copyright: Copyright (C) 1985, 2002,
+  The Trustees of Columbia University in the City of New York.
+  All rights reserved.
+
+copied from the COPYING.TXT supplied with the tarball.
+Also available at:
+
+ftp://ftp.kermit.columbia.edu/kermit/f/COPYING.TXT
+
+
+THE C-KERMIT 7.0 AND 8.0 LICENSE
+
+  Last update: Thu Feb  8 17:41:07 2002
+
+This is the new C-Kermit 7.0 and 8.0 license.  The intention is to allow
+C-Kermit to be distributed with "free" operating systems such as GNU/Linux,
+FreeBSD, NetBSD, OpenBSD, The Hurd, etc, even when the distributions
+themselves (such as Red Hat or Caldera) might be sold and/or might include
+applications that are not free, and yet still require a license to include
+C-Kermit in or with "non-free" products such as commercial OS's, commercial
+software packages, embedded systems, and hardware (other than general-purpose
+computers preloaded with "free" operating systems), since these licenses
+furnish a large portion of the Kermit Project's funding.
+
+There have been some questions about the provision in Clause (A) that:
+
+                                                                  The
+    C-Kermit source code may not be changed without the consent of the
+    Kermit Project, which will not be unreasonably withheld (this is
+    simply a matter of keeping a consistent and supportable code base).
+
+The intention of this clause is primarily to make sure that anybody who
+makes modifications sends them back to us, since we are the ones have to
+support C-Kermit, and so we can carry them through to future releases (so
+you don't have to make the same changes again and again).
+
+Secondarily it is to protect Columbia University in the unlikely event of
+modifications made with deliberate intent to offend or cause damage.
+
+Any redistributor of C-Kermit under Clause (A) below should rest assured
+there is no intention of preventing them from constructing a distribution in
+the appropriate format (RPM or whatever) for their product or from issuing
+any patches required for their products; we simply want to be informed so we
+can maintain a consistent code base and a solid, supportable software
+package.  We are happy to work with any redistributor an any issues that
+concern them.  If you have questions, send them to kermit@columbia.edu.
+
+Note: All changes to this file since 1 January 2000 (the C-Kermit 7.0
+release date) are above; the license itself has not changed, except to
+update the most recent copyright date.
+
+(Begin)
+
+Copyright (C) 1985, 2002,
+  The Trustees of Columbia University in the City of New York.
+  All rights reserved.
+
+PERMISSIONS:
+
+The C-Kermit software may be obtained directly from the Kermit Project at
+Columbia University (or from any source explicitly licensed by the Kermit
+Project or implicitly licensed by Clause (A) below) by any individual for
+his or her OWN USE, and by any company or other organization for its own
+INTERNAL DISTRIBUTION and use, including installation on servers that are
+accessed by customers or clients, WITHOUT EXPLICIT LICENSE.
+
+Conditions for REDISTRIBUTION are as follows:
+
+(A) The C-Kermit software, in source and/or binary form, may be
+    included WITHOUT EXPLICIT LICENSE in distributions of OPERATING
+    SYSTEMS that have OSI (Open Source Initiative, www.opensource.org)
+    approved licenses, even if non-Open-Source applications (but not
+    operating systems) are included in the same distribution.  Such
+    distributions include, but are not limited to, CD-ROM, FTP site,
+    Web site, or preinstalled software on a new GENERAL-PURPOSE
+    computer, as long as the primary character of the distribution is
+    an Open Source operating system with accompanying utilities.  The
+    C-Kermit source code may not be changed without the consent of the
+    Kermit Project, which will not be unreasonably withheld (this is
+    simply a matter of keeping a consistent and supportable code base).
+
+(B) Inclusion of C-Kermit software in whole or in part, in any form, in
+    or with any product not covered by Clause (A), or its distribution
+    by any commercial enterprise to its actual or potential customers
+    or clients except as in Clause (A), requires a license from the
+    Kermit Project, Columbia University; contact kermit@columbia.edu.
+
+The name of Columbia University may not be used to endorse or promote
+products derived from or including the C-Kermit software without specific
+prior written permission.
+
+DISCLAIMER:
+
+  THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE
+  TRUSTEES OF COLUMBIA UNIVERSITY IN THE CITY OF NEW YORK AS TO ITS
+  FITNESS FOR ANY PURPOSE, AND WITHOUT WARRANTY BY THE TRUSTEES OF
+  COLUMBIA UNIVERSITY IN THE CITY OF NEW YORK OF ANY KIND, EITHER
+  EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+  THE TRUSTEES OF COLUMBIA UNIVERSITY IN THE CITY OF NEW YORK SHALL NOT
+  BE LIABLE FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL,
+  OR CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING OUT OF OR
+  IN CONNECTION WITH THE USE OF THE SOFTWARE, EVEN IF IT HAS BEEN OR IS
+  HEREAFTER ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  YOU SHALL
+  INDEMNIFY AND HOLD HARMLESS THE TRUSTEES OF COLUMBIA UNIVERSITY IN
+  THE CITY OF NEW YORK, ITS EMPLOYEES AND AGENTS FROM AND AGAINST ANY
+  AND ALL CLAIMS, DEMANDS, LOSS, DAMAGE OR EXPENSE (INCLUDING
+  ATTORNEYS' FEES) ARISING OUT OF YOUR USE OF THIS SOFTWARE.
+
+The above copyright notice, permissions notice, and disclaimer may not be
+removed, altered, or obscured and shall be included in all copies of the
+C-Kermit software.  The Trustees of Columbia University in the City of
+New York reserve the right to revoke this permission if any of the terms
+of use set forth above are breached.
+
+(End)
+
+Statement from upstream, Frank da Cruz <fdc@columbia.edu>:
+
+I have no problems with ckermit being automatically downloaded, built, and
+uploaded as long as the license, COPYING.TXT, is included in the package.
+
+
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..e24bd2d
--- /dev/null
@@ -0,0 +1,5 @@
+etc/kermit
+usr/bin
+usr/sbin
+usr/share/man/man1
+usr/share/doc/ckermit
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..e2c3e01
--- /dev/null
@@ -0,0 +1,9 @@
+ckaaaa.txt
+ckcbwr.txt
+ckccfg.txt
+ckcplm.txt
+ckermit70.txt
+ckermit80.txt
+ckubwr.txt
+ckuins.txt
+ckututor.txt
diff --git a/debian/iksd.conf b/debian/iksd.conf
new file mode 100644 (file)
index 0000000..f7f8263
--- /dev/null
@@ -0,0 +1,9 @@
+; This is iksd.conf, the ckermit configuration file run by
+; IKSD, the Internet Kermit Services Daemon
+; See "man kermit" and http://www.kermit-project.org/uiksd.html
+; for details on configuring this file.
+
+; If you want commands to be run only by anonymous users,
+; place them in etc/kermit/iksd-anon.conf under the anonymous chroot
+; (eg /home/ftp/etc/kermit/iksd-anon.conf )
+
diff --git a/debian/kermit.pam b/debian/kermit.pam
new file mode 100644 (file)
index 0000000..b07925c
--- /dev/null
@@ -0,0 +1,4 @@
+auth   required        pam_unix_auth.so shadow nullok
+account        required        pam_unix_acct.so
+session        required        pam_unix_session.so
+
diff --git a/debian/kermrc b/debian/kermrc
new file mode 100644 (file)
index 0000000..6ba3aa5
--- /dev/null
@@ -0,0 +1,21 @@
+; This is /etc/kermit/kermrc
+; It is executed on startup if ~/.kermrc is not found.
+; See "man kermit" and http://www.kermit-project.org/ for details on
+; configuring this file, and /etc/kermit/kermrc.full
+; for an example of a complex configuration file
+
+; If you want to run additional user-specific customisations in
+; addition to this file, place them in ~/.mykermrc
+
+; Execute user's personal customization file (named in environment var
+; CKERMOD or ~/.mykermrc)
+; 
+
+if def \$(CKERMOD) assign _myinit \$(CKERMOD)
+if not def _myinit assign _myinit \v(home).mykermrc
+
+xif exist \m(_myinit)  {               ; If it exists,
+    echo Executing \m(_myinit)...      ; print message,
+    take \m(_myinit)                   ; and TAKE the file.
+}
+
diff --git a/debian/links b/debian/links
new file mode 100644 (file)
index 0000000..9f5be8b
--- /dev/null
@@ -0,0 +1,7 @@
+usr/bin/kermit usr/bin/kermit-sshsub
+usr/bin/kermit usr/sbin/iksd
+etc/kermit/kermrc.full usr/bin/kermrc 
+usr/share/man/man1/kermit.1.gz usr/share/man/man1/kermrc.1.gz
+usr/share/man/man1/kermit.1.gz usr/share/man/man1/kermit-sshsub.1.gz
+usr/share/man/man1/kermit.1.gz usr/share/man/man8/iksd.8.gz
+usr/share/doc/ckermit/ckaaaa.txt.gz usr/share/doc/ckermit/README.gz
diff --git a/debian/menu b/debian/menu
new file mode 100644 (file)
index 0000000..2167bfd
--- /dev/null
@@ -0,0 +1 @@
+?package(ckermit):needs="text" section="Applications/Network/File Transfer" title="kermit" command="/usr/bin/kermit"
diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in
new file mode 100644 (file)
index 0000000..cef83a3
--- /dev/null
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] templates
diff --git a/debian/po/cs.po b/debian/po/cs.po
new file mode 100644 (file)
index 0000000..f6c2737
--- /dev/null
@@ -0,0 +1,113 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ckermit 211-5\n"
+"Report-Msgid-Bugs-To: ckermit@packages.debian.org\n"
+"POT-Creation-Date: 2009-03-14 23:40+0000\n"
+"PO-Revision-Date: 2009-02-27 09:47+0100\n"
+"Last-Translator: Martin Sin <martin.sin@zshk.cz>\n"
+"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Enable Internet Kermit Service Daemon (IKSD) in inetd.conf?"
+msgstr "Povolit Internet Kermit Service Daemon (IKSD) v souboru inetd.conf?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The Internet Kermit Service Daemon (IKSD) is the C-Kermit program running as "
+"an Internet service, similar to an FTP or Telnet server.  It executes Telnet "
+"protocol just like a Telnet server and it transfers files like an FTP "
+"server.  But unlike an FTP server, IKSD uses the Kermit file transfer "
+"protocol (which is more powerful and flexible) and allows both FTP-like "
+"client/server connections as well as direct keyboard interaction.  Secure "
+"authentication methods and encrypted sessions are available, as well as a "
+"wide range of file transfer and management functions, which can be scripted "
+"to automate arbitrarily complex tasks."
+msgstr ""
+"Internet Kermit Service Daemon (IKSD) je program C-Kermit běžící jako "
+"internetová služba, podobně jako FTP nebo Telnet. Spouští protokol Telnetu "
+"podobně, jako server Telnet a posílá soubory jako server FTP. Ale na rozdíl "
+"od serveru FTP, IKSD používá k přenosu Kermitový souborový protokol (ten je "
+"výkonnější a pružnější) a umožňuje obě klient/server připojení založená na "
+"FTP, stejně tak jako přímou interakci s klávesnicí. K dispozici jsou také "
+"bezpečné metody autentizace a šifrovaných relací právě tak jako široká škála "
+"funkcí umožňujících odesílání souborů a řízení. Ty mohou být zapsány ve "
+"formě skriptů umožňujících automatizaci libovolně složitých úloh."
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Enable anonymous IKSD logins?"
+msgstr "Povolit anonymní přihlášení k IKSD?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"IKSD supports anonymous logins (using chroot), similar to anonymous FTP."
+msgstr ""
+"IKSD umožňuje anonymní přihlášení (používá chroot), podobně jako anonymní "
+"FTP."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Directory for anonymous IKSD logins:"
+msgstr "Adresář pro anonymní přihlášení k IKSD:"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Enter directory for anonymous IKSD logins. A chroot() will be performed into "
+"this directory on login. This directory will NOT be created."
+msgstr ""
+"Zadejte adresář pro anonymní přihlášení k IKSD. Při přihlášení do tohoto "
+"adresáře bude proveden chroot(). Tento adresář NEBUDE vytvořen."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "The default is /home/ftp (same as wu-ftpd)."
+msgstr "Výchozí hodnotou je /home/ftp (stejně jako u wu-ftpd)."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid "No inet daemon found, so IKSD cannot be configured."
+msgstr "Nebyl nalezen daemon inet, IKSD není možno nastavit."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid ""
+"Please install an inetd (e.g. openbsd-inetd) and then reconfigure ckermit "
+"with:"
+msgstr ""
+"Nainstalujte prosím nějaký inetd (např. openbsd-inetd) a nastavte znovu "
+"ckermit:"
+
+#~ msgid "dpkg-reconfigure ckermit"
+#~ msgstr "dpkg-reconfigure ckermit"
+
+#~ msgid "/home/ftp"
+#~ msgstr "/home/ftp"
diff --git a/debian/po/da.po b/debian/po/da.po
new file mode 100644 (file)
index 0000000..f5c71b5
--- /dev/null
@@ -0,0 +1,125 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ckermit 211\n"
+"Report-Msgid-Bugs-To: ckermit@packages.debian.org\n"
+"POT-Creation-Date: 2009-03-14 23:40+0000\n"
+"PO-Revision-Date: 2009-03-12 09:38+0100\n"
+"Last-Translator: Jacob Sparre Andersen <sparre@nbi.dk>\n"
+"Language-Team: Debian L10N Danish <debian-l10n-danish@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Enable Internet Kermit Service Daemon (IKSD) in inetd.conf?"
+msgstr "Aktivér Internet Kermit Service Daemon (IKSD) i inetd.conf?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The Internet Kermit Service Daemon (IKSD) is the C-Kermit program running as "
+"an Internet service, similar to an FTP or Telnet server.  It executes Telnet "
+"protocol just like a Telnet server and it transfers files like an FTP "
+"server.  But unlike an FTP server, IKSD uses the Kermit file transfer "
+"protocol (which is more powerful and flexible) and allows both FTP-like "
+"client/server connections as well as direct keyboard interaction.  Secure "
+"authentication methods and encrypted sessions are available, as well as a "
+"wide range of file transfer and management functions, which can be scripted "
+"to automate arbitrarily complex tasks."
+msgstr ""
+"Internet Kermit Service Daemon (IKSD) er C-Kermit programmet der kører som "
+"en internetservice, ligesom en FTP- eller telnetserver. Den eksekverer "
+"telnet protokollen ligesom en telnet server, og overfører filer ligesom en "
+"FTP server. Men i modsætningen til en FTP server, bruger IKSD Kermit-"
+"filoverførselprotokollen (som er mere kraftfuld og fleksibel) og tillader "
+"både FTP-lignende klient/server forbindelser samt direkte tastatur "
+"interaktion. Sikre godkendelsesmetoder og krypterede sessioner er "
+"tilgængelige, samt et bredt udvalg af filoverførsel og "
+"håndteringsfunktioner, som kan skriptes til at køre automatiske forskellige "
+"komplekse opgaver."
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Enable anonymous IKSD logins?"
+msgstr "Aktivér anonyme IKSD login?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"IKSD supports anonymous logins (using chroot), similar to anonymous FTP."
+msgstr "IKSD understøtter anonyme login (vha. 'chroot'), ligesom anonym FTP."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Directory for anonymous IKSD logins:"
+msgstr "Mappen til anonyme IKSD login:"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Enter directory for anonymous IKSD logins. A chroot() will be performed into "
+"this directory on login. This directory will NOT be created."
+msgstr ""
+"Indtast mappen der skal bruges til anonyme IKSD login. En chroot() vil blive "
+"udført i denne mappe ved login. Denne mappe vil IKKE blive oprettet."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "The default is /home/ftp (same as wu-ftpd)."
+msgstr "Standarden er /home/ftp (ligesom wu-ftpd)."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid "No inet daemon found, so IKSD cannot be configured."
+msgstr "Fandt ingen inet-dæmon, så IKSD kan ikke sættes op."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid ""
+"Please install an inetd (e.g. openbsd-inetd) and then reconfigure ckermit "
+"with:"
+msgstr ""
+"Installér en inet-dæmon (for eksempel openbsd-inetd) og sæt så ckermit op "
+"igen med:"
+
+#~ msgid "dpkg-reconfigure ckermit"
+#~ msgstr "dpkg-reconfigure ckermit"
+
+#~ msgid "/home/ftp"
+#~ msgstr "/home/ftp"
+
+#~ msgid ""
+#~ "IKSD can be accessed by any Telnet client. If file transfer is required, "
+#~ "the Telnet client must include Kermit file transfer protocol.  Best "
+#~ "results are obtained when the client implements the Telnet Kermit Option "
+#~ "(as do Kermit 95 for Windows and C-Kermit for Unix) for \"tight coupling"
+#~ "\" of client and server."
+#~ msgstr ""
+#~ "IKSD kan tilgås af hvilken som helst telnet klient. Hvis filoverførsel er "
+#~ "krævet, skal telnetklienten inkludere Kermit filoverførselprotokollen. De "
+#~ "bedste resultater opnås når klienten implementerer 'telnet Kermit "
+#~ "tilvalg'(det gør Kermit 95 til Windows og C-Kermit til Unix) for tæt "
+#~ "kobling af klient og server."
diff --git a/debian/po/de.po b/debian/po/de.po
new file mode 100644 (file)
index 0000000..64b24b0
--- /dev/null
@@ -0,0 +1,104 @@
+# translation of po-debconf template to German
+# This file is distributed under the same license as the ckermit package.
+# Copyright (C):
+#
+# Matthias Julius <mdeb@julius-net.net> 2007, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: ckermit 211-13\n"
+"Report-Msgid-Bugs-To: ckermit@packages.debian.org\n"
+"POT-Creation-Date: 2009-03-14 23:40+0000\n"
+"PO-Revision-Date: 2009-03-02 10:09-0500\n"
+"Last-Translator: Matthias Julius <mdeb@julius-net.net>\n"
+"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Enable Internet Kermit Service Daemon (IKSD) in inetd.conf?"
+msgstr "Den Internet-Kermit-Service-Daemon (IKSD) in inetd.conf aktivieren?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The Internet Kermit Service Daemon (IKSD) is the C-Kermit program running as "
+"an Internet service, similar to an FTP or Telnet server.  It executes Telnet "
+"protocol just like a Telnet server and it transfers files like an FTP "
+"server.  But unlike an FTP server, IKSD uses the Kermit file transfer "
+"protocol (which is more powerful and flexible) and allows both FTP-like "
+"client/server connections as well as direct keyboard interaction.  Secure "
+"authentication methods and encrypted sessions are available, as well as a "
+"wide range of file transfer and management functions, which can be scripted "
+"to automate arbitrarily complex tasks."
+msgstr ""
+"Der Internet Kermit Service Daemon (IKSD) ist ein C-Kermit-Programm, welches "
+"ähnlich einem FTP- oder Telnet-Server als Internet-Service läuft. Es führt "
+"das Telnet-Protokoll wie ein Telnet-Server aus und es überträgt Dateien wie "
+"ein FTP-Server. Aber anders als ein FTP-Server benutzt IKSD das Kermit-Datei-"
+"Transfer-Protokoll (welches leistungsfähiger und flexibler ist) und erlaubt "
+"sowohl FTP-ähnliche Client/Server-Verbindungen als auch direkte Tastatur-"
+"Interaktion. Sichere Authentifizierungs-Methoden und verschlüsselte "
+"Sitzungen sowie eine große Auswahl von Dateiübertragungs- und -"
+"verwaltungsfunktionen sind verfügbar. Diese können in Skripten verwendet "
+"werden, um beliebig komplexe Aufgaben auszuführen."
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Enable anonymous IKSD logins?"
+msgstr "Anonyme IKSD-Anmeldungen ermöglichen?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"IKSD supports anonymous logins (using chroot), similar to anonymous FTP."
+msgstr ""
+"IKSD unterstützt anonyme Anmeldungen (verwendet chroot) ähnlich anonymem FTP."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Directory for anonymous IKSD logins:"
+msgstr "Verzeichnis für anonyme IKSD-Anmeldungen:"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Enter directory for anonymous IKSD logins. A chroot() will be performed into "
+"this directory on login. This directory will NOT be created."
+msgstr ""
+"Geben Sie das Verzeichnis für anonyme IKSD-Anmeldungen ein. Ein chroot()-"
+"Aufruf in dieses Verzeichnis wird bei der Anmeldung durchgeführt. Das "
+"Verzeichnis wird NICHT angelegt."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "The default is /home/ftp (same as wu-ftpd)."
+msgstr "Die Voreinstellung ist /home/ftp (wie bei wu-ftpd)."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid "No inet daemon found, so IKSD cannot be configured."
+msgstr "Kein inet-Daemon gefunden, daher kann IKSD nicht konfiguriert werden."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid ""
+"Please install an inetd (e.g. openbsd-inetd) and then reconfigure ckermit "
+"with:"
+msgstr ""
+"Bitte installieren Sie einen Inetd (z.B. openbsd-inetd) und konfigurieren "
+"Sie Ckermit neu durch Eingabe von:"
+
+#~ msgid "dpkg-reconfigure ckermit"
+#~ msgstr "dpkg-reconfigure ckermit"
diff --git a/debian/po/es.po b/debian/po/es.po
new file mode 100644 (file)
index 0000000..7542102
--- /dev/null
@@ -0,0 +1,128 @@
+# ckermit po-debconf translation to Spanish
+# Copyright (C) 2009 Software in the Public Interest
+# This file is distributed under the same license as the ckermit package.
+#
+# Changes:
+#   - Initial translation
+#       Francisco Javier Cuadrado <fcocuadrado@gmail.com>, 2009
+#
+# Traductores, si no conocen el formato PO, merece la pena leer la
+# documentación de gettext, especialmente las secciones dedicadas a este
+# formato, por ejemplo ejecutando:
+#       info -n '(gettext)PO Files'
+#       info -n '(gettext)Header Entry'
+#
+# Equipo de traducción al español, por favor lean antes de traducir
+# los siguientes documentos:
+#
+#   - El proyecto de traducción de Debian al español
+#     http://www.debian.org/intl/spanish/
+#     especialmente las notas y normas de traducción en
+#     http://www.debian.org/intl/spanish/notas
+#
+#   - La guía de traducción de po's de debconf:
+#     /usr/share/doc/po-debconf/README-trans
+#     o http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ckermit 211-13\n"
+"Report-Msgid-Bugs-To: ckermit@packages.debian.org\n"
+"POT-Creation-Date: 2009-03-14 23:40+0000\n"
+"PO-Revision-Date: 2009-03-06 09:03+0100\n"
+"Last-Translator: Francisco Javier Cuadrado <fcocuadrado@gmail.com>\n"
+"Language-Team: Debian l10n Spanish <debian-l10n-spanish@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Enable Internet Kermit Service Daemon (IKSD) in inetd.conf?"
+msgstr ""
+"¿Desea activar el demonio del servicio Kermit de internet (IKSD) en el "
+"archivo «inetd.conf»?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The Internet Kermit Service Daemon (IKSD) is the C-Kermit program running as "
+"an Internet service, similar to an FTP or Telnet server.  It executes Telnet "
+"protocol just like a Telnet server and it transfers files like an FTP "
+"server.  But unlike an FTP server, IKSD uses the Kermit file transfer "
+"protocol (which is more powerful and flexible) and allows both FTP-like "
+"client/server connections as well as direct keyboard interaction.  Secure "
+"authentication methods and encrypted sessions are available, as well as a "
+"wide range of file transfer and management functions, which can be scripted "
+"to automate arbitrarily complex tasks."
+msgstr ""
+"El demonio del servicio Kermit de internet (IKSD) es el programa C-Kermit "
+"ejecutándose como un servicio de internet, similar a un servidor de FTP o de "
+"Telnet. Ejecuta el protocolo de Telnet como si fuera un servidor de Telnet y "
+"transfiere los archivos como un servidor de FTP. Pero a diferencia de un "
+"servidor FTP, IKSD utiliza el protocolo de transferencia de archivos de "
+"Kermit (que es más potente y flexible) y, permite conexiones con el cliente "
+"y el servidor similares a FTP así como interacción directa desde el teclado. "
+"Están disponibles los métodos de autenticación seguros y las sesiones "
+"cifradas, así como un amplio rango de funciones de transferencia y gestión "
+"de archivos, que se pueden automatizar mediante scripts para ejecutar tareas "
+"más complejas."
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Enable anonymous IKSD logins?"
+msgstr "¿Desea activar el acceso anónimo en IKSD?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"IKSD supports anonymous logins (using chroot), similar to anonymous FTP."
+msgstr ""
+"IKSD permite acceder de forma anónima (utilizando chroot), de forma parecida "
+"a un FTP anónimo."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Directory for anonymous IKSD logins:"
+msgstr "Directorio para los accesos anónimos de IKSD:"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Enter directory for anonymous IKSD logins. A chroot() will be performed into "
+"this directory on login. This directory will NOT be created."
+msgstr ""
+"Introduzca el directorio para los accesos anónimos de IKSD. Se realizará un "
+"chroot() en este directorio al identificarse. NO se creará este directorio."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "The default is /home/ftp (same as wu-ftpd)."
+msgstr "El directorio predeterminado es «/home/ftp» (al igual que en wu-ftpd)."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid "No inet daemon found, so IKSD cannot be configured."
+msgstr ""
+"No se ha encontrado el demonio inet, de modo que no se puede configurar IKSD."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid ""
+"Please install an inetd (e.g. openbsd-inetd) and then reconfigure ckermit "
+"with:"
+msgstr ""
+"Instale un demonio de inet (por ejemplo: openbsd-inetd) y reconfigure "
+"ckermit ejecutando:"
+
+#~ msgid "dpkg-reconfigure ckermit"
+#~ msgstr "dpkg-reconfigure ckermit"
diff --git a/debian/po/fi.po b/debian/po/fi.po
new file mode 100644 (file)
index 0000000..2bff98f
--- /dev/null
@@ -0,0 +1,103 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: ckermit\n"
+"Report-Msgid-Bugs-To: ckermit@packages.debian.org\n"
+"POT-Creation-Date: 2009-03-14 23:40+0000\n"
+"PO-Revision-Date: \n"
+"Last-Translator: Esko Arajärvi <edu@iki.fi>\n"
+"Language-Team: Finnish <debian-l10n-finnish@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Finnish\n"
+"X-Poedit-Country: FINLAND\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Enable Internet Kermit Service Daemon (IKSD) in inetd.conf?"
+msgstr ""
+"Otetaanko Internet Kermit Service Daemon (IKSD) käyttöön tiedostossa inetd."
+"conf?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The Internet Kermit Service Daemon (IKSD) is the C-Kermit program running as "
+"an Internet service, similar to an FTP or Telnet server.  It executes Telnet "
+"protocol just like a Telnet server and it transfers files like an FTP "
+"server.  But unlike an FTP server, IKSD uses the Kermit file transfer "
+"protocol (which is more powerful and flexible) and allows both FTP-like "
+"client/server connections as well as direct keyboard interaction.  Secure "
+"authentication methods and encrypted sessions are available, as well as a "
+"wide range of file transfer and management functions, which can be scripted "
+"to automate arbitrarily complex tasks."
+msgstr ""
+"Internet Kermit Service Daemon (IKSD) on C-Kermit-ohjelma, jota ajetaan "
+"Internet-palveluna FTP- ja Telnet-palvelimien tapaan. Se käyttää Telnet-"
+"protokollaa Telnet-palvelimen tapaan ja siirtää tiedostoja FTP-palvelimen "
+"tapaan. FTP-palvelimista poiketen IKSD käyttää Kermit-"
+"tiedostonsiirtoprotokollaa (joka on tehokkaampi ja joustavampi) ja sallii "
+"sekä FTP:n kaltaiset asiakas/palvelin-yhteydet että suoran näppäimistön "
+"käytön. Käytettävissä on turvallisia tunnistautumismenetelmiä ja salattuja "
+"yhteysmuotoja samoin kuin laaja joukko tiedostonsiirto- ja "
+"hallintatoimintoja, joiden avulla voidaan automatisoida mielivaltaisen "
+"monimutkaisia tehtäviä."
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Enable anonymous IKSD logins?"
+msgstr "Otetaanko anonyymit IKSD-kirjautumiset käyttöön?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"IKSD supports anonymous logins (using chroot), similar to anonymous FTP."
+msgstr ""
+"IKSD tukee anonyymeja kirjautumisia (käyttäen chrootia) anonyymin FTP:n "
+"tapaan."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Directory for anonymous IKSD logins:"
+msgstr "Anonyymien IKSD-kirjautumisten hakemisto:"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Enter directory for anonymous IKSD logins. A chroot() will be performed into "
+"this directory on login. This directory will NOT be created."
+msgstr ""
+"Anna hakemisto anonyymeille IKSD-kirjautumisille. Kirjautumisen yhteydessä "
+"hakemistolle ajetaan chroot(). Tätä hakemistoa EI luoda."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "The default is /home/ftp (same as wu-ftpd)."
+msgstr "Oletus on /home/ftp (sama kuin paketilla wu-ftpd)."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid "No inet daemon found, so IKSD cannot be configured."
+msgstr ""
+"Mitään inet-taustaohjelmaa ei löytynyt, joten IKSD:n asetuksia ei voida "
+"tehdä."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid ""
+"Please install an inetd (e.g. openbsd-inetd) and then reconfigure ckermit "
+"with:"
+msgstr ""
+"Asenna inetd (esim. openbsd-inetd) ja muokkaa ckermitin asetuksia komennolla:"
+
+#~ msgid "dpkg-reconfigure ckermit"
+#~ msgstr "dpkg-reconfigure ckermit"
diff --git a/debian/po/fr.po b/debian/po/fr.po
new file mode 100644 (file)
index 0000000..58d81ac
--- /dev/null
@@ -0,0 +1,110 @@
+# Translation of ckermit debconf screen to French
+# Copyright (C) 2004-2009 Debian French l10n team <debian-l10n-french@lists.debian.org>
+# This file is distributed under the same license as the ckermit package.
+#
+# Translator
+# Olivier Trichet <olivier.trichet@freesurf.fr>, 2004, 2007
+# Florentin Duneau <fduneau@gmail.com>, 2009
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ckermit\n"
+"Report-Msgid-Bugs-To: ckermit@packages.debian.org\n"
+"POT-Creation-Date: 2009-03-14 23:40+0000\n"
+"PO-Revision-Date: 2009-03-04 20:18+0100\n"
+"Last-Translator: Florentin Duneau <fduneau@gmail.com>\n"
+"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.3.1\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Enable Internet Kermit Service Daemon (IKSD) in inetd.conf?"
+msgstr ""
+"Faut-il activer le démon de service internet Kermit (IKSD) dans inetd.conf ?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The Internet Kermit Service Daemon (IKSD) is the C-Kermit program running as "
+"an Internet service, similar to an FTP or Telnet server.  It executes Telnet "
+"protocol just like a Telnet server and it transfers files like an FTP "
+"server.  But unlike an FTP server, IKSD uses the Kermit file transfer "
+"protocol (which is more powerful and flexible) and allows both FTP-like "
+"client/server connections as well as direct keyboard interaction.  Secure "
+"authentication methods and encrypted sessions are available, as well as a "
+"wide range of file transfer and management functions, which can be scripted "
+"to automate arbitrarily complex tasks."
+msgstr ""
+"Le démon de service internet Kermit (IKSD) correspond au programme C-Kermit "
+"lancé en tant que service internet, tel un serveur FTP ou Telnet. Il gère le "
+"protocole Telnet comme un serveur Telnet et le transfert de fichiers comme "
+"un serveur FTP. Mais à la différence d'un serveur FTP, IKSD utilise le "
+"protocole de transfert de fichiers Kermit (qui est flexible et plus "
+"puissant) ; il autorise à la fois des connexions client/serveur comme FTP et "
+"des commandes passées directement au clavier. Des méthodes "
+"d'authentification sécurisée et de chiffrement de session sont disponibles, "
+"ainsi qu'un large panel de fonctions de transfert et gestion de fichiers qui "
+"peuvent, via des scripts, être automatisées pour effectuer des tâches "
+"complexes."
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Enable anonymous IKSD logins?"
+msgstr "Faut-il autoriser les connexions IKSD anonymes ?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"IKSD supports anonymous logins (using chroot), similar to anonymous FTP."
+msgstr ""
+"IKSD gère les connexions anonymes dans un environnement fermé d'exécution "
+"(« chroot »), de manière comparable aux connexions FTP anonymes."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Directory for anonymous IKSD logins:"
+msgstr "Répertoire pour les connexions IKSD anonymes :"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Enter directory for anonymous IKSD logins. A chroot() will be performed into "
+"this directory on login. This directory will NOT be created."
+msgstr ""
+"Veuillez indiquer le répertoire pour les connexions IKSD anonymes. Un "
+"environnement d'exécution fermé (« chroot») sera démarré dans ce répertoire à "
+"la connexion. Ce répertoire ne sera pas créé."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "The default is /home/ftp (same as wu-ftpd)."
+msgstr "Par défaut, comme pour wu-ftpd, /home/ftp est utilisé."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid "No inet daemon found, so IKSD cannot be configured."
+msgstr "Aucun démon inetd installé, IKSD ne sera pas configuré"
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid ""
+"Please install an inetd (e.g. openbsd-inetd) and then reconfigure ckermit "
+"with:"
+msgstr ""
+"Veuillez installer un démon inetd (par exemple, openbsd-inetd) et "
+"reconfigurer ckermit avec :"
+
+#~ msgid "dpkg-reconfigure ckermit"
+#~ msgstr "dpkg-reconfigure ckermit"
diff --git a/debian/po/gl.po b/debian/po/gl.po
new file mode 100644 (file)
index 0000000..9319596
--- /dev/null
@@ -0,0 +1,109 @@
+# Galician translation of ckermit's debconf templates
+# This file is distributed under the same license as the ckermit package.
+#
+# Jacobo Tarrio <jtarrio@debian.org>, 2007.
+# marce villarino <mvillarino@users.sourceforge.net>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: ckermit\n"
+"Report-Msgid-Bugs-To: ckermit@packages.debian.org\n"
+"POT-Creation-Date: 2009-03-14 23:40+0000\n"
+"PO-Revision-Date: 2009-02-28 11:51+0100\n"
+"Last-Translator: marce villarino <mvillarino@users.sourceforge.net>\n"
+"Language-Team: Galician <proxecto@trasno.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 0.2\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Enable Internet Kermit Service Daemon (IKSD) in inetd.conf?"
+msgstr "Desexa activar o servizo Kermit de Internet (IKSD) en inetd.conf?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The Internet Kermit Service Daemon (IKSD) is the C-Kermit program running as "
+"an Internet service, similar to an FTP or Telnet server.  It executes Telnet "
+"protocol just like a Telnet server and it transfers files like an FTP "
+"server.  But unlike an FTP server, IKSD uses the Kermit file transfer "
+"protocol (which is more powerful and flexible) and allows both FTP-like "
+"client/server connections as well as direct keyboard interaction.  Secure "
+"authentication methods and encrypted sessions are available, as well as a "
+"wide range of file transfer and management functions, which can be scripted "
+"to automate arbitrarily complex tasks."
+msgstr ""
+"O servizo Kermit de Internet (IKSD) é o programa C-Kermit executándose como "
+"un servizo de Internet, semellante a un servidor FTP ou Telnet. Executa o "
+"protocolo Telnet igual que un servidor Telnet, e transfire ficheiros igual "
+"que un servidor FTP. Pero, ao contrario que un servidor FTP, IKSD emprega o "
+"protocolo de transferencia de ficheiros Kermit (que é máis potente e "
+"flexible) e permite conexións cliente/servidor semellantes ás de FTP así "
+"como interacción directa polo teclado. Hai dispoñíbeis métodos seguros de "
+"autenticación e sesións cifradas, así como unha grande variedade de funcións "
+"de xestión e transferencia de ficheiros coas que se pode facer un script "
+"para automatizar as tarefas arbitrariamente complexas."
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Enable anonymous IKSD logins?"
+msgstr "Desexa activar as conexións IKSD anónimas?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"IKSD supports anonymous logins (using chroot), similar to anonymous FTP."
+msgstr ""
+"IKSD soporta conexións anónimas (empregando chroot), semellantes ao FTP "
+"anónimo."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Directory for anonymous IKSD logins:"
+msgstr "Directorio para as conexións IKSD anónimas:"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Enter directory for anonymous IKSD logins. A chroot() will be performed into "
+"this directory on login. This directory will NOT be created."
+msgstr ""
+"Introduza o directorio para as conexións IKSD anónimas. Hase realizar unha "
+"operación chroot() sobre este directorio ao se conectar. NON se ha crear "
+"este directorio."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "The default is /home/ftp (same as wu-ftpd)."
+msgstr "O valor predeterminado é /home/ftp (o mesmo que wu-ftpd)."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid "No inet daemon found, so IKSD cannot be configured."
+msgstr "Non se atopou o daemon inet, polo que non se pode configurar IKSD."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid ""
+"Please install an inetd (e.g. openbsd-inetd) and then reconfigure ckermit "
+"with:"
+msgstr ""
+"Instale un inetd (por ex. openbsd-inetd) e logo reconfigure ckermit coa "
+"orden:"
+
+#~ msgid "dpkg-reconfigure ckermit"
+#~ msgstr "dpkg-reconfigure ckermit"
+
+#~ msgid "/home/ftp"
+#~ msgstr "/home/ftp"
diff --git a/debian/po/it.po b/debian/po/it.po
new file mode 100644 (file)
index 0000000..92f1c09
--- /dev/null
@@ -0,0 +1,102 @@
+# ckermit italian po-debconf translation
+# Copyright (C) 2010 THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the ckermit package.
+# Luca Bruno <lucab@debian.org>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ckermit\n"
+"Report-Msgid-Bugs-To: ckermit@packages.debian.org\n"
+"POT-Creation-Date: 2009-03-14 23:40+0000\n"
+"PO-Revision-Date: 2010-11-02 21:31+0100\n"
+"Last-Translator: Luca Bruno <lucab@debian.org>\n"
+"Language-Team: Italian <tp@lists.linux.it>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Enable Internet Kermit Service Daemon (IKSD) in inetd.conf?"
+msgstr "Abilitare l'Internet Kermit Service Daemon (IKSD) in inetd.conf?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The Internet Kermit Service Daemon (IKSD) is the C-Kermit program running as "
+"an Internet service, similar to an FTP or Telnet server.  It executes Telnet "
+"protocol just like a Telnet server and it transfers files like an FTP "
+"server.  But unlike an FTP server, IKSD uses the Kermit file transfer "
+"protocol (which is more powerful and flexible) and allows both FTP-like "
+"client/server connections as well as direct keyboard interaction.  Secure "
+"authentication methods and encrypted sessions are available, as well as a "
+"wide range of file transfer and management functions, which can be scripted "
+"to automate arbitrarily complex tasks."
+msgstr ""
+"L'Internet Kermit Service Daemon (IKSD) è il programma C-Kermit in "
+"esecuzione come servizio Internet, in maniera simile ad un server FTP o "
+"Telnet. Può supportare protocolli Telnet come un server Telnet e trasferire "
+"file come un server FTP. A differenza di un server FTP, IKSD usa il "
+"protocollo di trasferimento Kermit (più potente e flessibile) e permette "
+"connessioni client/server simili a FTP così come l'interazione diretta da "
+"tastiera. Sono disponibili metodi di autenticazione disicura e sessioni "
+"cifrate, ma anche un'ampia gamma di funzioni di gestione e trasferimento "
+"file, che possono essere usate in script per automatizzare lavori complessi."
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Enable anonymous IKSD logins?"
+msgstr "Abilitare gli accessi anonimi a IKSD?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"IKSD supports anonymous logins (using chroot), similar to anonymous FTP."
+msgstr ""
+"IKSD supporta gli accessi anonimi (usando chroot), in maniera simile all'FTP "
+"anonimo."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Directory for anonymous IKSD logins:"
+msgstr "Directory per accessi IKSD anonimi:"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Enter directory for anonymous IKSD logins. A chroot() will be performed into "
+"this directory on login. This directory will NOT be created."
+msgstr ""
+"Specificare una directory per gli accessi IKSD anonimi. Al login, verrà "
+"effettuato un chroot() in tale directory. La directory NON verrà creata "
+"automaticamente."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "The default is /home/ftp (same as wu-ftpd)."
+msgstr "La directory predefinita è /home/ftp (la stessa usata da wu-ftpd)"
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid "No inet daemon found, so IKSD cannot be configured."
+msgstr ""
+"Non è stato trovato alcun demone inet, IKSD non può essere configurato."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid ""
+"Please install an inetd (e.g. openbsd-inetd) and then reconfigure ckermit "
+"with:"
+msgstr ""
+"Installare un gestore inetd (es. openbsd-inetd) ed in seguito riconfigurare "
+"ckermit con:"
diff --git a/debian/po/ja.po b/debian/po/ja.po
new file mode 100644 (file)
index 0000000..14c4b3e
--- /dev/null
@@ -0,0 +1,125 @@
+# \r
+#    Translators, if you are not familiar with the PO format, gettext\r
+#    documentation is worth reading, especially sections dedicated to\r
+#    this format, e.g. by running:\r
+#         info -n '(gettext)PO Files'\r
+#         info -n '(gettext)Header Entry'\r
+# \r
+#    Some information specific to po-debconf are available at\r
+#            /usr/share/doc/po-debconf/README-trans\r
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans\r
+# \r
+#    Developers do not need to manually edit POT or PO files.\r
+# \r
+# \r
+msgid ""
+msgstr ""
+"Project-Id-Version: ckermit 211-13\n"
+"Report-Msgid-Bugs-To: ckermit@packages.debian.org\n"
+"POT-Creation-Date: 2009-03-14 23:40+0000\n"
+"PO-Revision-Date: 2009-03-01 11:33+0100\n"
+"Last-Translator: Hideki Yamane <henrich@samba.gr.jp>\n"
+"Language-Team: Japanese <debian-japanese@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Enable Internet Kermit Service Daemon (IKSD) in inetd.conf?"
+msgstr "inetd.conf で Internet Kermit Service Daemon (IKSD) を有効にしますか?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The Internet Kermit Service Daemon (IKSD) is the C-Kermit program running as "
+"an Internet service, similar to an FTP or Telnet server.  It executes Telnet "
+"protocol just like a Telnet server and it transfers files like an FTP "
+"server.  But unlike an FTP server, IKSD uses the Kermit file transfer "
+"protocol (which is more powerful and flexible) and allows both FTP-like "
+"client/server connections as well as direct keyboard interaction.  Secure "
+"authentication methods and encrypted sessions are available, as well as a "
+"wide range of file transfer and management functions, which can be scripted "
+"to automate arbitrarily complex tasks."
+msgstr ""
+"Internet Kermit Service Daemon (IKSD) は、C-Kermit プログラムを FTP や "
+"Telnet サーバのようなインターネットサービスとして動作させるものです。それはま"
+"るでTelnet サーバのように Telnet プロトコルを実行し、FTP サーバのようにファイ"
+"ルを転送します。しかし FTP サーバとは違い、IKSD は (よりパワフルで柔軟な) "
+"Kermit ファイル転送プロトコルを使い、キーボードからの直接入力時と同様な形で "
+"FTP ライクなクライアント・サーバ接続の双方を許可します。任意の複雑な処理を自"
+"動化するような記述が可能な、安全な認証方法・暗号化されたセッション・広範囲の"
+"ファイル転送及び管理機能が可能になっています。"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Enable anonymous IKSD logins?"
+msgstr "匿名 IKSD ログインを有効にしますか?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"IKSD supports anonymous logins (using chroot), similar to anonymous FTP."
+msgstr ""
+"IKSD は、匿名 FTP に似た (chroot を使った) 匿名ログインをサポートしています。"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Directory for anonymous IKSD logins:"
+msgstr "匿名 IKSD ログイン:"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Enter directory for anonymous IKSD logins. A chroot() will be performed into "
+"this directory on login. This directory will NOT be created."
+msgstr ""
+"匿名 IKSD ログイン用のディレクトリを入力してください。ログインの際、このディ"
+"レクトリで chroot() が有効になります。このディレクトリは「作成されません」。"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "The default is /home/ftp (same as wu-ftpd)."
+msgstr "デフォルトは /home/ftp です (wu-ftpd と同じです)"
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid "No inet daemon found, so IKSD cannot be configured."
+msgstr "inet デーモンが見つからないので、IKSD を設定できません。"
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid ""
+"Please install an inetd (e.g. openbsd-inetd) and then reconfigure ckermit "
+"with:"
+msgstr ""
+"inetd (openbsd-inetd など) をインストールしてから ckermit を以下のようにして"
+"再設定してください:"
+
+#~ msgid "dpkg-reconfigure ckermit"
+#~ msgstr "dpkg-reconfigure ckermit"
+
+#~ msgid "/home/ftp"
+#~ msgstr "/home/ftp"
+
+#~ msgid ""
+#~ "IKSD can be accessed by any Telnet client. If file transfer is required, "
+#~ "the Telnet client must include Kermit file transfer protocol.  Best "
+#~ "results are obtained when the client implements the Telnet Kermit Option "
+#~ "(as do Kermit 95 for Windows and C-Kermit for Unix) for \"tight coupling"
+#~ "\" of client and server."
+#~ msgstr ""
+#~ "IKSD はあらゆる Telnet クライアントからアクセス可能です。ファイル転送が必"
+#~ "要な場合、Telnet クライアントは Kermit ファイル転送プロトコルを含んでいる"
+#~ "必要があります。最も良い結果が得られるのは、(Windows 用の Kermit 95 と "
+#~ "Unix 用の C-Kermit のように) クライアントが Telnet Kermit オプションを実装"
+#~ "している時です。"
diff --git a/debian/po/pt.po b/debian/po/pt.po
new file mode 100644 (file)
index 0000000..4d89ca3
--- /dev/null
@@ -0,0 +1,106 @@
+# translation of ckermit debconf to Portuguese
+# Copyright (C) 2007 Ricardo Silva
+# This file is distributed under the same license as the ckermit package.
+#
+# Ricardo Silva <ardoric@gmail.com>, 2007.
+# Américo Monteiro <a_monteiro@netcabo.pt>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: ckermit 211-13\n"
+"Report-Msgid-Bugs-To: ckermit@packages.debian.org\n"
+"POT-Creation-Date: 2009-03-14 23:40+0000\n"
+"PO-Revision-Date: 2009-03-09 20:32+0000\n"
+"Last-Translator: Américo Monteiro <a_monteiro@netcabo.pt>\n"
+"Language-Team: Portuguese <traduz@debianpt.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Enable Internet Kermit Service Daemon (IKSD) in inetd.conf?"
+msgstr "Activar o Internet Kermit Service Daemon (IKSD) no inetd.conf?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The Internet Kermit Service Daemon (IKSD) is the C-Kermit program running as "
+"an Internet service, similar to an FTP or Telnet server.  It executes Telnet "
+"protocol just like a Telnet server and it transfers files like an FTP "
+"server.  But unlike an FTP server, IKSD uses the Kermit file transfer "
+"protocol (which is more powerful and flexible) and allows both FTP-like "
+"client/server connections as well as direct keyboard interaction.  Secure "
+"authentication methods and encrypted sessions are available, as well as a "
+"wide range of file transfer and management functions, which can be scripted "
+"to automate arbitrarily complex tasks."
+msgstr ""
+"O Internet Kermit Service Daemon (IKSD) é o programa C-Kermit que corre como "
+"um serviço de Internet, semelhante a um servidor Telnet ou FTP. Executa o "
+"protocolo Telnet tal como um servidor Telnet e transfere ficheiros tal como "
+"um servidor FTP. Mas, ao contrário de um servidor FTP, o IKSD usa o "
+"protocolo de transferência de ficheiros Kermit (que é mais poderoso e "
+"flexível) e permite ligações cliente/servidor tanto ao estilo FTP como com "
+"interacção directa através do teclado. Estão também disponíveis métodos "
+"seguros de autenticação e sessões cifradas, bem como um vasto leque de "
+"funções para a gestão de transferência de ficheiros, que podem ser usadas em "
+"scripts para automatizar tarefas consideradas complexas."
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Enable anonymous IKSD logins?"
+msgstr "Permitir logins anónimos no IKSD?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"IKSD supports anonymous logins (using chroot), similar to anonymous FTP."
+msgstr ""
+"O IKSD suporta logins anónimos (usando chroot), semelhante a FTP anónimo."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Directory for anonymous IKSD logins:"
+msgstr "Directório para logins anónimos no IKSD:"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Enter directory for anonymous IKSD logins. A chroot() will be performed into "
+"this directory on login. This directory will NOT be created."
+msgstr ""
+"Introduza o directório para logins anónimos no IKSD. Será realizada uma "
+"chroot() para esse directório durante o login. Este directório NÃO será "
+"criado."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "The default is /home/ftp (same as wu-ftpd)."
+msgstr "Por predefinição é /home/ftp (o mesmo que no wu-ftpd)."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid "No inet daemon found, so IKSD cannot be configured."
+msgstr ""
+"Nenhum deamon inet encontrado, portanto o IKSD não pode ser configurado."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid ""
+"Please install an inetd (e.g. openbsd-inetd) and then reconfigure ckermit "
+"with:"
+msgstr ""
+"Por favor instale um inetd (p.ex. openbsd-inetd) e depois reconfigure o "
+"ckermit com:"
+
+#~ msgid "dpkg-reconfigure ckermit"
+#~ msgstr "dpkg-reconfigure ckermit"
diff --git a/debian/po/ru.po b/debian/po/ru.po
new file mode 100644 (file)
index 0000000..3bc7d9a
--- /dev/null
@@ -0,0 +1,106 @@
+# translation of ru.po to Russian
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Yuri Kozlov <yuray@komyakino.ru>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: ckermit 211-13\n"
+"Report-Msgid-Bugs-To: ckermit@packages.debian.org\n"
+"POT-Creation-Date: 2009-03-14 23:40+0000\n"
+"PO-Revision-Date: 2009-02-27 20:29+0300\n"
+"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
+"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
+"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Enable Internet Kermit Service Daemon (IKSD) in inetd.conf?"
+msgstr "Включить интернет-службу сервиса Kermit (IKSD) в inetd.conf?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The Internet Kermit Service Daemon (IKSD) is the C-Kermit program running as "
+"an Internet service, similar to an FTP or Telnet server.  It executes Telnet "
+"protocol just like a Telnet server and it transfers files like an FTP "
+"server.  But unlike an FTP server, IKSD uses the Kermit file transfer "
+"protocol (which is more powerful and flexible) and allows both FTP-like "
+"client/server connections as well as direct keyboard interaction.  Secure "
+"authentication methods and encrypted sessions are available, as well as a "
+"wide range of file transfer and management functions, which can be scripted "
+"to automate arbitrarily complex tasks."
+msgstr ""
+"Интернет-служба сервиса Kermit (IKSD) -- это программа C-Kermit, работающая "
+"как интернет-сервис, подобно серверам FTP или Telnet. Она работает по "
+"протоколу Telnet как сервер Telnet и пересылает файлы как сервер FTP. Но в "
+"отличии от сервера FTP, IKSD использует протокол передачи файлов Kermit "
+"(который мощнее и гибче), в котором помимо FTP-подобного клиент/серверного "
+"соединения можно ещё интерактивно переписываться с помощью клавиатуры. "
+"Поддерживается шифрование сеанса и различные методы безопасной "
+"аутентификации, а также большой выбор функций пересылки файлов и управления, "
+"которые можно использовать в сценариях для автоматизации задач произвольной "
+"сложности."
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Enable anonymous IKSD logins?"
+msgstr "Разрешить анонимные подключения к IKSD?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"IKSD supports anonymous logins (using chroot), similar to anonymous FTP."
+msgstr ""
+"IKSD поддерживает анонимные подключения (используется chroot) подобно "
+"анонимному FTP."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Directory for anonymous IKSD logins:"
+msgstr "Каталог, куда попадают при анонимном входе в IKSD:"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Enter directory for anonymous IKSD logins. A chroot() will be performed into "
+"this directory on login. This directory will NOT be created."
+msgstr ""
+"Введите каталог для анонимных подключений к IKSD. При входе будет запущена "
+"функция chroot() в этот каталог. Этот каталог создан НЕ будет."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "The default is /home/ftp (same as wu-ftpd)."
+msgstr "По умолчанию используется /home/ftp (как у wu-ftpd)."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid "No inet daemon found, so IKSD cannot be configured."
+msgstr "Служба inet не найдена, IKSD невозможно настроить."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid ""
+"Please install an inetd (e.g. openbsd-inetd) and then reconfigure ckermit "
+"with:"
+msgstr ""
+"Установите inetd (например, пакет openbsd-inetd) и повторите настройку "
+"ckermit:"
+
+#~ msgid "dpkg-reconfigure ckermit"
+#~ msgstr "dpkg-reconfigure ckermit"
diff --git a/debian/po/sv.po b/debian/po/sv.po
new file mode 100644 (file)
index 0000000..10d89ae
--- /dev/null
@@ -0,0 +1,102 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ckermit 211-13\n"
+"Report-Msgid-Bugs-To: ckermit@packages.debian.org\n"
+"POT-Creation-Date: 2009-03-14 23:40+0000\n"
+"PO-Revision-Date: 2009-03-05 14:00+0100\n"
+"Last-Translator: Martin Bagge <brother@bsnet.se>\n"
+"Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Enable Internet Kermit Service Daemon (IKSD) in inetd.conf?"
+msgstr "Aktivera Internet Kermit Service Daemon (IKSD) i inetd.conf?"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The Internet Kermit Service Daemon (IKSD) is the C-Kermit program running as "
+"an Internet service, similar to an FTP or Telnet server.  It executes Telnet "
+"protocol just like a Telnet server and it transfers files like an FTP "
+"server.  But unlike an FTP server, IKSD uses the Kermit file transfer "
+"protocol (which is more powerful and flexible) and allows both FTP-like "
+"client/server connections as well as direct keyboard interaction.  Secure "
+"authentication methods and encrypted sessions are available, as well as a "
+"wide range of file transfer and management functions, which can be scripted "
+"to automate arbitrarily complex tasks."
+msgstr ""
+"Internet Kermit Service dameon (IKSD) är C-Kermit-programmet som körs som en "
+"Internet-demon liknande FTP eller en Telnet-server. IKSD agerar telnetserver "
+"i enlighet med protokollet och överför filer som en FTP-server. Men istället "
+"för FTP använder IKSD Kermit file transfer protocol (som är mer kraftfullt "
+"och flexibelt) och tillåter både FTP-liknande klient-/server-anslutningar så "
+"väl som direkt tangentbords-interaktion. Säkra autentiseringsmetoder och "
+"krypterade sessioner finns att tillgå utöver en mängd filöverförings och -"
+"hanteringsfunktioner som kan skriptas och för att automatisera oändligt "
+"komplexa uppgifter."
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Enable anonymous IKSD logins?"
+msgstr "Aktivera anonyma IKSD-inloggningar?"
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"IKSD supports anonymous logins (using chroot), similar to anonymous FTP."
+msgstr ""
+"IKSD har stöd för anonyma inloggningar (med chroot), detta liknar anonym FTP."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Directory for anonymous IKSD logins:"
+msgstr "Katalog för anonyma IKSD-inloggningar:"
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Enter directory for anonymous IKSD logins. A chroot() will be performed into "
+"this directory on login. This directory will NOT be created."
+msgstr ""
+"Ange katalogen för anonyma IKSD-inloggningar. En chroot() kommer att "
+"användas i denna katalog vid inloggningen. Katalogen kommer INTE att skapas."
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "The default is /home/ftp (same as wu-ftpd)."
+msgstr "Standardvärdet är /home/ftp (samma som wu-ftpd)."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid "No inet daemon found, so IKSD cannot be configured."
+msgstr ""
+"Tjänstehanteraren inetd kunde inte hittas och därmed kan inte IKSD aktiveras."
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid ""
+"Please install an inetd (e.g. openbsd-inetd) and then reconfigure ckermit "
+"with:"
+msgstr ""
+"Installera en tjänstehanterare (ex. openbsd-inetd) och kör sedan denna guide "
+"för ckermit igen med:"
+
+#~ msgid "dpkg-reconfigure ckermit"
+#~ msgstr "dpkg-reconfigure ckermit"
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
new file mode 100644 (file)
index 0000000..e1a9680
--- /dev/null
@@ -0,0 +1,85 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: ckermit@packages.debian.org\n"
+"POT-Creation-Date: 2009-03-14 23:40+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Enable Internet Kermit Service Daemon (IKSD) in inetd.conf?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid ""
+"The Internet Kermit Service Daemon (IKSD) is the C-Kermit program running as "
+"an Internet service, similar to an FTP or Telnet server.  It executes Telnet "
+"protocol just like a Telnet server and it transfers files like an FTP "
+"server.  But unlike an FTP server, IKSD uses the Kermit file transfer "
+"protocol (which is more powerful and flexible) and allows both FTP-like "
+"client/server connections as well as direct keyboard interaction.  Secure "
+"authentication methods and encrypted sessions are available, as well as a "
+"wide range of file transfer and management functions, which can be scripted "
+"to automate arbitrarily complex tasks."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Enable anonymous IKSD logins?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"IKSD supports anonymous logins (using chroot), similar to anonymous FTP."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "Directory for anonymous IKSD logins:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid ""
+"Enter directory for anonymous IKSD logins. A chroot() will be performed into "
+"this directory on login. This directory will NOT be created."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:3001
+msgid "The default is /home/ftp (same as wu-ftpd)."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid "No inet daemon found, so IKSD cannot be configured."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../templates:4001
+msgid ""
+"Please install an inetd (e.g. openbsd-inetd) and then reconfigure ckermit "
+"with:"
+msgstr ""
diff --git a/debian/postinst b/debian/postinst
new file mode 100644 (file)
index 0000000..cd9bce8
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+anon='off'
+prefix='#<off>#'
+dir='/home/ftp'
+inetdentry='kermit      stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/iksd'
+iksd_args='-A --initfile:/etc/kermit/iksd-anon.conf --dbfile:/var/run/iksd.db --syslog:5'
+
+if [ "$1" = "configure" ]
+then
+    gotinetd=0
+    if [ -x "`which update-inetd 2>/dev/null`" ]; then
+       gotinetd=1
+    fi
+
+    db_get ckermit/iksd || true
+    if [ "$RET" = true ]
+    then
+       if [ $gotinetd -eq 0 ]; then
+           db_fset ckermit/iksd seen false || true
+           db_input critical ckermit/iksd-no-inetd || true
+           db_go || true
+       else
+            prefix=""
+            db_get ckermit/iksd-anon || true
+            if [ "$RET" = true ]
+            then
+               anon="on"
+               db_get ckermit/iksd-anondir || true
+               dir="$RET"
+           fi
+        fi
+    fi
+
+    if [ $gotinetd -eq 1 ]; then
+       iksd_args="$iksd_args --root:$dir --anonymous:$anon"
+       update-inetd --remove "kermit"
+       update-inetd --add "$prefix$inetdentry $iksd_args"
+    fi
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/postrm b/debian/postrm
new file mode 100644 (file)
index 0000000..4cbf6c3
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+remove)
+       [ -e /usr/sbin/update-inetd ] && update-inetd --remove "kermit"
+       [ -e /var/run/iksd ] && rm -f /var/run/iksd.db
+       ;;
+purge)
+    rmdir /etc/kermit >/dev/null 2>&1 || true
+       ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..86269e4
--- /dev/null
@@ -0,0 +1,104 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# debian/rules for ckermit
+# GNU copyright 1997 to 1999 by Joey Hess.
+# modified for ckermit by Ian Beckwith <ianb@debian.org>
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+BUILDDIR=`pwd`/debian/ckermit
+
+CFLAGS = -O2 \
+       -DCK_SYSINI=\\\"/etc/kermit/kermrc\\\"    \
+       -DIKSDCONF=\\\"/etc/kermit/iksd.conf\\\"  \
+       -DCK_INI_B -DCK_SOCKS \
+       -DX509_SUBJECT_ALT_NAME_TO_USER \
+       -DFNFLOAT -DCK_NEWTERM \
+       -DUSE_STRERROR -DCK_NCURSES \
+       -DHAVE_OPENPTY \
+       -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
+       -DOPENSSL_097 -DOPENSSL_098 -DOPENSSL_100
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+else
+       CFLAGS += -O2
+endif
+
+MAKEOPTS=-f makefile DESTDIR=\"$(BUILDDIR)\" BINDIR=/usr/bin MANDIR=/usr/share/man/man1 INFODIR=/usr/share/doc/ckermit KFLAGS='$(CFLAGS)' LNKFLAGS="-lsocks -lutil -Wl,-z,defs -Wl,--as-needed"
+MAKETARGET=linux+krb5+openssl+zlib+shadow+pam
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+
+       touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+       dh_testdir
+
+       $(MAKE) $(MAKEOPTS) $(MAKETARGET)
+
+       touch build-stamp
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       $(MAKE) $(MAKEOPTS) clean
+       rm -f wermit # no longer cleaned by upstream makefile
+       rm -f UNINSTALL
+       dh_clean
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_prep
+       dh_installdirs
+
+       # Add here commands to install the package into debian/ckermit.
+       $(MAKE) $(MAKEOPTS) install
+       # move aside full config file (later linked to by dh_link)
+       mv "$(BUILDDIR)/usr/bin/ckermit.ini" "$(BUILDDIR)/etc/kermit/kermrc.full"
+       # install conf files
+       install -m 0644  -g 0 -o 0 debian/kermrc "$(BUILDDIR)/etc/kermit/"
+       install -m 0644  -g 0 -o 0 debian/iksd.conf "$(BUILDDIR)/etc/kermit/"
+       # link is recreated properly by dh_link
+       rm "$(BUILDDIR)/usr/bin/kermit-sshsub"
+       # duplicated in /usr/share/doc/ckermit/copyright
+       rm "$(BUILDDIR)/usr/share/doc/ckermit/COPYING.TXT"
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs -k ckc211.txt
+       dh_installdocs
+       dh_installdirs
+       dh_installmenu
+       dh_installdebconf
+       dh_installpam --name=kermit
+       dh_installman
+       dh_lintian
+       dh_link
+       dh_strip
+       dh_compress
+       dh_fixperms
+       dh_makeshlibs
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/templates b/debian/templates
new file mode 100644 (file)
index 0000000..b1a888e
--- /dev/null
@@ -0,0 +1,37 @@
+Template: ckermit/iksd
+Type: boolean
+Default: false
+_Description: Enable Internet Kermit Service Daemon (IKSD) in inetd.conf?
+ The Internet Kermit Service Daemon (IKSD) is the C-Kermit program running
+ as an Internet service, similar to an FTP or Telnet server.  It executes
+ Telnet protocol just like a Telnet server and it transfers files like an
+ FTP server.  But unlike an FTP server, IKSD uses the Kermit file transfer
+ protocol (which is more powerful and flexible) and allows both FTP-like
+ client/server connections as well as direct keyboard interaction.  Secure
+ authentication methods and encrypted sessions are available, as well as a
+ wide range of file transfer and management functions, which can be
+ scripted to automate arbitrarily complex tasks.
+
+Template: ckermit/iksd-anon
+Type: boolean
+Default: false
+_Description: Enable anonymous IKSD logins?
+ IKSD supports anonymous logins (using chroot), similar to anonymous FTP.
+
+Template: ckermit/iksd-anondir
+Type: string
+Default: /home/ftp
+_Description: Directory for anonymous IKSD logins:
+ Enter directory for anonymous IKSD logins. A chroot() will be performed
+ into this directory on login. This directory will NOT be created.
+ .
+ The default is /home/ftp (same as wu-ftpd).
+
+Template: ckermit/iksd-no-inetd
+Type: error
+#flag:translate!:3
+_Description: No inet daemon found, so IKSD cannot be configured.
+ Please install an inetd (e.g. openbsd-inetd) and then
+ reconfigure ckermit with:
+ .
+ dpkg-reconfigure ckermit
diff --git a/debian/watch b/debian/watch
new file mode 100644 (file)
index 0000000..b181a57
--- /dev/null
@@ -0,0 +1,6 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# Site         Directory               Pattern                 Version Script
+version=2
+ftp://ftp.columbia.edu/kermit/archives/cku(\d+)\.tar\.gz       debian  uupdate