prettyness police
[unix-history] / usr / src / usr.bin / ftp / ftp_var.h
index 10970ac..d55d7e0 100644 (file)
@@ -1,9 +1,21 @@
-/*     ftp_var.h       4.6     83/07/26        */
+/*
+ * Copyright (c) 1985, 1989, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * %sccs.include.redist.c%
+ *
+ *     @(#)ftp_var.h   8.2 (Berkeley) %G%
+ */
 
 /*
  * FTP global variables.
  */
 
 
 /*
  * FTP global variables.
  */
 
+#include <sys/param.h>
+#include <setjmp.h>
+
+#include "extern.h"
+
 /*
  * Options and other state info.
  */
 /*
  * Options and other state info.
  */
@@ -18,9 +30,24 @@ int  debug;                  /* debugging level */
 int    bell;                   /* ring bell on cmd completion */
 int    doglob;                 /* glob local file names */
 int    autologin;              /* establish user account on connection */
 int    bell;                   /* ring bell on cmd completion */
 int    doglob;                 /* glob local file names */
 int    autologin;              /* establish user account on connection */
-
+int    proxy;                  /* proxy server connection active */
+int    proxflag;               /* proxy connection exists */
+int    sunique;                /* store files on server with unique name */
+int    runique;                /* store local files with unique name */
+int    mcase;                  /* map upper to lower case for mget names */
+int    ntflag;                 /* use ntin ntout tables for name translation */
+int    mapflag;                /* use mapin mapout templates on file names */
+int    code;                   /* return/reply code for ftp command */
+int    crflag;                 /* if 1, strip car. rets. on ascii gets */
+char   pasv[64];               /* passive port for proxy data connection */
+char   *altarg;                /* argv[1] with no shell-like preprocessing  */
+char   ntin[17];               /* input translation table */
+char   ntout[17];              /* output translation table */
+char   mapin[MAXPATHLEN];      /* input map template */
+char   mapout[MAXPATHLEN];     /* output map template */
 char   typename[32];           /* name of file transfer type */
 char   typename[32];           /* name of file transfer type */
-int    type;                   /* file transfer type */
+int    type;                   /* requested file transfer type */
+int    curtype;                /* current file transfer type */
 char   structname[32];         /* name of file transfer structure */
 int    stru;                   /* file transfer structure */
 char   formname[32];           /* name of file transfer format */
 char   structname[32];         /* name of file transfer structure */
 int    stru;                   /* file transfer structure */
 char   formname[32];           /* name of file transfer format */
@@ -31,10 +58,11 @@ char        bytename[32];           /* local byte size in ascii */
 int    bytesize;               /* local byte size in binary */
 
 char   *hostname;              /* name of host connected to */
 int    bytesize;               /* local byte size in binary */
 
 char   *hostname;              /* name of host connected to */
+int    unix_server;            /* server is unix, can use binary for ascii */
+int    unix_proxy;             /* proxy is unix, can use binary for ascii */
 
 struct servent *sp;            /* service spec for tcp/ftp */
 
 
 struct servent *sp;            /* service spec for tcp/ftp */
 
-#include <setjmp.h>
 jmp_buf        toplevel;               /* non-local goto stuff for cmd scanner */
 
 char   line[200];              /* input line buffer */
 jmp_buf        toplevel;               /* non-local goto stuff for cmd scanner */
 
 char   line[200];              /* input line buffer */
@@ -43,6 +71,8 @@ char  argbuf[200];            /* argument storage buffer */
 char   *argbase;               /* current storage point in arg buffer */
 int    margc;                  /* count of arguments on input line */
 char   *margv[20];             /* args parsed from input line */
 char   *argbase;               /* current storage point in arg buffer */
 int    margc;                  /* count of arguments on input line */
 char   *margv[20];             /* args parsed from input line */
+int     cpend;                  /* flag: if != 0, then pending server reply */
+int    mflag;                  /* flag: if != 0, then active multi command */
 
 int    options;                /* used during socket creation */
 
 
 int    options;                /* used during socket creation */
 
@@ -54,11 +84,16 @@ struct cmd {
        char    *c_help;        /* help string */
        char    c_bell;         /* give bell when command completes */
        char    c_conn;         /* must be connected to use command */
        char    *c_help;        /* help string */
        char    c_bell;         /* give bell when command completes */
        char    c_conn;         /* must be connected to use command */
-       int     (*c_handler)(); /* function to call */
+       char    c_proxy;        /* proxy server may execute */
+       void    (*c_handler) __P((int, char **)); /* function to call */
+};
+
+struct macel {
+       char mac_name[9];       /* macro name */
+       char *mac_start;        /* start of macro in macbuf */
+       char *mac_end;          /* end of macro in macbuf */
 };
 
 };
 
-extern char *tail();
-extern char *index();
-extern char *rindex();
-extern char *remglob();
-extern int errno;
+int macnum;                    /* number of defined macros */
+struct macel macros[16];
+char macbuf[4096];