Lines Matching defs:of
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer
15 * notice, this list of conditions and the following disclaimer in the
17 * 3. The name of the author may not be used to endorse or promote products
65 static char *i_filename; /* name of input file */
72 static char *o_filename; /* name of output file */
190 struct timeval start; /* start of transfer */
191 struct timeval last; /* time of last update */
192 struct timeval last2; /* time of previous last update */
193 off_t size; /* size of file per HTTP hdr */
200 * Format a number of seconds as either XXdYYh, XXhYYm, XXmYYs, or XXs
305 setproctitle("%s [%d%% of %s]", xs->name,
308 fprintf(stderr, "%3d%% of %s",
431 FILE *f, *of;
441 f = of = NULL;
475 /* for both of http and https */
546 * first, but I know of at least one HTTP server that only
548 * leaves it out of replies to HEAD requests. Also, in the
553 * file was a truncated copy of the remote file; we can drop
611 /* symlink instead of copy */
621 warnx("%s: size of remote file is not known", URL);
634 of = stdout;
649 fclose(of);
650 of = NULL;
664 if ((of = fopen(path, "r+")) == NULL) {
669 if (fstat(fileno(of), &nsb) == -1) {
678 fclose(of);
679 of = NULL;
685 if (of != NULL && fseeko(of, url->offset, SEEK_SET) != 0) {
687 fclose(of);
688 of = NULL;
697 if (of == NULL) {
734 of = fopen(tmppath, "w");
739 if (of == NULL)
740 of = fopen(path, "w");
741 if (of == NULL) {
779 if ((wr = fwrite(ptr, 1, readcnt, of)) < readcnt) {
780 if (ferror(of) && errno == EINTR && !sigint)
781 clearerr(of);
800 /* set mtime of local file */
801 if (!n_flag && us.mtime && !o_stdout && of != NULL &&
805 fflush(of);
826 /* check the status of our files */
829 if (ferror(of))
831 if (ferror(f) || ferror(of))
851 * expect, assume the worst (i.e. we didn't get all of it)
866 if (of && of != stdout && !R_flag && !r_flag)
877 if (of && of != stdout)
878 fclose(of);