• Home
  • Raw
  • Download

Lines Matching refs:outs

35 bool tool_create_output_file(struct OutStruct *outs)  in tool_create_output_file()  argument
37 struct GlobalConfig *global = outs->config->global; in tool_create_output_file()
40 if(!outs->filename || !*outs->filename) { in tool_create_output_file()
45 if(outs->is_cd_filename) { in tool_create_output_file()
47 file = fopen(outs->filename, "rb"); in tool_create_output_file()
50 warnf(global, "Refusing to overwrite %s: %s\n", outs->filename, in tool_create_output_file()
57 file = fopen(outs->filename, "wb"); in tool_create_output_file()
59 warnf(global, "Failed to create the file %s: %s\n", outs->filename, in tool_create_output_file()
63 outs->s_isreg = TRUE; in tool_create_output_file()
64 outs->fopened = TRUE; in tool_create_output_file()
65 outs->stream = file; in tool_create_output_file()
66 outs->bytes = 0; in tool_create_output_file()
67 outs->init = 0; in tool_create_output_file()
78 struct OutStruct *outs = userdata; in tool_write_cb() local
79 struct OperationConfig *config = outs->config; in tool_write_cb()
110 if(outs->filename) { in tool_write_cb()
112 if(!*outs->filename) in tool_write_cb()
114 if(!outs->s_isreg) in tool_write_cb()
116 if(outs->fopened && !outs->stream) in tool_write_cb()
118 if(!outs->fopened && outs->stream) in tool_write_cb()
120 if(!outs->fopened && outs->bytes) in tool_write_cb()
125 if(!outs->stream || outs->s_isreg || outs->fopened) in tool_write_cb()
127 if(outs->alloc_filename || outs->is_cd_filename || outs->init) in tool_write_cb()
137 if(!outs->stream && !tool_create_output_file(outs)) in tool_write_cb()
140 rc = fwrite(buffer, sz, nmemb, outs->stream); in tool_write_cb()
144 outs->bytes += (sz * nmemb); in tool_write_cb()
153 int res = fflush(outs->stream); in tool_write_cb()