SCCS-vsn: usr.bin/ftp/ftp.c 5.21
-static char sccsid[] = "@(#)ftp.c 5.20 (Berkeley) %G%";
+static char sccsid[] = "@(#)ftp.c 5.21 (Berkeley) %G%";
#endif /* not lint */
#include "ftp_var.h"
#endif /* not lint */
#include "ftp_var.h"
(void) fclose(dout);
(void) getreply(0);
(void) signal(SIGINT, oldintr);
(void) fclose(dout);
(void) getreply(0);
(void) signal(SIGINT, oldintr);
- if (bytes > 0 && verbose)
ptransfer("sent", bytes, &start, &stop, local, remote);
return;
abort:
ptransfer("sent", bytes, &start, &stop, local, remote);
return;
abort:
code = -1;
if (closefunc != NULL && fin != NULL)
(*closefunc)(fin);
code = -1;
if (closefunc != NULL && fin != NULL)
(*closefunc)(fin);
- if (bytes > 0 && verbose)
ptransfer("sent", bytes, &start, &stop, local, remote);
}
ptransfer("sent", bytes, &start, &stop, local, remote);
}
(void) gettimeofday(&stop, (struct timezone *)0);
(void) fclose(din);
(void) getreply(0);
(void) gettimeofday(&stop, (struct timezone *)0);
(void) fclose(din);
(void) getreply(0);
- if (bytes > 0 && verbose)
ptransfer("received", bytes, &start, &stop, local, remote);
if (oldtype) {
if (!debug)
ptransfer("received", bytes, &start, &stop, local, remote);
if (oldtype) {
if (!debug)
(*closefunc)(fout);
if (din)
(void) fclose(din);
(*closefunc)(fout);
if (din)
(void) fclose(din);
- if (bytes > 0 && verbose)
ptransfer("received", bytes, &start, &stop, local, remote);
(void) signal(SIGINT,oldintr);
}
ptransfer("received", bytes, &start, &stop, local, remote);
(void) signal(SIGINT,oldintr);
}
struct timeval td;
float s, bs;
struct timeval td;
float s, bs;
- tvsub(&td, t1, t0);
- s = td.tv_sec + (td.tv_usec / 1000000.);
+ if (verbose) {
+ tvsub(&td, t1, t0);
+ s = td.tv_sec + (td.tv_usec / 1000000.);
#define nz(x) ((x) == 0 ? 1 : (x))
#define nz(x) ((x) == 0 ? 1 : (x))
- bs = bytes / nz(s);
- if (local && *local != '-')
- printf("local: %s ", local);
- if (remote)
- printf("remote: %s\n", remote);
- printf("%ld bytes %s in %.2g seconds (%.2g Kbytes/s)\n",
- bytes, direction, s, bs / 1024.);
+ bs = bytes / nz(s);
+ printf("%ld bytes %s in %.2g seconds (%.2g Kbytes/s)\n",
+ bytes, direction, s, bs / 1024.);
+ } else {
+ if (local && *local != '-')
+ printf("local: %s ", local);
+ if (remote)
+ printf("remote: %s\n", remote);
+ }