[BACK]Return to main.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.bin / ftp

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/usr.bin/ftp/main.c between version 1.22 and 1.23

version 1.22, 1997/06/10 07:04:43 version 1.23, 1997/07/20 09:45:58
Line 33 
Line 33 
  * SUCH DAMAGE.   * SUCH DAMAGE.
  */   */
   
   #include <sys/cdefs.h>
 #ifndef lint  #ifndef lint
 static char copyright[] =  __COPYRIGHT("@(#) Copyright (c) 1985, 1989, 1993, 1994\n\
 "@(#) Copyright (c) 1985, 1989, 1993, 1994\n\          The Regents of the University of California.  All rights reserved.\n");
         The Regents of the University of California.  All rights reserved.\n";  
 #endif /* not lint */  #endif /* not lint */
   
 #ifndef lint  #ifndef lint
 #if 0  #if 0
 static char sccsid[] = "@(#)main.c      8.6 (Berkeley) 10/9/94";  static char sccsid[] = "@(#)main.c      8.6 (Berkeley) 10/9/94";
 #else  #else
 static char rcsid[] = "$NetBSD$";  __RCSID("$NetBSD$");
 #endif  #endif
 #endif /* not lint */  #endif /* not lint */
   
Line 63  static char rcsid[] = "$NetBSD$";
Line 63  static char rcsid[] = "$NetBSD$";
   
 #include "ftp_var.h"  #include "ftp_var.h"
   
   int main __P((int, char **));
   
 int  int
 main(argc, argv)  main(argc, argv)
         int argc;          int argc;
         char *argv[];          char *argv[];
 {  {
         struct servent *sp;          struct servent *sp;
         int ch, top, port, rval;          int ch, top, rval;
           long port;
         struct passwd *pw = NULL;          struct passwd *pw = NULL;
         char *cp, homedir[MAXPATHLEN];          char *cp, homedir[MAXPATHLEN];
         int dumbterm;          int dumbterm;
Line 154  main(argc, argv)
Line 157  main(argc, argv)
                         break;                          break;
   
                 case 'P':                  case 'P':
                         port = atoi(optarg);                          port = strtol(optarg, &cp, 10);
                         if (port <= 0)                          if (port < 1 || port > 0xffff || *cp != '\0')
                                 warnx("bad port number: %s (ignored)", optarg);                                  warnx("bad port number: %s (ignored)", optarg);
                         else                          else
                                 ftpport = htons(port);                                  ftpport = htons(port);
Line 201  main(argc, argv)
Line 204  main(argc, argv)
         setttywidth(0);          setttywidth(0);
         (void)signal(SIGWINCH, setttywidth);          (void)signal(SIGWINCH, setttywidth);
   
   #ifdef __GNUC__                 /* XXX: to shut up gcc warnings */
           (void)&argc;
           (void)&argv;
   #endif
   
         if (argc > 0) {          if (argc > 0) {
                 if (strchr(argv[0], ':') != NULL) {                  if (strchr(argv[0], ':') != NULL) {
                         anonftp = 1;    /* Handle "automatic" transfers. */                          anonftp = 1;    /* Handle "automatic" transfers. */

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

CVSweb <webmaster@jp.NetBSD.org>