1#ifndef HEADER_CURL_CURLX_H 2#define HEADER_CURL_CURLX_H 3/*************************************************************************** 4 * _ _ ____ _ 5 * Project ___| | | | _ \| | 6 * / __| | | | |_) | | 7 * | (__| |_| | _ <| |___ 8 * \___|\___/|_| \_\_____| 9 * 10 * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 11 * 12 * This software is licensed as described in the file COPYING, which 13 * you should have received as part of this distribution. The terms 14 * are also available at https://curl.se/docs/copyright.html. 15 * 16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 * copies of the Software, and permit persons to whom the Software is 18 * furnished to do so, under the terms of the COPYING file. 19 * 20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 * KIND, either express or implied. 22 * 23 * SPDX-License-Identifier: curl 24 * 25 ***************************************************************************/ 26 27/* 28 * Defines protos and includes all header files that provide the curlx_* 29 * functions. The curlx_* functions are not part of the libcurl API, but are 30 * stand-alone functions whose sources can be built and linked by apps if need 31 * be. 32 */ 33 34#include <curl/mprintf.h> 35/* this is still a public header file that provides the curl_mprintf() 36 functions while they still are offered publicly. They will be made library- 37 private one day */ 38 39#include "strcase.h" 40/* "strcase.h" provides the strcasecompare protos */ 41 42#include "strtoofft.h" 43/* "strtoofft.h" provides this function: curlx_strtoofft(), returns a 44 curl_off_t number from a given string. 45*/ 46 47#include "nonblock.h" 48/* "nonblock.h" provides curlx_nonblock() */ 49 50#include "warnless.h" 51/* "warnless.h" provides functions: 52 53 curlx_ultous() 54 curlx_ultouc() 55 curlx_uztosi() 56*/ 57 58#include "curl_multibyte.h" 59/* "curl_multibyte.h" provides these functions and macros: 60 61 curlx_convert_UTF8_to_wchar() 62 curlx_convert_wchar_to_UTF8() 63 curlx_convert_UTF8_to_tchar() 64 curlx_convert_tchar_to_UTF8() 65 curlx_unicodefree() 66*/ 67 68#include "version_win32.h" 69/* "version_win32.h" provides curlx_verify_windows_version() */ 70 71/* Now setup curlx_ * names for the functions that are to become curlx_ and 72 be removed from a future libcurl official API: 73 curlx_getenv 74 curlx_mprintf (and its variations) 75 curlx_strcasecompare 76 curlx_strncasecompare 77 78*/ 79 80#define curlx_getenv curl_getenv 81#define curlx_mvsnprintf curl_mvsnprintf 82#define curlx_msnprintf curl_msnprintf 83#define curlx_maprintf curl_maprintf 84#define curlx_mvaprintf curl_mvaprintf 85#define curlx_msprintf curl_msprintf 86#define curlx_mprintf curl_mprintf 87#define curlx_mfprintf curl_mfprintf 88#define curlx_mvsprintf curl_mvsprintf 89#define curlx_mvprintf curl_mvprintf 90#define curlx_mvfprintf curl_mvfprintf 91 92#ifdef ENABLE_CURLX_PRINTF 93/* If this define is set, we define all "standard" printf() functions to use 94 the curlx_* version instead. It makes the source code transparent and 95 easier to understand/patch. Undefine them first. */ 96# undef printf 97# undef fprintf 98# undef sprintf 99# undef msnprintf 100# undef vprintf 101# undef vfprintf 102# undef vsprintf 103# undef mvsnprintf 104# undef aprintf 105# undef vaprintf 106 107# define printf curlx_mprintf 108# define fprintf curlx_mfprintf 109# define sprintf curlx_msprintf 110# define msnprintf curlx_msnprintf 111# define vprintf curlx_mvprintf 112# define vfprintf curlx_mvfprintf 113# define mvsnprintf curlx_mvsnprintf 114# define aprintf curlx_maprintf 115# define vaprintf curlx_mvaprintf 116#endif /* ENABLE_CURLX_PRINTF */ 117 118#endif /* HEADER_CURL_CURLX_H */ 119