home *** CD-ROM | disk | FTP | other *** search
Wrap
Newsgroups: comp.sources.misc From: mgleason@cse.unl.edu (Mike Gleason) Subject: v40i081: ncftp - Alternative User Interface for FTP, v1.6, Part06/06 Message-ID: <1993Nov2.232510.6623@sparky.sterling.com> X-Md4-Signature: d12a29156f3bfb1ae9206ee269e30dc6 Keywords: ncftp Sender: kent@sparky.sterling.com (Kent Landfield) Organization: NCEMRSoft Date: Tue, 2 Nov 1993 23:25:10 GMT Approved: kent@sparky.sterling.com Submitted-by: mgleason@cse.unl.edu (Mike Gleason) Posting-number: Volume 40, Issue 81 Archive-name: ncftp/part06 Environment: UNIX, ANSI-C, !SVR4 Supersedes: ncftp: Volume 39, Issue 53-57 #! /bin/sh # This is a shell archive. Remove anything before this line, then feed it # into a shell via "sh file" or similar. To overwrite existing files, # type "sh file -c". # Contents: copyright.h ftprc.h main.h open.h set.h # Wrapped by kent@sparky on Mon Nov 1 16:19:18 1993 PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH echo If this archive is complete, you will see the following message: echo ' "shar: End of archive 6 (of 6)."' if test -f 'copyright.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'copyright.h'\" else echo shar: Extracting \"'copyright.h'\" \(1048 characters\) sed "s/^X//" >'copyright.h' <<'END_OF_FILE' X/* Copyright.h */ X X/* $RCSfile: copyright.h,v $ X * $Revision: 14020.12 $ X * $Date: 93/06/02 13:43:03 $ X */ X X/* X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED X * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF X * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X * X * Copyright (c) 1992, 1993 Mike Gleason, NCEMRSoft. X * Copyright (c) 1985, 1989 Regents of the University of California. X * All rights reserved. X * X * Redistribution and use in source and binary forms are permitted provided X * that: (1) source distributions retain this entire copyright notice and X * comment, and (2) distributions may not be sold for profit on physicaical X * media such as disks, tapes, and CD-ROMS, without expressed written X * permission. X */ X X#ifdef _main_c_ X#ifndef lint Xstatic char copyright[] = "@(#) Copyright (c) 1992, 1993 by NCEMRSoft and Copyright (c) 1985, 1989 Regents of the University of California.\n All rights reserved.\n"; X#endif /* not lint */ X#endif /* _main_c_ */ X X/* eof copyright.h */ END_OF_FILE if test 1048 -ne `wc -c <'copyright.h'`; then echo shar: \"'copyright.h'\" unpacked with wrong size! fi # end of 'copyright.h' fi if test -f 'ftprc.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'ftprc.h'\" else echo shar: Extracting \"'ftprc.h'\" \(931 characters\) sed "s/^X//" >'ftprc.h' <<'END_OF_FILE' X/* ftprc.h */ X X#ifndef _ftprc_h_ X#define _ftprc_h_ X X/* $RCSfile: ftprc.h,v $ X * $Revision: 14020.11 $ X * $Date: 93/05/21 05:45:31 $ X */ X X#define NETRC "netrc" X#define FTPRC "ncftprc" X X#define RC_DELIM " \n\t," X Xtypedef struct site *siteptr; Xtypedef struct site { X char *name; /* name (or IP address) of site */ X siteptr next; X} site; X Xtypedef struct recentsite { X char *name; /* name (or IP address) of site */ X char *dir; /* directory we were in last time we called. */ X time_t lastcall; /* when this site was called last. */ X} recentsite; X Xint thrash_rc(void); Xvoid AddNewSitePtr(char *word); Xint ruserpass2(char *host, char **user, char **pass, char **acct); Xvoid GetFullSiteName(char *host, char *lastdir); Xvoid ReadRecentSitesFile(void); Xvoid WriteRecentSitesFile(void); Xvoid AddRecentSite(char *host, char *lastdir); Xvoid UpdateRecentSitesList(char *host, char *lastdir); Xvoid PrintSiteList(void); X X#endif X/* eof */ END_OF_FILE if test 931 -ne `wc -c <'ftprc.h'`; then echo shar: \"'ftprc.h'\" unpacked with wrong size! fi # end of 'ftprc.h' fi if test -f 'main.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'main.h'\" else echo shar: Extracting \"'main.h'\" \(980 characters\) sed "s/^X//" >'main.h' <<'END_OF_FILE' X/* main.h */ X X#ifndef _main_h_ X#define _main_h_ X X/* $RCSfile: main.h,v $ X * $Revision: 14020.12 $ X * $Date: 93/05/21 05:45:33 $ X */ X Xstruct userinfo { X str32 username; X string homedir; X string shell; X string hostname; X int uid; X}; X Xvoid intr SIG_PARAMS; Xint getuserinfo(void); Xint init_arrays(void); Xvoid init_transfer_buffer(void); Xvoid init_prompt(void); Xvoid lostpeer SIG_PARAMS; Xvoid cmdscanner(int top); Xchar *strprompt(void); Xvoid makeargv(void); Xchar *slurpstring(void); Xint help(int argc, char **argv); Xvoid trim_log(void); Xint CheckNewMail(void); X X#ifdef CURSES X void tcap_put(char *cap); X void termcap_init(void); X int termcap_get(char **dest, char *attr); X# ifndef TERMH /* <term.h> would take care of this. */ X# ifdef NO_CONST X extern char *tgetstr(char *, char **); X# else X extern char *tgetstr(const char *, char **); X# endif X# endif /* TERMH */ X#endif /* CURSES */ X X/* Should be in a 'tips.h,' but... */ Xvoid PrintTip(void); X X#endif /* _main_h_ */ X END_OF_FILE if test 980 -ne `wc -c <'main.h'`; then echo shar: \"'main.h'\" unpacked with wrong size! fi # end of 'main.h' fi if test -f 'open.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'open.h'\" else echo shar: Extracting \"'open.h'\" \(1178 characters\) sed "s/^X//" >'open.h' <<'END_OF_FILE' X/* open.h */ X X#ifndef _open_h_ X#define _open_h_ 1 X X/* Variables for Open() that can be changed from the command line. */ Xtypedef struct OpenOptions { X int openmode; X int ignore_rc; X unsigned int port; X int redial_delay; X int max_dials; X int ftpcat; X Hostname hostname; X longstring cdpath; X longstring colonmodepath; X} OpenOptions; X X/* Open modes. */ X#define openImplicitAnon 1 X#define openImplicitUser 4 X#define openExplicitAnon 3 X#define openExplicitUser 2 X X#define ISUSEROPEN(a) ((a==openImplicitUser)||(a==openExplicitUser)) X#define ISANONOPEN(a) (!ISUSEROPEN(a)) X#define ISEXPLICITOPEN(a) ((a==openExplicitAnon)||(a==openExplicitUser)) X#define ISIMPLICITOPEN(a) (!ISEXPLICITOPEN(a)) X X/* ftpcat modes. */ X#define NO_FTPCAT 0 X#define FTPCAT 1 X#define FTPMORE 2 X X/* Protos: */ Xvoid InitOpenOptions(OpenOptions *openopt); Xint GetOpenOptions(int argc, char **argv, OpenOptions *openopt); Xint CheckForColonMode(OpenOptions *openopt, int *login_verbosity); Xint HookupToRemote(OpenOptions *openopt); Xvoid CheckRemoteSystemType(int); Xvoid ColonMode(OpenOptions *openopt); Xint Open(OpenOptions *openopt); Xint cmdOpen(int argc, char **argv); X X#endif /* _open_h_ */ END_OF_FILE if test 1178 -ne `wc -c <'open.h'`; then echo shar: \"'open.h'\" unpacked with wrong size! fi # end of 'open.h' fi if test -f 'set.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'set.h'\" else echo shar: Extracting \"'set.h'\" \(1029 characters\) sed "s/^X//" >'set.h' <<'END_OF_FILE' X/* Set.h */ X X#ifndef _set_h_ X#define _set_h_ X X/* $RCSfile: set.h,v $ X * $Revision: 14020.11 $ X * $Date: 93/06/26 06:21:32 $ X */ X X/* Variable types. */ X#define INT 1 X#define LONG 2 X#define STR 3 X#define BOOL 4 X Xtypedef void (*setvarproc)(char *, int); Xstruct var { X char *name; X short nmlen; X short type; X short conn_required; X void *var; X setvarproc proc; X}; X X#define VARENTRY(n,t,c,v,p) { (n), (short)(sizeof(n) - 1), (t), (c), (v), (setvarproc)(p) } X#define NVARS ((int) (sizeof(vars)/sizeof(struct var))) X Xvoid set_prompt(char *new, int unset); Xvoid set_log(char *fname, int unset); Xvoid set_ldir(char *ldir, int unset); X#ifdef GATEWAY Xvoid set_gateway(char *, int); Xvoid set_gatelogin(char *, int); X#endif Xvoid set_pager(char *new, int unset); Xvoid set_verbose(char *new, int unset); Xvoid set_type(char *newtype, int unset); Xstruct var *match_var(char *varname); Xvoid show_var(struct var *v); Xvoid show(char *varname); Xint do_show(int argc, char **argv); Xint set(int argc, char **argv); X X#endif /* _set_h_ */ END_OF_FILE if test 1029 -ne `wc -c <'set.h'`; then echo shar: \"'set.h'\" unpacked with wrong size! fi # end of 'set.h' fi echo shar: End of archive 6 \(of 6\). cp /dev/null ark6isdone MISSING="" for I in 1 2 3 4 5 6 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 6 archives. rm -f ark[1-9]isdone else echo You still must unpack the following archives: echo " " ${MISSING} fi exit 0 exit 0 # Just in case...