diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1995-04-16 14:13:48 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1995-04-16 14:13:48 +0000 |
commit | 6e4ab1ef3471919b02cda7916ffc1b40bc414331 (patch) | |
tree | 050587ff3a61b30eba00d4813a2c2a19a40734ae | |
parent | 0e0d6a804239933f10ee0746fd97d09905f92e96 (diff) |
Upgrade.vendor/ncftp/1.9.4
Notes
Notes:
svn path=/vendor/ncftp/dist/; revision=7889
svn path=/vendor/ncftp/1.9.4/; revision=7891; tag=vendor/ncftp/1.9.4
-rw-r--r-- | usr.bin/ncftp/README | 75 | ||||
-rw-r--r-- | usr.bin/ncftp/defaults.h | 2 | ||||
-rw-r--r-- | usr.bin/ncftp/main.c | 41 | ||||
-rw-r--r-- | usr.bin/ncftp/ncftp.1 | 29 | ||||
-rw-r--r-- | usr.bin/ncftp/patchlevel.h | 3 | ||||
-rw-r--r-- | usr.bin/ncftp/v2_Note | 35 |
6 files changed, 50 insertions, 135 deletions
diff --git a/usr.bin/ncftp/README b/usr.bin/ncftp/README index d9c19914dda9..67a66105271f 100644 --- a/usr.bin/ncftp/README +++ b/usr.bin/ncftp/README @@ -1,12 +1,12 @@ +Note: This version is no longer being enhanced. As of this writing, version +2.0 is the officially supported version. Only bug fixes and portability +tweaks will be applied to the 1.9 series. + If you are a novice user, and don't know how to compile things, try contacting your local guru first (get them to do it for you :-). Please understand that I don't have time to walk newbies through the whole installation procedure. -One of these months, I will write a Configure script that does all this for -you. I just don't have time to learn another language (dist-3.0) just to -write the script! Perhaps for 2.0. - 1. READ this entire file. Part A, below, tells what to do if you want to use NcFTP with a command-line editor. Part B tells you how to configure the Makefile to compile the program for your system. Part C tells you @@ -31,14 +31,7 @@ would also like to hear from you if you had a system that wasn't covered in sys.h, so I can add an entry for other users of your system. The latest version of ncftp is available in the directory: - cse.unl.edu:/pub/mgleason -This machine is heavily used by students and faculty alike, so please -do not call during working hours (9AM - 5PM American Central time). In fact, -I have a cron entry that changes all the file permissions to public -unreadable during that period, so you won't be able to download anyway. - -I am grateful to Shari Deiana and the University of Nebraska for making this -possible! + ftp.cs.unl.edu:/pub/ncftp Part A. Installing with a command line editor: @@ -300,62 +293,4 @@ Add these as applicable to the PDEFS line in the Makefile. code, and want to know where in the source the Perror's are coming from. -Part D. Sending me patches: ---------------------------- - -I apologize in advance for problems that my coding style may cause. The code -itself is formatted such that each indent-level is a tab (intended to be -equivalent to 4 spaces), and not spaces nor a combination of tabs and spaces. -The reason for this, besides being more logical to me, is that I use a -Macintosh editor to compose the code and I prefer it's indenting method. -Another problem in my coding-style is that I write C-code intended for ANSI -C compilers. This means that I will use the new-style function declarations -and function prototypes, like: - - - long Foobar(long, long, char *); - long Foobar(long t0, long t1, char *str) - { - } - -as opposed to: - - long Foobar(); - long Foobar(t0, t1, str) - long t0, t1; - char *str; - { - } - -Another thing may annoy you is that I always use function prototypes for any -function I call, including functions that return an int. This is a good -practice that I learned from the Macintosh programming world. - -So if you send me patches, please conform to my coding style so that 'patch' -won't screw up, and also that some continuity will be preserved. - -Before you make your patch, you should be sure that you are using the most -current version of the program. This is especially important if you are -reporting a bug; I may have already fixed it! See the above info to get it -via ftp. Major versions are always posted to comp.sources.misc. Bug reports -are posted to comp.sources.bugs. Patches that need to be posted ASAP are -posted to this group first, so it is advisable that you check this group. - -If you make changes to the code, surround your code in #ifdef/#endif blocks. -Instead of doing things like #ifdef SunOS, use a name that describes the -bug fix or feature, and not your system type, like #ifdef NO_UNISTDH, -or #ifdef GETLINE. That way in case another system has the same problem, -it can be added to sys.h without cluttering up the source code. Then, add -the symbol you used to the end of cmds.c, in the 'CPP Hell' part of the -version() command. You'll see a list of CPP symbols, so just add yours in -a similar fashion, like #ifdef GETLINE/DStrs[nDStrs++] = "GETLINE";/#endif. - -If you don't know how to make a patch, here's how to do it. Things are easy -if you've only changed one file. Then all you need to do pipe the output of -diff -c into a file and send it to me, i.e. "diff -c cmds.c cmds.c.hack >pch." -If you've hacked several files, the way I do it is to keep the originals in -one directory (you did make a copy of everything first didn't you?) and the -revisions in another directory. Then you change directory to the one with the -originals and do "diff -c . ../revisions > ../pch." - --mg (mgleason@cse.unl.edu) diff --git a/usr.bin/ncftp/defaults.h b/usr.bin/ncftp/defaults.h index 5ce57784a43b..18331eafe728 100644 --- a/usr.bin/ncftp/defaults.h +++ b/usr.bin/ncftp/defaults.h @@ -49,7 +49,7 @@ * Port ftp by default. */ #ifndef dPASSIVE -#define dPASSIVE 1 /* Works for most folks... */ +#define dPASSIVE 0 /* Use PORT for more portability... */ #endif #ifndef dVERBOSE /* V_QUIET, V_ERRS, V_TERSE, V_VERBOSE */ diff --git a/usr.bin/ncftp/main.c b/usr.bin/ncftp/main.c index c1b17b810a2c..68d9da7ba006 100644 --- a/usr.bin/ncftp/main.c +++ b/usr.bin/ncftp/main.c @@ -2,7 +2,7 @@ #define _main_c_ -#define FTP_VERSION "1.9.3 (March 5, 1995)" +#define FTP_VERSION "1.9.4 (April 15, 1995)" /* #define BETA 1 */ /* If defined, it prints a little warning message. */ @@ -460,23 +460,32 @@ int getuserinfo(void) else (void) Strncpy(uinfo.homedir, pw->pw_dir); cp = getenv("MAIL"); - if (cp == NULL) - cp = getenv("mail"); - if (cp == NULL) - (void) sprintf(str, "/usr/spool/mail/%s", uinfo.username); - else + if (cp != NULL) { (void) Strncpy(str, cp); + } else { + /* Check a few typical mail directories. + * If we don't find it, too bad. Checking for new mail + * isn't very important anyway. + */ + (void) sprintf(str, "/usr/spool/mail/%s", uinfo.username); + if (access(str, 0) < 0) { + (void) sprintf(str, "/var/mail/%s", uinfo.username); + } + } cp = str; - - /* - * mbox variable may be like MAIL=(28 /usr/mail/me /usr/mail/you), - * so try to find the first mail path. - */ - while ((*cp != '/') && (*cp != 0)) - cp++; - (void) Strncpy(mail_path, cp); - if ((cp = index(mail_path, ' ')) != NULL) - *cp = '\0'; + if (access(cp, 0) < 0) { + mail_path[0] = 0; + } else { + /* + * mbox variable may be like MAIL=(28 /usr/mail/me /usr/mail/you), + * so try to find the first mail path. + */ + while ((*cp != '/') && (*cp != 0)) + cp++; + (void) Strncpy(mail_path, cp); + if ((cp = index(mail_path, ' ')) != NULL) + *cp = '\0'; + } return (0); } else { PERROR("getuserinfo", "Could not get your passwd entry!"); diff --git a/usr.bin/ncftp/ncftp.1 b/usr.bin/ncftp/ncftp.1 index 8eaf7584a409..695bec0164d9 100644 --- a/usr.bin/ncftp/ncftp.1 +++ b/usr.bin/ncftp/ncftp.1 @@ -60,7 +60,7 @@ .fi .in .. -.TH NcFTP 1 "" NCEMRSoft +.TH NcFTP 1 "1.9" NCEMRSoft .\"------- .SH "NAME" .\"------- @@ -281,7 +281,7 @@ machine wuarchive.wustl.edu Then you could put in your username, password, and account if you like: .Ds user anonymous -password \-mgleason@cse.unl.edu +password \-mgleason@ftp.cs.unl.edu account wuarc.does.not.use.accounts .De .PP @@ -306,7 +306,7 @@ I recommend you adhere to this format: .Ds machine wuarchive.wustl.edu user anonymous - password \-mgleason@cse.unl.edu + password \-mgleason@ftp.cs.unl.edu account wuarc.does.not.use.accounts macdef init cd /graphics/gif @@ -1085,7 +1085,7 @@ facility. If you wanted to know the site's IP number, but only knew the name you could do: .Ds -lookup cse.unl.edu +lookup ftp.cs.unl.edu .De .PP This would spit out IP number for that site, in this case ``129.93.1.12''. @@ -1095,7 +1095,7 @@ try: lookup 129.93.1.12 .De .PP -This would spit out the name for that site, in this case ``cse.unl.edu''. +This would spit out the name for that site, in this case ``ftp.cs.unl.edu''. .\"------- .SH "Checking the configuration of the program" .\"------- @@ -1177,10 +1177,10 @@ inserts the host and current directory path in .I "colon-mode" format, such as -``cse.unl.edu:/pub/mgleason'', or ``(not connected)''. +``ftp.cs.unl.edu:/pub/mgleason'', or ``(not connected)''. The .B @c -flag is similar, only it will insert ``cse.unl.edu:/pub/mgleason'' and a +flag is similar, only it will insert ``ftp.cs.unl.edu:/pub/mgleason'' and a newline if connected, otherwise it prints nothing. The default prompt uses this flag to print a two line prompt when connected and a one line prompt @@ -1294,13 +1294,13 @@ This fetches .B CONTENTS and then quits: .Ds -csh> ncftp cse.unl.edu:/pub/mgleason/CONTENTS +csh> ncftp ftp.cs.unl.edu:/pub/mgleason/CONTENTS .De .PP Some others examples, with open options and main program options mixed in: .Ds csh> ncftp \-V quiet \-u ftp.unl.edu -csh> ncftp \-c cse.unl.edu:/pub/mgleason/CONTENTS +csh> ncftp \-c ftp.cs.unl.edu:/pub/mgleason/CONTENTS csh> ncftp \-D 2 \-r \-d 120 \-g 10 \-N ftp.unl.edu .De .\"------- @@ -1326,7 +1326,7 @@ machine sumex\-aim.stanford.edu machine ftp.apple.com .sp # NcFTP will only ask for your password: -machine cse.unl.edu +machine ftp.cs.unl.edu login mgleason .sp # You can supply a login and a password: @@ -1359,13 +1359,16 @@ is copyrighted 1992, 1993 by NCEMRSoft and 1985, 1989 by the Regents of California. .PP Ideas and some code contributed by Phil Dietz, -.I NCEMRSoft -(pdietz@cse.unl.edu). +.IR NCEMRSoft "." Testing and debugging done by Phil and -Kok Hon Yin (hkok@cse.unl.edu). +Kok Hon Yin .PP Extensive man page formatting work by DaviD W. Sanderson (dws@ssec.wisc.edu). +.PP +As of this writing, the most recent version is archived in +/pub/ncftp, on +.IR "ftp.cs.unl.edu" "." .\"------- .SH "BUGS" .\"------- diff --git a/usr.bin/ncftp/patchlevel.h b/usr.bin/ncftp/patchlevel.h index becd3c063574..377ae9c96554 100644 --- a/usr.bin/ncftp/patchlevel.h +++ b/usr.bin/ncftp/patchlevel.h @@ -1,3 +1,6 @@ +v1.9.4 - April 15, 1995. Using PORT by default instead of PASV by default. + Method to get the mail pathname changed. + v1.9.3 - March 5, 1995. Support for NetBSD and DELL added. Linger works with passive mode now. diff --git a/usr.bin/ncftp/v2_Note b/usr.bin/ncftp/v2_Note deleted file mode 100644 index 6900bf29d9c2..000000000000 --- a/usr.bin/ncftp/v2_Note +++ /dev/null @@ -1,35 +0,0 @@ -Versions numbered between 1.5.0 and 1.9.9 are interim releases. No major -features are planned for these; only tweaks and fixes. - -Version 2.0 is much cooler, but I haven't had time to work on it. If -you send me email, I _will_ read it, but it may take me awhile to get to it, -and I may not answer. Please don't be offended. I really regret having -to release code that is such a mess. I should have wrote the code from -scratch, rather than built it upon the original BSD code (which is a mess -itself!). - -I apologize in advance for bugs I fixed in 2.0 but forgot to re-fix -in these interim releases (I think I got'em all, though). - -Here is a list of things that are in the 2.0 code but not this version: - -* Easy-to-read, better organized, commented code. -* Using my own "style guide," so source is coded uniformly. -* Unlimited global macros. These are really nice! They take arguments, - so you can make mini-scripts. The macros can be typed as if they - were commands; no more $macroname crap. -* No-longer using .netrc and it's format. This was necessary for the - global macros anyway, and it allowed me to add some other features, - like host aliases. Old .netrc's won't work. Sorry! -* Improved command line parser, that lets any command use > and |, so - it behaves like a real shell command line (almost). -* Improved 'redir' that works automatically, can reformat listings with - different ls flags, all without refetching it over the network. It - will also facilitate remote globbing... AND remote filename completion! -* Many little things I can't begin to list. - -Keep that in mind if you want to make a feature enhancement. I'm telling -you this now so you don't spend your time programming something that is -already done for the 2.0 release. Also note that patches would -have to be re-coded for 2.0. (The gist is that you should wait until -2.0 is done before doing anything major). |