aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-05-09 22:42:53 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-05-09 22:42:53 +0000
commit984878ed7a446972a194d8c9b01887a52f9ac1a0 (patch)
tree9c46d812d7b2a15a4e5b428f0bec20f9ed3cf8a0 /src
parentde275780a9804a61644b4b9f0659dd1175c5cfa4 (diff)
Removed all #ifdef GLOBURL lines, we always use them
Diffstat (limited to 'src')
-rw-r--r--src/main.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/main.c b/src/main.c
index cadc9cf44..2b4ba3c95 100644
--- a/src/main.c
+++ b/src/main.c
@@ -48,11 +48,15 @@
#include <curl/curl.h>
#include <curl/mprintf.h>
#include "../lib/getdate.h"
-#ifdef GLOBURL
+
#include "urlglob.h"
#define CURLseparator "--_curl_--"
#define MIMEseparator "_curl_"
-#endif
+
+/* This define make use of the "Curlseparator" as opposed to the
+ MIMEseparator. We might add support for the latter one in the
+ future, and that's why this is left in the source. */
+#define CURL_SEPARATORS
/* This is now designed to have its own local setup.h */
#include "setup.h"
@@ -862,12 +866,11 @@ int main(int argc, char *argv[])
struct OutStruct heads;
char *url = NULL;
-#ifdef GLOBURL
+
URLGlob *urls;
int urlnum;
char *outfiles = NULL;
int separator = 0;
-#endif
FILE *infd = stdin;
FILE *headerfilep = NULL;
@@ -964,7 +967,6 @@ int main(int argc, char *argv[])
fprintf(stderr, "URL: %s PROXY: %s\n", url, config.proxy?config.proxy:"none");
#endif
-#ifdef GLOBURL
/* expand '{...}' and '[...]' expressions and return total number of URLs
in pattern set */
res = glob_url(&urls, url, &urlnum);
@@ -987,7 +989,6 @@ int main(int argc, char *argv[])
for (i = 0; (url = next_url(urls)); ++i) {
if (outfiles)
config.outfile = strdup(outfiles);
-#endif
if(config.outfile && config.infile) {
helpf("you can't both upload and download!\n");
@@ -1013,10 +1014,8 @@ int main(int argc, char *argv[])
return URG_WRITE_ERROR;
}
}
-#ifdef GLOBURL
else /* fill '#1' ... '#9' terms from URL pattern */
config.outfile = match_url(config.outfile, *urls);
-#endif
if((0 == config.resume_from) && config.use_resume) {
/* we're told to continue where we are now, then we get the size of the
@@ -1105,7 +1104,7 @@ int main(int argc, char *argv[])
we switch off the progress meter */
config.conf |= CONF_NOPROGRESS;
-#ifdef GLOBURL
+
if (urlnum > 1) {
fprintf(stderr, "\n[%d/%d]: %s --> %s\n", i+1, urlnum, url, config.outfile ? config.outfile : "<stdout>");
if (separator) {
@@ -1118,7 +1117,6 @@ int main(int argc, char *argv[])
#endif
}
}
-#endif
if(!config.errors)
config.errors = stderr;
@@ -1183,7 +1181,6 @@ int main(int argc, char *argv[])
if(config.url)
free(config.url);
-#ifdef GLOBURL
if(url)
free(url);
if(config.outfile && !config.remotefile)
@@ -1193,7 +1190,6 @@ int main(int argc, char *argv[])
if (separator)
printf("--%s--\n", MIMEseparator);
#endif
-#endif
curl_slist_free_all(config.quote); /* the checks for config.quote == NULL */