Commit 705a4cb5 authored by Steve Holme's avatar Steve Holme
Browse files

tool_cfgable: Renamed Configurable structure to OperationConfig

To allow for the addition of a global config structure and prevent
confusion between the two.
parent 6512e93b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
+1 −2
Original line number Diff line number Diff line
@@ -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;
}
+2 −2
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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
+6 −6
Original line number Diff line number Diff line
@@ -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;

Loading