=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/ftp_var.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- src/usr.bin/ftp/ftp_var.h 1996/11/09 19:59:35 1.5 +++ src/usr.bin/ftp/ftp_var.h 1997/02/03 01:02:40 1.6 @@ -1,5 +1,4 @@ -/* $OpenBSD: ftp_var.h,v 1.5 1996/11/09 19:59:35 kstailey Exp $ */ -/* $NetBSD: ftp_var.h,v 1.7 1995/09/15 00:32:35 pk Exp $ */ +/* $NetBSD: ftp_var.h,v 1.13 1997/02/01 10:45:05 lukem Exp $ */ /* * Copyright (c) 1985, 1989, 1993, 1994 @@ -42,9 +41,22 @@ #include #include +#include +#ifndef SMALLFTP +#include +#endif /* !SMALLFTP */ + #include "extern.h" +#define HASHBYTES 1024 +#define FTPBUFLEN MAXPATHLEN + 200 + +#define STALLTIME 5 /* # of seconds of no xfer before "stalling" */ + +#define FTP_PORT 21 /* default if getservbyname("ftp/tcp") fails */ +#define HTTP_PORT 80 /* default if getservbyname("http/tcp") fails */ + /* * Options and other state info. */ @@ -56,6 +68,7 @@ int connected; /* connected to server */ int fromatty; /* input is from a terminal */ int interactive; /* interactively prompt on m* cmds */ +int confirmrest; /* confirm rest of current m* cmd */ int debug; /* debugging level */ int bell; /* ring bell on cmd completion */ int doglob; /* glob local file names */ @@ -67,6 +80,8 @@ 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 preserve; /* preserve modification time on files */ +int progress; /* display transfer progress bar */ 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 */ @@ -87,24 +102,38 @@ int mode; /* file transfer mode */ char bytename[32]; /* local byte size in ascii */ int bytesize; /* local byte size in binary */ -int anonftp; /* force an anonftp login */ -int retry_connect; /* retry connect if failed */ +int anonftp; /* automatic anonymous login */ +int dirchange; /* remote directory changed by cd command */ +int ttywidth; /* width of tty */ +#ifndef SMALLFTP +int editing; /* command line editing enabled */ +EditLine *el; /* editline(3) status structure */ +History *hist; /* editline(3) history structure */ +char *cursor_pos; /* cursor position we're looking for */ +int cursor_argc; /* location of cursor in margv */ +int cursor_argo; /* offset of cursor in margv[cursor_argc] */ +#endif /* !SMALLFTP */ + +off_t bytes; /* current # of bytes read */ +off_t filesize; /* size of file being transferred */ +char *direction; /* direction transfer is occurring */ + 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 */ +int ftpport; /* port number to use for ftp connections */ +int httpport; /* port number to use for http connections */ -struct servent *sp; /* service spec for tcp/ftp */ - jmp_buf toplevel; /* non-local goto stuff for cmd scanner */ -char line[200]; /* input line buffer */ +char line[FTPBUFLEN]; /* input line buffer */ char *stringbase; /* current scan point in line buffer */ -char argbuf[200]; /* argument storage buffer */ +char argbuf[FTPBUFLEN]; /* argument storage buffer */ char *argbase; /* current storage point in arg buffer */ +StringList *marg_sl; /* stringlist containing margv */ int margc; /* count of arguments on input line */ -char **margv; /* args parsed from input line */ -int margvlen; /* how large margv is currently */ +#define margv (marg_sl->sl_str) /* args parsed from input line */ int cpend; /* flag: if != 0, then pending server reply */ int mflag; /* flag: if != 0, then active multi command */ @@ -116,9 +145,12 @@ struct cmd { char *c_name; /* name of command */ char *c_help; /* help string */ - char c_bell; /* give bell when command completes */ - char c_conn; /* must be connected to use command */ - char c_proxy; /* proxy server may execute */ + char c_bell; /* give bell when command completes */ + char c_conn; /* must be connected to use command */ + char c_proxy; /* proxy server may execute */ +#ifndef SMALLFTP + char *c_complete; /* context sensitive completion list */ +#endif /* !SMALLFTP */ void (*c_handler) __P((int, char **)); /* function to call */ };