Loading src/tool_cb_dbg.c +2 −2 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type, { struct OperationConfig *operation = userdata; struct GlobalConfig *config = operation->global; FILE *output = operation->errors; FILE *output = config->errors; const char *text; struct timeval tv; struct tm *now; Loading Loading @@ -77,7 +77,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type, config->trace_stream = stdout; else if(curlx_strequal("%", config->trace_dump)) /* Ok, this is somewhat hackish but we do it undocumented for now */ config->trace_stream = operation->errors; /* aka stderr */ config->trace_stream = config->errors; /* aka stderr */ else { config->trace_stream = fopen(config->trace_dump, "w"); config->trace_fopened = TRUE; Loading src/tool_cb_prg.c +1 −1 Original line number Diff line number Diff line Loading @@ -146,5 +146,5 @@ void progressbarinit(struct ProgressData *bar, bar->width = scr_size[0] - 1; #endif bar->out = config->errors; bar->out = config->global->errors; } src/tool_cfgable.c +0 −5 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ void config_init(struct OperationConfig* config) { memset(config, 0, sizeof(struct OperationConfig)); config->errors = stderr; /* default errors to stderr */ config->postfieldsize = -1; config->use_httpget = FALSE; config->create_dirs = FALSE; Loading Loading @@ -116,10 +115,6 @@ static void free_config_fields(struct OperationConfig *config) Curl_safefree(config->writeout); if(config->errors_fopened && config->errors) fclose(config->errors); config->errors = NULL; curl_slist_free_all(config->quote); curl_slist_free_all(config->postquote); curl_slist_free_all(config->prequote); Loading src/tool_cfgable.h +2 −2 Original line number Diff line number Diff line Loading @@ -138,8 +138,6 @@ struct OperationConfig { bool proxyanyauth; char *writeout; /* %-styled format string to output */ bool writeenv; /* write results to environment, if available */ FILE *errors; /* errors stream, defaults to stderr */ bool errors_fopened; /* whether errors stream isn't stderr */ struct curl_slist *quote; struct curl_slist *postquote; struct curl_slist *prequote; Loading Loading @@ -220,6 +218,8 @@ struct GlobalConfig { 0 => -s is used to NOT show errors 1 => -S has been used to show errors */ bool mute; /* don't show messages, --silent given */ FILE *errors; /* Error stream, defaults to stderr */ bool errors_fopened; /* Whether error stream isn't stderr */ char *trace_dump; /* file to dump the network trace to */ FILE *trace_stream; bool trace_fopened; Loading src/tool_formparse.c +2 −2 Original line number Diff line number Diff line Loading @@ -163,7 +163,7 @@ int formparse(struct OperationConfig *config, /* Allocate the contents */ contents = strdup(contp+1); if(!contents) { fprintf(config->errors, "out of memory\n"); fprintf(config->global->errors, "out of memory\n"); return 1; } contp = contents; Loading Loading @@ -277,7 +277,7 @@ int formparse(struct OperationConfig *config, } forms = malloc((count+1)*sizeof(struct curl_forms)); if(!forms) { fprintf(config->errors, "Error building form post!\n"); fprintf(config->global->errors, "Error building form post!\n"); Curl_safefree(contents); FreeMultiInfo(&multi_start, &multi_current); return 4; Loading Loading
src/tool_cb_dbg.c +2 −2 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type, { struct OperationConfig *operation = userdata; struct GlobalConfig *config = operation->global; FILE *output = operation->errors; FILE *output = config->errors; const char *text; struct timeval tv; struct tm *now; Loading Loading @@ -77,7 +77,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type, config->trace_stream = stdout; else if(curlx_strequal("%", config->trace_dump)) /* Ok, this is somewhat hackish but we do it undocumented for now */ config->trace_stream = operation->errors; /* aka stderr */ config->trace_stream = config->errors; /* aka stderr */ else { config->trace_stream = fopen(config->trace_dump, "w"); config->trace_fopened = TRUE; Loading
src/tool_cb_prg.c +1 −1 Original line number Diff line number Diff line Loading @@ -146,5 +146,5 @@ void progressbarinit(struct ProgressData *bar, bar->width = scr_size[0] - 1; #endif bar->out = config->errors; bar->out = config->global->errors; }
src/tool_cfgable.c +0 −5 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ void config_init(struct OperationConfig* config) { memset(config, 0, sizeof(struct OperationConfig)); config->errors = stderr; /* default errors to stderr */ config->postfieldsize = -1; config->use_httpget = FALSE; config->create_dirs = FALSE; Loading Loading @@ -116,10 +115,6 @@ static void free_config_fields(struct OperationConfig *config) Curl_safefree(config->writeout); if(config->errors_fopened && config->errors) fclose(config->errors); config->errors = NULL; curl_slist_free_all(config->quote); curl_slist_free_all(config->postquote); curl_slist_free_all(config->prequote); Loading
src/tool_cfgable.h +2 −2 Original line number Diff line number Diff line Loading @@ -138,8 +138,6 @@ struct OperationConfig { bool proxyanyauth; char *writeout; /* %-styled format string to output */ bool writeenv; /* write results to environment, if available */ FILE *errors; /* errors stream, defaults to stderr */ bool errors_fopened; /* whether errors stream isn't stderr */ struct curl_slist *quote; struct curl_slist *postquote; struct curl_slist *prequote; Loading Loading @@ -220,6 +218,8 @@ struct GlobalConfig { 0 => -s is used to NOT show errors 1 => -S has been used to show errors */ bool mute; /* don't show messages, --silent given */ FILE *errors; /* Error stream, defaults to stderr */ bool errors_fopened; /* Whether error stream isn't stderr */ char *trace_dump; /* file to dump the network trace to */ FILE *trace_stream; bool trace_fopened; Loading
src/tool_formparse.c +2 −2 Original line number Diff line number Diff line Loading @@ -163,7 +163,7 @@ int formparse(struct OperationConfig *config, /* Allocate the contents */ contents = strdup(contp+1); if(!contents) { fprintf(config->errors, "out of memory\n"); fprintf(config->global->errors, "out of memory\n"); return 1; } contp = contents; Loading Loading @@ -277,7 +277,7 @@ int formparse(struct OperationConfig *config, } forms = malloc((count+1)*sizeof(struct curl_forms)); if(!forms) { fprintf(config->errors, "Error building form post!\n"); fprintf(config->global->errors, "Error building form post!\n"); Curl_safefree(contents); FreeMultiInfo(&multi_start, &multi_current); return 4; Loading