aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-06-10 09:42:22 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-06-10 09:42:22 +0000
commite7fb72a7320211fb7669194eacddce401348c692 (patch)
tree09daf3edf4198261396f95c5ce01c1bc078a39ce /src/main.c
parent8d30d34e0cc45376bb95de46d42a786c2c362e8a (diff)
Pass the error stream pointer to the URL globber, so that it can report
errors correctly to the user, if need be. Also fixed so that a missing ] in the globbing process no longer leads to core dump.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 3a7139d81..3a52401e0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2592,7 +2592,9 @@ operate(struct Configurable *config, int argc, char *argv[])
if(!config->globoff) {
/* Unless explicitly shut off, we expand '{...}' and '[...]' expressions
and return total number of URLs in pattern set */
- res = glob_url(&urls, url, &urlnum);
+ res = glob_url(&urls, url, &urlnum,
+ config->showerror?
+ (config->errors?config->errors:stderr):NULL);
if(res != CURLE_OK)
return res;
}
@@ -2606,7 +2608,7 @@ operate(struct Configurable *config, int argc, char *argv[])
separator = 1;
}
for(i = 0;
- (url = urls?next_url(urls):(i?NULL:strdup(url)));
+ (url = urls?glob_next_url(urls):(i?NULL:strdup(url)));
i++) {
char *outfile;
outfile = outfiles?strdup(outfiles):NULL;
@@ -2636,7 +2638,7 @@ operate(struct Configurable *config, int argc, char *argv[])
else if(urls) {
/* fill '#1' ... '#9' terms from URL pattern */
char *storefile = outfile;
- outfile = match_url(storefile, urls);
+ outfile = glob_match_url(storefile, urls);
free(storefile);
}