* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, 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
#include "warnless.h"
#include "non-ascii.h"
#include "escape.h"
+/* The last 3 #include files should be in this order */
#include "curl_printf.h"
-
-/* The last #include files should be: */
#include "curl_memory.h"
#include "memdebug.h"
return curl_easy_unescape(NULL, string, length, NULL);
}
-char *curl_easy_escape(CURL *handle, const char *string, int inlength)
+char *curl_easy_escape(struct Curl_easy *data, const char *string,
+ int inlength)
{
size_t alloc = (inlength?(size_t)inlength:strlen(string))+1;
char *ns;
alloc *= 2;
testing_ptr = realloc(ns, alloc);
if(!testing_ptr) {
- free( ns );
+ free(ns);
return NULL;
}
else {
}
}
- result = Curl_convert_to_network(handle, &in, 1);
+ result = Curl_convert_to_network(data, &in, 1);
if(result) {
/* Curl_convert_to_network calls failf if unsuccessful */
free(ns);
* *olen. If length == 0, the length is assumed to be strlen(string).
*
*/
-CURLcode Curl_urldecode(struct SessionHandle *data,
+CURLcode Curl_urldecode(struct Curl_easy *data,
const char *string, size_t length,
char **ostring, size_t *olen,
bool reject_ctrl)
* If length == 0, the length is assumed to be strlen(string).
* If olen == NULL, no output length is stored.
*/
-char *curl_easy_unescape(CURL *handle, const char *string, int length,
- int *olen)
+char *curl_easy_unescape(struct Curl_easy *data, const char *string,
+ int length, int *olen)
{
char *str = NULL;
size_t inputlen = length;
size_t outputlen;
- CURLcode res = Curl_urldecode(handle, string, inputlen, &str, &outputlen,
+ CURLcode res = Curl_urldecode(data, string, inputlen, &str, &outputlen,
FALSE);
if(res)
return NULL;