tool_urlglob: use curl_off_t instead of longs

To handle more globs better (especially on Windows)

Closes #11224
This commit is contained in:
Daniel Stenberg 2023-05-30 14:06:15 +02:00
parent a1730b6106
commit 0807fd72f9
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 31 additions and 26 deletions

View file

@ -38,7 +38,7 @@ struct URLPattern {
union {
struct {
char **elements;
int size;
curl_off_t size;
int ptr_s;
} Set;
struct {
@ -48,11 +48,11 @@ struct URLPattern {
int step;
} CharRange;
struct {
unsigned long min_n;
unsigned long max_n;
curl_off_t min_n;
curl_off_t max_n;
int padlength;
unsigned long ptr_n;
unsigned long step;
curl_off_t ptr_n;
curl_off_t step;
} NumRange;
} content;
};
@ -70,7 +70,7 @@ struct URLGlob {
size_t pos; /* column position of error or 0 */
};
CURLcode glob_url(struct URLGlob**, char *, unsigned long *, FILE *);
CURLcode glob_url(struct URLGlob**, char *, curl_off_t *, FILE *);
CURLcode glob_next_url(char **, struct URLGlob *);
CURLcode glob_match_url(char **, char *, struct URLGlob *);
void glob_cleanup(struct URLGlob *glob);