summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-02-23 12:59:59 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-02-23 13:09:20 +0000
commit705a4cb549d7cd798162430512f482ba930226d6 (patch)
tree19ef6feaee7e0e5ebbc9caeed1ed22d37f82f9eb /src
parent6512e93be1d60eb9879676665c032f34e6940c70 (diff)
downloadcurl-705a4cb549d7cd798162430512f482ba930226d6.tar.gz
tool_cfgable: Renamed Configurable structure to OperationConfig
To allow for the addition of a global config structure and prevent confusion between the two.
Diffstat (limited to 'src')
-rw-r--r--src/tool_cb_dbg.c4
-rw-r--r--src/tool_cb_prg.c3
-rw-r--r--src/tool_cb_prg.h4
-rw-r--r--src/tool_cb_wrt.c4
-rw-r--r--src/tool_cfgable.c12
-rw-r--r--src/tool_cfgable.h10
-rw-r--r--src/tool_doswin.c6
-rw-r--r--src/tool_doswin.h4
-rw-r--r--src/tool_easysrc.c4
-rw-r--r--src/tool_easysrc.h4
-rw-r--r--src/tool_formparse.c2
-rw-r--r--src/tool_formparse.h4
-rw-r--r--src/tool_getparam.c6
-rw-r--r--src/tool_getparam.h6
-rw-r--r--src/tool_helpers.c5
-rw-r--r--src/tool_helpers.h4
-rw-r--r--src/tool_main.c6
-rw-r--r--src/tool_metalink.c10
-rw-r--r--src/tool_metalink.h6
-rw-r--r--src/tool_msgs.c4
-rw-r--r--src/tool_msgs.h4
-rw-r--r--src/tool_operate.c10
-rw-r--r--src/tool_operate.h2
-rw-r--r--src/tool_operhlp.c2
-rw-r--r--src/tool_operhlp.h4
-rw-r--r--src/tool_paramhlp.c12
-rw-r--r--src/tool_paramhlp.h12
-rw-r--r--src/tool_parsecfg.c3
-rw-r--r--src/tool_parsecfg.h5
-rw-r--r--src/tool_sdecls.h12
-rw-r--r--src/tool_setopt.c14
-rw-r--r--src/tool_setopt.h14
32 files changed, 99 insertions, 103 deletions
diff --git a/src/tool_cb_dbg.c b/src/tool_cb_dbg.c
index 1850ba0c6..8c79a4b3b 100644
--- a/src/tool_cb_dbg.c
+++ b/src/tool_cb_dbg.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -44,7 +44,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
unsigned char *data, size_t size,
void *userdata)
{
- struct Configurable *config = userdata;
+ struct OperationConfig *config = userdata;
FILE *output = config->errors;
const char *text;
struct timeval tv;
diff --git a/src/tool_cb_prg.c b/src/tool_cb_prg.c
index cc9091abe..2b0611ca9 100644
--- a/src/tool_cb_prg.c
+++ b/src/tool_cb_prg.c
@@ -101,7 +101,7 @@ int tool_progress_cb(void *clientp,
}
void progressbarinit(struct ProgressData *bar,
- struct Configurable *config)
+ struct OperationConfig *config)
{
#ifdef __EMX__
/* 20000318 mgs */
@@ -148,4 +148,3 @@ void progressbarinit(struct ProgressData *bar,
bar->out = config->errors;
}
-
diff --git a/src/tool_cb_prg.h b/src/tool_cb_prg.h
index d80e845b7..c635be803 100644
--- a/src/tool_cb_prg.h
+++ b/src/tool_cb_prg.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -36,7 +36,7 @@ struct ProgressData {
};
void progressbarinit(struct ProgressData *bar,
- struct Configurable *config);
+ struct OperationConfig *config);
/*
** callback for CURLOPT_PROGRESSFUNCTION
diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c
index d6688110a..dfbf95cc6 100644
--- a/src/tool_cb_wrt.c
+++ b/src/tool_cb_wrt.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -39,7 +39,7 @@ size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata)
{
size_t rc;
struct OutStruct *outs = userdata;
- struct Configurable *config = outs->config;
+ struct OperationConfig *config = outs->config;
/*
* Once that libcurl has called back tool_write_cb() the returned value
diff --git a/src/tool_cfgable.c b/src/tool_cfgable.c
index 818d7f4d4..e0010a702 100644
--- a/src/tool_cfgable.c
+++ b/src/tool_cfgable.c
@@ -26,9 +26,9 @@
#include "memdebug.h" /* keep this as LAST include */
-void config_init(struct Configurable* config)
+void config_init(struct OperationConfig* config)
{
- memset(config, 0, sizeof(struct Configurable));
+ memset(config, 0, sizeof(struct OperationConfig));
config->errors = stderr; /* default errors to stderr */
config->postfieldsize = -1;
@@ -43,7 +43,7 @@ void config_init(struct Configurable* config)
config->proto_redir_present = FALSE;
}
-static void free_config_fields(struct Configurable *config)
+static void free_config_fields(struct OperationConfig *config)
{
struct getout *urlnode;
@@ -150,9 +150,9 @@ static void free_config_fields(struct Configurable *config)
Curl_safefree(config->libcurl);
}
-void config_free(struct Configurable *config)
+void config_free(struct OperationConfig *config)
{
- struct Configurable *last = config;
+ struct OperationConfig *last = config;
/* Find the last config structure */
while(last->next)
@@ -160,7 +160,7 @@ void config_free(struct Configurable *config)
/* Free each of the structures in reverse order */
do {
- struct Configurable *prev = last->prev;
+ struct OperationConfig *prev = last->prev;
if(prev)
last->easy = NULL;
diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h
index 9cc262526..511227cb6 100644
--- a/src/tool_cfgable.h
+++ b/src/tool_cfgable.h
@@ -27,7 +27,7 @@
#include "tool_metalink.h"
-struct Configurable {
+struct OperationConfig {
CURL *easy; /* once we have one, we keep it here */
bool remote_time;
char *random_file;
@@ -216,11 +216,11 @@ struct Configurable {
bool nonpn; /* enable/disable TLS NPN extension */
bool noalpn; /* enable/disable TLS ALPN extension */
- struct Configurable* prev;
- struct Configurable* next; /* Always last in the struct */
+ struct OperationConfig* prev;
+ struct OperationConfig* next; /* Always last in the struct */
};
-void config_init(struct Configurable* config);
-void config_free(struct Configurable* config);
+void config_init(struct OperationConfig* config);
+void config_free(struct OperationConfig* config);
#endif /* HEADER_CURL_TOOL_CFGABLE_H */
diff --git a/src/tool_doswin.c b/src/tool_doswin.c
index 4fae91d32..dd6e8bb85 100644
--- a/src/tool_doswin.c
+++ b/src/tool_doswin.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -262,7 +262,8 @@ char **__crt0_glob_function(char *arg)
* HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SafeProcessSearchMode
*/
-CURLcode FindWin32CACert(struct Configurable *config, const char *bundle_file)
+CURLcode FindWin32CACert(struct OperationConfig *config,
+ const char *bundle_file)
{
CURLcode result = CURLE_OK;
@@ -296,4 +297,3 @@ CURLcode FindWin32CACert(struct Configurable *config, const char *bundle_file)
#endif /* WIN32 */
#endif /* MSDOS || WIN32 */
-
diff --git a/src/tool_doswin.h b/src/tool_doswin.h
index 955ce8d38..766c036f4 100644
--- a/src/tool_doswin.h
+++ b/src/tool_doswin.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -35,7 +35,7 @@ char **__crt0_glob_function(char *arg);
#ifdef WIN32
-CURLcode FindWin32CACert(struct Configurable *config, const char *bundle_file);
+CURLcode FindWin32CACert(struct OperationConfig *config, const char *bundle_file);
#endif /* WIN32 */
diff --git a/src/tool_easysrc.c b/src/tool_easysrc.c
index 339dde563..bcf2f63fe 100644
--- a/src/tool_easysrc.c
+++ b/src/tool_easysrc.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -165,7 +165,7 @@ CURLcode easysrc_cleanup(void)
return CURLE_OK;
}
-void dumpeasysrc(struct Configurable *config)
+void dumpeasysrc(struct OperationConfig *config)
{
struct curl_slist *ptr;
char *o = config->libcurl;
diff --git a/src/tool_easysrc.h b/src/tool_easysrc.h
index fa97cdcb3..e5f20e7be 100644
--- a/src/tool_easysrc.h
+++ b/src/tool_easysrc.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -40,7 +40,7 @@ extern CURLcode easysrc_add(struct curl_slist **plist, const char *bupf);
extern CURLcode easysrc_addf(struct curl_slist **plist, const char *fmt, ...);
extern CURLcode easysrc_perform(void);
extern CURLcode easysrc_cleanup(void);
-void dumpeasysrc(struct Configurable *config);
+void dumpeasysrc(struct OperationConfig *config);
#endif /* CURL_DISABLE_LIBCURL_OPTION */
diff --git a/src/tool_formparse.c b/src/tool_formparse.c
index fe357f504..5198822fd 100644
--- a/src/tool_formparse.c
+++ b/src/tool_formparse.c
@@ -140,7 +140,7 @@ static char *get_param_word(char **str, char **end_pos)
*
***************************************************************************/
-int formparse(struct Configurable *config,
+int formparse(struct OperationConfig *config,
const char *input,
struct curl_httppost **httppost,
struct curl_httppost **last_post,
diff --git a/src/tool_formparse.h b/src/tool_formparse.h
index 3cd915f6c..f7736264c 100644
--- a/src/tool_formparse.h
+++ b/src/tool_formparse.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -23,7 +23,7 @@
***************************************************************************/
#include "tool_setup.h"
-int formparse(struct Configurable *config,
+int formparse(struct OperationConfig *config,
const char *input,
struct curl_httppost **httppost,
struct curl_httppost **last_post,
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 45dc5c9f7..f6b889804 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -373,7 +373,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
char *nextarg, /* NULL if unset */
bool *usedarg, /* set to TRUE if the arg
has been used */
- struct Configurable *config)
+ struct OperationConfig *config)
{
char letter;
char subletter = '\0'; /* subletters can only occur on long options */
@@ -1798,7 +1798,7 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
return PARAM_OK;
}
-ParameterError parse_args(struct Configurable *config, int argc,
+ParameterError parse_args(struct OperationConfig *config, int argc,
argv_item_t argv[])
{
int i;
@@ -1813,7 +1813,7 @@ ParameterError parse_args(struct Configurable *config, int argc,
(config->url_list && config->url_list->url)) {
/* Allocate the next config */
- config->next = malloc(sizeof(struct Configurable));
+ config->next = malloc(sizeof(struct OperationConfig));
if(config->next) {
/* Initialise the newly created config */
config_init(config->next);
diff --git a/src/tool_getparam.h b/src/tool_getparam.h
index fee790b13..159319072 100644
--- a/src/tool_getparam.h
+++ b/src/tool_getparam.h
@@ -41,12 +41,12 @@ typedef enum {
PARAM_LAST
} ParameterError;
-struct Configurable;
+struct OperationConfig;
ParameterError getparameter(char *flag,
char *nextarg,
bool *usedarg,
- struct Configurable *config);
+ struct OperationConfig *config);
#ifdef UNITTESTS
void parse_cert_parameter(const char *cert_parameter,
@@ -54,7 +54,7 @@ void parse_cert_parameter(const char *cert_parameter,
char **passphrase);
#endif
-ParameterError parse_args(struct Configurable *config, int argc,
+ParameterError parse_args(struct OperationConfig *config, int argc,
argv_item_t argv[]);
#endif /* HEADER_CURL_TOOL_GETPARAM_H */
diff --git a/src/tool_helpers.c b/src/tool_helpers.c
index ae8aaaf32..dbf32f8bd 100644
--- a/src/tool_helpers.c
+++ b/src/tool_helpers.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -65,7 +65,7 @@ const char *param2text(int res)
}
}
-int SetHTTPrequest(struct Configurable *config, HttpReq req, HttpReq *store)
+int SetHTTPrequest(struct OperationConfig *config, HttpReq req, HttpReq *store)
{
if((*store == HTTPREQ_UNSPEC) ||
(*store == req)) {
@@ -75,4 +75,3 @@ int SetHTTPrequest(struct Configurable *config, HttpReq req, HttpReq *store)
warnf(config, "You can only select one HTTP request!\n");
return 1;
}
-
diff --git a/src/tool_helpers.h b/src/tool_helpers.h
index c0bcd8910..1487cf18a 100644
--- a/src/tool_helpers.h
+++ b/src/tool_helpers.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -25,7 +25,7 @@
const char *param2text(int res);
-int SetHTTPrequest(struct Configurable *config, HttpReq req, HttpReq *store);
+int SetHTTPrequest(struct OperationConfig *config, HttpReq req, HttpReq *store);
#endif /* HEADER_CURL_TOOL_HELPERS_H */
diff --git a/src/tool_main.c b/src/tool_main.c
index dabd5c95c..9542b059a 100644
--- a/src/tool_main.c
+++ b/src/tool_main.c
@@ -121,7 +121,7 @@ static void memory_tracking_init(void)
* _any_ libcurl usage. If this fails, *NO* libcurl functions may be
* used, or havoc may be the result.
*/
-static CURLcode main_init(struct Configurable *config)
+static CURLcode main_init(struct OperationConfig *config)
{
CURLcode result = CURLE_OK;
@@ -162,7 +162,7 @@ static void main_free(void)
int main(int argc, char *argv[])
{
CURLcode result = CURLE_OK;
- struct Configurable *config;
+ struct OperationConfig *config;
main_checkfds();
@@ -174,7 +174,7 @@ int main(int argc, char *argv[])
memory_tracking_init();
/* Allocate the initial config */
- config = malloc(sizeof(struct Configurable));
+ config = malloc(sizeof(struct OperationConfig));
if(config) {
/* Initialise the config */
diff --git a/src/tool_metalink.c b/src/tool_metalink.c
index 050f59d62..a9fdf62e9 100644
--- a/src/tool_metalink.c
+++ b/src/tool_metalink.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -594,7 +594,7 @@ static int check_hash(const char *filename,
return check_ok;
}
-int metalink_check_hash(struct Configurable *config,
+int metalink_check_hash(struct OperationConfig *config,
metalinkfile *mlfile,
const char *filename)
{
@@ -712,7 +712,7 @@ static metalinkfile *new_metalinkfile(metalink_file_t *fileinfo)
return f;
}
-int parse_metalink(struct Configurable *config, struct OutStruct *outs,
+int parse_metalink(struct OperationConfig *config, struct OutStruct *outs,
const char *metalink_url)
{
metalink_error_t r;
@@ -791,7 +791,7 @@ size_t metalink_write_cb(void *buffer, size_t sz, size_t nmemb,
void *userdata)
{
struct OutStruct *outs = userdata;
- struct Configurable *config = outs->config;
+ struct OperationConfig *config = outs->config;
int rv;
/*
@@ -878,7 +878,7 @@ static void delete_metalinkfile(metalinkfile *mlfile)
Curl_safefree(mlfile);
}
-void clean_metalink(struct Configurable *config)
+void clean_metalink(struct OperationConfig *config)
{
while(config->metalinkfile_list) {
metalinkfile *mlfile = config->metalinkfile_list;
diff --git a/src/tool_metalink.h b/src/tool_metalink.h
index f0390bbae..7dc21e53d 100644
--- a/src/tool_metalink.h
+++ b/src/tool_metalink.h
@@ -101,7 +101,7 @@ extern const digest_params SHA256_DIGEST_PARAMS[1];
* Counts the resource in the metalinkfile.
*/
int count_next_metalink_resource(metalinkfile *mlfile);
-void clean_metalink(struct Configurable *config);
+void clean_metalink(struct OperationConfig *config);
/*
* Performs final parse operation and extracts information from
@@ -113,7 +113,7 @@ void clean_metalink(struct Configurable *config);
* -1: Parsing failed; or no file is found
* -2: Parsing succeeded with some warnings.
*/
-int parse_metalink(struct Configurable *config, struct OutStruct *outs,
+int parse_metalink(struct OperationConfig *config, struct OutStruct *outs,
const char *metalink_url);
/*
@@ -142,7 +142,7 @@ int check_metalink_content_type(const char *content_type);
* No checksum in Metalink supported, hash algorithm not available, or
* Metalink does not contain checksum.
*/
-int metalink_check_hash(struct Configurable *config,
+int metalink_check_hash(struct OperationConfig *config,
metalinkfile *mlfile,
const char *filename);
diff --git a/src/tool_msgs.c b/src/tool_msgs.c
index 80fdf4e27..54754aef9 100644
--- a/src/tool_msgs.c
+++ b/src/tool_msgs.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -38,7 +38,7 @@
* mute (--silent) was selected.
*/
-void warnf(struct Configurable *config, const char *fmt, ...)
+void warnf(struct OperationConfig *config, const char *fmt, ...)
{
if(!config->mute) {
va_list ap;
diff --git a/src/tool_msgs.h b/src/tool_msgs.h
index 7b060894f..15754690f 100644
--- a/src/tool_msgs.h
+++ b/src/tool_msgs.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -23,7 +23,7 @@
***************************************************************************/
#include "tool_setup.h"
-void warnf(struct Configurable *config, const char *fmt, ...);
+void warnf(struct OperationConfig *config, const char *fmt, ...);
void helpf(FILE *errors, const char *fmt, ...);
diff --git a/src/tool_operate.c b/src/tool_operate.c
index d117a2aad..783d86cce 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -187,7 +187,7 @@ static curl_off_t VmsSpecialSize(const char * name,
}
#endif /* __VMS */
-static CURLcode operate_init(struct Configurable *config)
+static CURLcode operate_init(struct OperationConfig *config)
{
/* Get a curl handle to use for all forthcoming curl transfers */
config->easy = curl_easy_init();
@@ -204,7 +204,7 @@ static CURLcode operate_init(struct Configurable *config)
return CURLE_OK;
}
-static CURLcode operate_do(struct Configurable *config)
+static CURLcode operate_do(struct OperationConfig *config)
{
char errorbuffer[CURL_ERROR_SIZE];
struct ProgressData progressbar;
@@ -1792,7 +1792,7 @@ static CURLcode operate_do(struct Configurable *config)
return (CURLcode)res;
}
-static void operate_free(struct Configurable *config)
+static void operate_free(struct OperationConfig *config)
{
if(config->easy) {
curl_easy_cleanup(config->easy);
@@ -1803,7 +1803,7 @@ static void operate_free(struct Configurable *config)
clean_metalink(config);
}
-CURLcode operate(struct Configurable *config, int argc, argv_item_t argv[])
+CURLcode operate(struct OperationConfig *config, int argc, argv_item_t argv[])
{
CURLcode result = CURLE_OK;
@@ -1847,7 +1847,7 @@ CURLcode operate(struct Configurable *config, int argc, argv_item_t argv[])
/* Perform the main operations */
else {
size_t count = 0;
- struct Configurable *operation = config;
+ struct OperationConfig *operation = config;
/* Get the required aguments for each operation */
while(!result && operation) {
diff --git a/src/tool_operate.h b/src/tool_operate.h
index 01c5fd42b..86283f7a4 100644
--- a/src/tool_operate.h
+++ b/src/tool_operate.h
@@ -23,7 +23,7 @@
***************************************************************************/
#include "tool_setup.h"
-CURLcode operate(struct Configurable *config, int argc, argv_item_t argv[]);
+CURLcode operate(struct OperationConfig *config, int argc, argv_item_t argv[]);
#endif /* HEADER_CURL_TOOL_OPERATE_H */
diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c
index 2ba788100..15eefabe7 100644
--- a/src/tool_operhlp.c
+++ b/src/tool_operhlp.c
@@ -34,7 +34,7 @@
#include "memdebug.h" /* keep this as LAST include */
-void clean_getout(struct Configurable *config)
+void clean_getout(struct OperationConfig *config)
{
struct getout *next;
struct getout *node = config->url_list;
diff --git a/src/tool_operhlp.h b/src/tool_operhlp.h
index 80a7682e4..8fcaad698 100644
--- a/src/tool_operhlp.h
+++ b/src/tool_operhlp.h
@@ -23,9 +23,9 @@
***************************************************************************/
#include "tool_setup.h"
-struct Configurable;
+struct OperationConfig;
-void clean_getout(struct Configurable *config);
+void clean_getout(struct OperationConfig *config);
bool output_expected(const char *url, const char *uploadfile);
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
index 7ce9131c6..0bbede996 100644
--- a/src/tool_paramhlp.c
+++ b/src/tool_paramhlp.c
@@ -37,7 +37,7 @@
#include "memdebug.h" /* keep this as LAST include */
-struct getout *new_getout(struct Configurable *config)
+struct getout *new_getout(struct OperationConfig *config)
{
struct getout *node = calloc(1, sizeof(struct getout));
struct getout *last = config->url_last;
@@ -241,7 +241,7 @@ ParameterError str2udouble(double *val, const char *str)
* data.
*/
-long proto2num(struct Configurable *config, long *val, const char *str)
+long proto2num(struct OperationConfig *config, long *val, const char *str)
{
char *buffer;
const char *sep = ",";
@@ -439,7 +439,7 @@ ParameterError add2list(struct curl_slist **list, const char *ptr)
return PARAM_OK;
}
-int ftpfilemethod(struct Configurable *config, const char *str)
+int ftpfilemethod(struct OperationConfig *config, const char *str)
{
if(curlx_raw_equal("singlecwd", str))
return CURLFTPMETHOD_SINGLECWD;
@@ -451,7 +451,7 @@ int ftpfilemethod(struct Configurable *config, const char *str)
return CURLFTPMETHOD_MULTICWD;
}
-int ftpcccmethod(struct Configurable *config, const char *str)
+int ftpcccmethod(struct OperationConfig *config, const char *str)
{
if(curlx_raw_equal("passive", str))
return CURLFTPSSL_CCC_PASSIVE;
@@ -461,7 +461,7 @@ int ftpcccmethod(struct Configurable *config, const char *str)
return CURLFTPSSL_CCC_PASSIVE;
}
-long delegation(struct Configurable *config, char *str)
+long delegation(struct OperationConfig *config, char *str)
{
if(curlx_raw_equal("none", str))
return CURLGSSAPI_DELEGATION_NONE;
@@ -481,7 +481,7 @@ static char *my_useragent(void)
return strdup(CURL_NAME "/" CURL_VERSION);
}
-CURLcode get_args(struct Configurable *config, const size_t i)
+CURLcode get_args(struct OperationConfig *config, const size_t i)
{
CURLcode result = CURLE_OK;
bool last = (config->next ? FALSE : TRUE);
diff --git a/src/tool_paramhlp.h b/src/tool_paramhlp.h
index e56d63691..69d7fd422 100644
--- a/src/tool_paramhlp.h
+++ b/src/tool_paramhlp.h
@@ -23,7 +23,7 @@
***************************************************************************/
#include "tool_setup.h"
-struct getout *new_getout(struct Configurable *config);
+struct getout *new_getout(struct OperationConfig *config);
ParameterError file2string(char **bufp, FILE *file);
@@ -36,19 +36,19 @@ ParameterError str2unum(long *val, const char *str);
ParameterError str2double(double *val, const char *str);
ParameterError str2udouble(double *val, const char *str);
-long proto2num(struct Configurable *config, long *val, const char *str);
+long proto2num(struct OperationConfig *config, long *val, const char *str);
ParameterError str2offset(curl_off_t *val, const char *str);
-CURLcode get_args(struct Configurable *config, const size_t index);
+CURLcode get_args(struct OperationConfig *config, const size_t i);
ParameterError add2list(struct curl_slist **list, const char *ptr);
-int ftpfilemethod(struct Configurable *config, const char *str);
+int ftpfilemethod(struct OperationConfig *config, const char *str);
-int ftpcccmethod(struct Configurable *config, const char *str);
+int ftpcccmethod(struct OperationConfig *config, const char *str);
-long delegation(struct Configurable *config, char *str);
+long delegation(struct OperationConfig *config, char *str);
#endif /* HEADER_CURL_TOOL_PARAMHLP_H */
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
index ca3a4515e..69bacbf18 100644
--- a/src/tool_parsecfg.c
+++ b/src/tool_parsecfg.c
@@ -44,8 +44,7 @@ static const char *unslashquote(const char *line, char *param);
static char *my_get_line(FILE *fp);
/* return 0 on everything-is-fine, and non-zero otherwise */
-int parseconfig(const char *filename,
- struct Configurable *config)
+int parseconfig(const char *filename, struct OperationConfig *config)
{
int res;
FILE *file;
diff --git a/src/tool_parsecfg.h b/src/tool_parsecfg.h
index aa7ac574b..af9f50bf1 100644
--- a/src/tool_parsecfg.h
+++ b/src/tool_parsecfg.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -23,8 +23,7 @@
***************************************************************************/
#include "tool_setup.h"
-int parseconfig(const char *filename,
- struct Configurable *config);
+int parseconfig(const char *filename, struct OperationConfig *config);
#endif /* HEADER_CURL_TOOL_PARSECFG_H */
diff --git a/src/tool_sdecls.h b/src/tool_sdecls.h
index 5468830d0..e74020f77 100644
--- a/src/tool_sdecls.h
+++ b/src/tool_sdecls.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -51,7 +51,7 @@
* 'stream' member is a pointer to a stream controlling object as returned
* from a 'fopen' call or a standard stream.
*
- * 'config' member is a pointer to associated 'Configurable' struct.
+ * 'config' member is a pointer to associated 'OperationConfig' struct.
*
* 'bytes' member represents amount written so far.
*
@@ -69,7 +69,7 @@ struct OutStruct {
bool s_isreg;
bool fopened;
FILE *stream;
- struct Configurable *config;
+ struct OperationConfig *config;
curl_off_t bytes;
curl_off_t init;
#ifdef USE_METALINK
@@ -85,12 +85,12 @@ struct OutStruct {
* 'fd' member is either 'stdin' file descriptor number STDIN_FILENO
* or a file descriptor as returned from an 'open' call for some file.
*
- * 'config' member is a pointer to associated 'Configurable' struct.
+ * 'config' member is a pointer to associated 'OperationConfig' struct.
*/
struct InStruct {
int fd;
- struct Configurable *config;
+ struct OperationConfig *config;
};
@@ -143,7 +143,7 @@ typedef enum {
/*
- * Complete struct declarations which have Configurable struct members,
+ * Complete struct declarations which have OperationConfig struct members,
* just in case this header is directly included in some source file.
*/
diff --git a/src/tool_setopt.c b/src/tool_setopt.c
index 2d60b255d..d1604245c 100644
--- a/src/tool_setopt.c
+++ b/src/tool_setopt.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -230,7 +230,7 @@ static char *c_escape(const char *str)
}
/* setopt wrapper for enum types */
-CURLcode tool_setopt_enum(CURL *curl, struct Configurable *config,
+CURLcode tool_setopt_enum(CURL *curl, struct OperationConfig *config,
const char *name, CURLoption tag,
const NameValue *nvlist, long lval)
{
@@ -263,7 +263,7 @@ CURLcode tool_setopt_enum(CURL *curl, struct Configurable *config,
}
/* setopt wrapper for flags */
-CURLcode tool_setopt_flags(CURL *curl, struct Configurable *config,
+CURLcode tool_setopt_flags(CURL *curl, struct OperationConfig *config,
const char *name, CURLoption tag,
const NameValue *nvlist, long lval)
{
@@ -305,7 +305,7 @@ CURLcode tool_setopt_flags(CURL *curl, struct Configurable *config,
}
/* setopt wrapper for bitmasks */
-CURLcode tool_setopt_bitmask(CURL *curl, struct Configurable *config,
+CURLcode tool_setopt_bitmask(CURL *curl, struct OperationConfig *config,
const char *name, CURLoption tag,
const NameValueUnsigned *nvlist,
long lval)
@@ -348,7 +348,7 @@ CURLcode tool_setopt_bitmask(CURL *curl, struct Configurable *config,
}
/* setopt wrapper for CURLOPT_HTTPPOST */
-CURLcode tool_setopt_httppost(CURL *curl, struct Configurable *config,
+CURLcode tool_setopt_httppost(CURL *curl, struct OperationConfig *config,
const char *name, CURLoption tag,
struct curl_httppost *post)
{
@@ -424,7 +424,7 @@ CURLcode tool_setopt_httppost(CURL *curl, struct Configurable *config,
}
/* setopt wrapper for curl_slist options */
-CURLcode tool_setopt_slist(CURL *curl, struct Configurable *config,
+CURLcode tool_setopt_slist(CURL *curl, struct OperationConfig *config,
const char *name, CURLoption tag,
struct curl_slist *list)
{
@@ -464,7 +464,7 @@ CURLcode tool_setopt_slist(CURL *curl, struct Configurable *config,
/* generic setopt wrapper for all other options.
* Some type information is encoded in the tag value. */
-CURLcode tool_setopt(CURL *curl, bool str, struct Configurable *config,
+CURLcode tool_setopt(CURL *curl, bool str, struct OperationConfig *config,
const char *name, CURLoption tag, ...)
{
va_list arg;
diff --git a/src/tool_setopt.h b/src/tool_setopt.h
index ec07a96d3..8a17d9920 100644
--- a/src/tool_setopt.h
+++ b/src/tool_setopt.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -71,22 +71,22 @@ extern const NameValueUnsigned setopt_nv_CURLAUTH[];
/* Intercept setopt calls for --libcurl */
-CURLcode tool_setopt_enum(CURL *curl, struct Configurable *config,
+CURLcode tool_setopt_enum(CURL *curl, struct OperationConfig *config,
const char *name, CURLoption tag,
const NameValue *nv, long lval);
-CURLcode tool_setopt_flags(CURL *curl, struct Configurable *config,
+CURLcode tool_setopt_flags(CURL *curl, struct OperationConfig *config,
const char *name, CURLoption tag,
const NameValue *nv, long lval);
-CURLcode tool_setopt_bitmask(CURL *curl, struct Configurable *config,
+CURLcode tool_setopt_bitmask(CURL *curl, struct OperationConfig *config,
const char *name, CURLoption tag,
const NameValueUnsigned *nv, long lval);
-CURLcode tool_setopt_httppost(CURL *curl, struct Configurable *config,
+CURLcode tool_setopt_httppost(CURL *curl, struct OperationConfig *config,
const char *name, CURLoption tag,
struct curl_httppost *httppost);
-CURLcode tool_setopt_slist(CURL *curl, struct Configurable *config,
+CURLcode tool_setopt_slist(CURL *curl, struct OperationConfig *config,
const char *name, CURLoption tag,
struct curl_slist *list);
-CURLcode tool_setopt(CURL *curl, bool str, struct Configurable *config,
+CURLcode tool_setopt(CURL *curl, bool str, struct OperationConfig *config,
const char *name, CURLoption tag, ...);
#define my_setopt(x,y,z) \