mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Added writeout stuff
This commit is contained in:
parent
947a644d5a
commit
10f958029a
@ -430,6 +430,9 @@ UrgError curl_urlget(UrgTag tag, ...)
|
|||||||
case URGTAG_WRITEFUNCTION:
|
case URGTAG_WRITEFUNCTION:
|
||||||
data->fwrite = (size_t (*)(char *, size_t, size_t, FILE *))param_func;
|
data->fwrite = (size_t (*)(char *, size_t, size_t, FILE *))param_func;
|
||||||
break;
|
break;
|
||||||
|
case URGTAG_WRITEINFO:
|
||||||
|
data->writeinfo = (char *)param_obj;
|
||||||
|
break;
|
||||||
case URGTAG_READFUNCTION:
|
case URGTAG_READFUNCTION:
|
||||||
data->fread = (size_t (*)(char *, size_t, size_t, FILE *))param_func;
|
data->fread = (size_t (*)(char *, size_t, size_t, FILE *))param_func;
|
||||||
break;
|
break;
|
||||||
@ -546,6 +549,12 @@ UrgError curl_urlget(UrgTag tag, ...)
|
|||||||
else
|
else
|
||||||
res = URG_FAILED_INIT; /* failed */
|
res = URG_FAILED_INIT; /* failed */
|
||||||
|
|
||||||
|
if((URG_OK == res) && data->writeinfo) {
|
||||||
|
/* Time to output some info to stdout */
|
||||||
|
WriteOut(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* total cleanup */
|
/* total cleanup */
|
||||||
urlfree(data, TRUE);
|
urlfree(data, TRUE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user