summaryrefslogtreecommitdiff
path: root/src/process_url.c
diff options
context:
space:
mode:
authorMole Shang <[email protected]>2023-08-10 22:48:37 +0800
committerMole Shang <[email protected]>2024-03-01 22:30:16 +0800
commit085c2a88d44ebac41c64c32ee6b796ff64e5331f (patch)
tree18d01810dae57b364b4234477ece4dc6cca59a56 /src/process_url.c
parent2a4121c0e76f988a45b91145a9e2f50595817f81 (diff)
downloadhinata-085c2a88d44ebac41c64c32ee6b796ff64e5331f.tar.gz
hinata-085c2a88d44ebac41c64c32ee6b796ff64e5331f.tar.bz2
hinata-085c2a88d44ebac41c64c32ee6b796ff64e5331f.zip
status: support large file sizes on 64bit systems
Convert all unsigned long nums to unsigned long long in order to let the UI safely display sizes >= 4GB
Diffstat (limited to 'src/process_url.c')
-rw-r--r--src/process_url.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/process_url.c b/src/process_url.c
index e09647a..a8dadc9 100644
--- a/src/process_url.c
+++ b/src/process_url.c
@@ -245,7 +245,7 @@ static int parse_url(const char *URL, const char *outdir, char *fn) {
return 0;
}
-bool get_info(const char *URL, long *psize, char **p_content_type,
+bool get_info(const char *URL, curl_off_t *psize, char **p_content_type,
char **p_cookie) {
CURL *curl;
long resp_code;
@@ -528,8 +528,8 @@ void poll_status(status_t *stat) {
for (unsigned char i = 0; i < curl_conf->total_thrd; i++) {
curl_conf->dlnow += curl_conf->dlnow_per_thrd[i];
}
- stat->cur = (unsigned long)curl_conf->dlnow;
- stat->total = (unsigned long)curl_conf->dltotal;
+ stat->cur = (unsigned long long)curl_conf->dlnow;
+ stat->total = (unsigned long long)curl_conf->dltotal;
DEBUG_PRINT("success_thrd: %hhu, total_thrd: %hhu, is_done: %s\n",
curl_conf->success_thrd, curl_conf->total_thrd,
stat->is_done ? "yes" : "no");