diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-12-13 16:22:57 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-12-13 16:22:57 +0000 |
commit | 4938991ab830435601e5dd4edfe3b188a60269c5 (patch) | |
tree | 13ec92c0b8cb6ea3b442517fee9a882dd9dbaee7 /tests/libtest/first.c | |
parent | 13722f536e5e7116f5ccbf625746366e74eda7a5 (diff) |
set up arg2 to point to argv[2] to be used at will by programs
Diffstat (limited to 'tests/libtest/first.c')
-rw-r--r-- | tests/libtest/first.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/libtest/first.c b/tests/libtest/first.c index 4f42136a0..528f1785c 100644 --- a/tests/libtest/first.c +++ b/tests/libtest/first.c @@ -8,6 +8,8 @@ extern void curl_memdebug(const char *); /* test is provided in the test code file */ CURLcode test(char *url); +char *arg2=NULL; + int main(int argc, char **argv) { char *URL; @@ -15,6 +17,9 @@ int main(int argc, char **argv) fprintf(stderr, "Pass URL as argument please\n"); return 1; } + if(argc>2) + arg2=argv[2]; + URL = argv[1]; /* provide this to the rest */ fprintf(stderr, "URL: %s\n", URL); |