=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/fetch.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** src/usr.bin/ftp/fetch.c 1997/02/03 01:02:37 1.1 --- src/usr.bin/ftp/fetch.c 1997/02/03 01:05:37 1.2 *************** *** 1,3 **** --- 1,4 ---- + /* $OpenBSD: fetch.c,v 1.2 1997/02/03 01:05:37 millert Exp $ */ /* $NetBSD: fetch.c,v 1.2 1997/02/01 10:45:00 lukem Exp $ */ /*- *************** *** 37,43 **** */ #ifndef lint ! static char rcsid[] = "$NetBSD: fetch.c,v 1.2 1997/02/01 10:45:00 lukem Exp $"; #endif /* not lint */ /* --- 38,44 ---- */ #ifndef lint ! static char rcsid[] = "$OpenBSD: fetch.c,v 1.2 1997/02/03 01:05:37 millert Exp $"; #endif /* not lint */ /* *************** *** 260,266 **** oldintr = NULL; if (setjmp(httpabort)) { if (oldintr) ! (void) signal(SIGINT, oldintr); goto cleanup_http_get; } oldintr = signal(SIGINT, aborthttp); --- 261,267 ---- oldintr = NULL; if (setjmp(httpabort)) { if (oldintr) ! (void)signal(SIGINT, oldintr); goto cleanup_http_get; } oldintr = signal(SIGINT, aborthttp); *************** *** 283,299 **** } if (hash && !progress) { while (bytes >= hashbytes) { ! (void) putchar('#'); hashbytes += mark; } ! (void) fflush(stdout); } } if (hash && !progress && bytes > 0) { if (bytes < mark) ! (void) putchar('#'); ! (void) putchar('\n'); ! (void) fflush(stdout); } if (len != 0) { warn("Reading from socket"); --- 284,300 ---- } if (hash && !progress) { while (bytes >= hashbytes) { ! (void)putchar('#'); hashbytes += mark; } ! (void)fflush(stdout); } } if (hash && !progress && bytes > 0) { if (bytes < mark) ! (void)putchar('#'); ! (void)putchar('\n'); ! (void)fflush(stdout); } if (len != 0) { warn("Reading from socket"); *************** *** 301,314 **** } progressmeter(1); if (verbose) ! printf("Successfully retrieved file.\n"); ! (void) signal(SIGINT, oldintr); close(s); close(out); if (proxy) free(proxy); ! return(0); improper: warnx("improper response from %s", host); --- 302,315 ---- } progressmeter(1); if (verbose) ! puts("Successfully retrieved file."); ! (void)signal(SIGINT, oldintr); close(s); close(out); if (proxy) free(proxy); ! return (0); improper: warnx("improper response from %s", host); *************** *** 317,323 **** close(s); if (proxy) free(proxy); ! return(-1); } /* --- 318,324 ---- close(s); if (proxy) free(proxy); ! return (-1); } /* *************** *** 328,335 **** { alarmtimer(0); ! printf("\nhttp fetch aborted\n"); ! (void) fflush(stdout); longjmp(httpabort, 1); } --- 329,336 ---- { alarmtimer(0); ! puts("\nhttp fetch aborted"); ! (void)fflush(stdout); longjmp(httpabort, 1); } *************** *** 338,344 **** * files of the form "host:path", "ftp://host/path" using the * ftp protocol, and files of the form "http://host/path" using * the http protocol. ! * If path has a trailing "/", then return(-1); * the path will be cd-ed into and the connection remains open, * and the function will return -1 (to indicate the connection * is alive). --- 339,345 ---- * files of the form "host:path", "ftp://host/path" using the * ftp protocol, and files of the form "http://host/path" using * the http protocol. ! * If path has a trailing "/", then return (-1); * the path will be cd-ed into and the connection remains open, * and the function will return -1 (to indicate the connection * is alive). *************** *** 362,371 **** if (setjmp(toplevel)) { if (connected) disconnect(0, NULL); ! return(argpos + 1); } ! (void) signal(SIGINT, intr); ! (void) signal(SIGPIPE, lostpeer); /* * Loop through as long as there's files to fetch. --- 363,372 ---- if (setjmp(toplevel)) { if (connected) disconnect(0, NULL); ! return (argpos + 1); } ! (void)signal(SIGINT, intr); ! (void)signal(SIGPIPE, lostpeer); /* * Loop through as long as there's files to fetch.