1 #ifndef HEADER_CURL_CURLX_H
2 #define HEADER_CURL_CURLX_H
3 /***************************************************************************
5 * Project ___| | | | _ \| |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
10 * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
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.
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.
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
23 ***************************************************************************/
26 * Defines protos and includes all header files that provide the curlx_*
27 * functions. The curlx_* functions are not part of the libcurl API, but are
28 * stand-alone functions whose sources can be built and linked by apps if need
32 #include <curl/mprintf.h>
33 /* this is still a public header file that provides the curl_mprintf()
34 functions while they still are offered publicly. They will be made library-
38 /* "strcase.h" provides the strcasecompare protos */
40 #include "strtoofft.h"
41 /* "strtoofft.h" provides this function: curlx_strtoofft(), returns a
42 curl_off_t number from a given string.
46 /* "nonblock.h" provides curlx_nonblock() */
49 /* "warnless.h" provides functions:
56 #include "curl_multibyte.h"
57 /* "curl_multibyte.h" provides these functions and macros:
59 curlx_convert_UTF8_to_wchar()
60 curlx_convert_wchar_to_UTF8()
61 curlx_convert_UTF8_to_tchar()
62 curlx_convert_tchar_to_UTF8()
66 #include "version_win32.h"
67 /* "version_win32.h" provides curlx_verify_windows_version() */
69 /* Now setup curlx_ * names for the functions that are to become curlx_ and
70 be removed from a future libcurl official API:
72 curlx_mprintf (and its variations)
78 #define curlx_getenv curl_getenv
79 #define curlx_mvsnprintf curl_mvsnprintf
80 #define curlx_msnprintf curl_msnprintf
81 #define curlx_maprintf curl_maprintf
82 #define curlx_mvaprintf curl_mvaprintf
83 #define curlx_msprintf curl_msprintf
84 #define curlx_mprintf curl_mprintf
85 #define curlx_mfprintf curl_mfprintf
86 #define curlx_mvsprintf curl_mvsprintf
87 #define curlx_mvprintf curl_mvprintf
88 #define curlx_mvfprintf curl_mvfprintf
90 #ifdef ENABLE_CURLX_PRINTF
91 /* If this define is set, we define all "standard" printf() functions to use
92 the curlx_* version instead. It makes the source code transparent and
93 easier to understand/patch. Undefine them first. */
105 # define printf curlx_mprintf
106 # define fprintf curlx_mfprintf
107 # define sprintf curlx_msprintf
108 # define msnprintf curlx_msnprintf
109 # define vprintf curlx_mvprintf
110 # define vfprintf curlx_mvfprintf
111 # define mvsnprintf curlx_mvsnprintf
112 # define aprintf curlx_maprintf
113 # define vaprintf curlx_mvaprintf
114 #endif /* ENABLE_CURLX_PRINTF */
116 #endif /* HEADER_CURL_CURLX_H */