lib543.c
Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                  _   _ ____  _
00003  *  Project                     ___| | | |  _ \| |
00004  *                             / __| | | | |_) | |
00005  *                            | (__| |_| |  _ <| |___
00006  *                             \___|\___/|_| \_\_____|
00007  *
00008  * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
00009  *
00010  * This software is licensed as described in the file COPYING, which
00011  * you should have received as part of this distribution. The terms
00012  * are also available at https://curl.haxx.se/docs/copyright.html.
00013  *
00014  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
00015  * copies of the Software, and permit persons to whom the Software is
00016  * furnished to do so, under the terms of the COPYING file.
00017  *
00018  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
00019  * KIND, either express or implied.
00020  *
00021  ***************************************************************************/
00022 /* Based on Alex Fishman's bug report on September 30, 2007 */
00023 
00024 #include "test.h"
00025 
00026 #include "memdebug.h"
00027 
00028 int test(char *URL)
00029 {
00030   unsigned char a[] = {0x9c, 0x26, 0x4b, 0x3d, 0x49, 0x4, 0xa1, 0x1,
00031                        0xe0, 0xd8, 0x7c,  0x20, 0xb7, 0xef, 0x53, 0x29, 0xfa,
00032                        0x1d, 0x57, 0xe1};
00033 
00034   CURL *easy;
00035   int asize;
00036   char *s;
00037   (void)URL;
00038 
00039   easy = curl_easy_init();
00040   if(!easy) {
00041     fprintf(stderr, "curl_easy_init() failed\n");
00042     return TEST_ERR_MAJOR_BAD;
00043   }
00044 
00045   asize = (int)sizeof(a);
00046 
00047   s = curl_easy_escape(easy, (char *)a, asize);
00048 
00049   if(s)
00050     printf("%s\n", s);
00051 
00052   if(s)
00053     curl_free(s);
00054 
00055   curl_easy_cleanup(easy);
00056 
00057   return 0;
00058 }


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:05