Lines Matching refs:outs
458 struct OutStruct *outs = &per->outs; in post_per_transfer() local
504 if(!result && config->xattr && outs->fopened && outs->stream) { in post_per_transfer()
505 rc = fwrite_xattr(curl, per->url, fileno(outs->stream)); in post_per_transfer()
508 outs->filename, strerror(errno)); in post_per_transfer()
511 if(!result && !outs->stream && !outs->bytes) { in post_per_transfer()
519 if(!cond_unmet && !tool_create_output_file(outs, config)) in post_per_transfer()
523 if(!outs->s_isreg && outs->stream) { in post_per_transfer()
525 rc = fflush(outs->stream); in post_per_transfer()
535 if(outs->utf8seq[0]) in post_per_transfer()
536 memset(outs->utf8seq, 0, sizeof(outs->utf8seq)); in post_per_transfer()
671 if(outs->bytes && outs->filename && outs->stream) { in post_per_transfer()
676 outs->bytes); in post_per_transfer()
677 fflush(outs->stream); in post_per_transfer()
680 if(ftruncate(fileno(outs->stream), outs->init)) { in post_per_transfer()
688 rc = fseek(outs->stream, 0, SEEK_END); in post_per_transfer()
694 rc = fseek(outs->stream, (long)outs->init, SEEK_SET); in post_per_transfer()
700 outs->bytes = 0; /* clear for next round */ in post_per_transfer()
717 if(outs->fopened && outs->stream) { in post_per_transfer()
718 rc = fclose(outs->stream); in post_per_transfer()
726 if(!stat(outs->filename, &st) && in post_per_transfer()
728 if(!unlink(outs->filename)) in post_per_transfer()
729 notef(global, "Removed output file: %s", outs->filename); in post_per_transfer()
731 warnf(global, "Failed removing: %s", outs->filename); in post_per_transfer()
735 outs->filename); in post_per_transfer()
740 if(!result && config->remote_time && outs->s_isreg && outs->filename) { in post_per_transfer()
744 setfiletime(filetime, outs->filename, global); in post_per_transfer()
765 if(outs->alloc_filename) in post_per_transfer()
766 free(outs->filename); in post_per_transfer()
1923 struct OutStruct *outs; in single_transfer() local
2091 outs = &per->outs; in single_transfer()
2098 outs->stream = stdout; in single_transfer()
2192 DEBUGASSERT(!outs->filename); in single_transfer()
2223 outs->fopened = TRUE; in single_transfer()
2224 outs->stream = file; in single_transfer()
2225 outs->init = config->resume_from; in single_transfer()
2228 outs->stream = NULL; /* open when needed */ in single_transfer()
2230 outs->filename = per->outfile; in single_transfer()
2231 outs->s_isreg = TRUE; in single_transfer()
2283 if(output_expected(per->url, per->uploadfile) && outs->stream && in single_transfer()
2284 isatty(fileno(outs->stream))) in single_transfer()
2318 hdrcbdata->outs = outs; in single_transfer()