113498266Sopenharmony_ci#ifndef HEADER_CURL_CURLX_H
213498266Sopenharmony_ci#define HEADER_CURL_CURLX_H
313498266Sopenharmony_ci/***************************************************************************
413498266Sopenharmony_ci *                                  _   _ ____  _
513498266Sopenharmony_ci *  Project                     ___| | | |  _ \| |
613498266Sopenharmony_ci *                             / __| | | | |_) | |
713498266Sopenharmony_ci *                            | (__| |_| |  _ <| |___
813498266Sopenharmony_ci *                             \___|\___/|_| \_\_____|
913498266Sopenharmony_ci *
1013498266Sopenharmony_ci * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
1113498266Sopenharmony_ci *
1213498266Sopenharmony_ci * This software is licensed as described in the file COPYING, which
1313498266Sopenharmony_ci * you should have received as part of this distribution. The terms
1413498266Sopenharmony_ci * are also available at https://curl.se/docs/copyright.html.
1513498266Sopenharmony_ci *
1613498266Sopenharmony_ci * You may opt to use, copy, modify, merge, publish, distribute and/or sell
1713498266Sopenharmony_ci * copies of the Software, and permit persons to whom the Software is
1813498266Sopenharmony_ci * furnished to do so, under the terms of the COPYING file.
1913498266Sopenharmony_ci *
2013498266Sopenharmony_ci * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
2113498266Sopenharmony_ci * KIND, either express or implied.
2213498266Sopenharmony_ci *
2313498266Sopenharmony_ci * SPDX-License-Identifier: curl
2413498266Sopenharmony_ci *
2513498266Sopenharmony_ci ***************************************************************************/
2613498266Sopenharmony_ci
2713498266Sopenharmony_ci/*
2813498266Sopenharmony_ci * Defines protos and includes all header files that provide the curlx_*
2913498266Sopenharmony_ci * functions. The curlx_* functions are not part of the libcurl API, but are
3013498266Sopenharmony_ci * stand-alone functions whose sources can be built and linked by apps if need
3113498266Sopenharmony_ci * be.
3213498266Sopenharmony_ci */
3313498266Sopenharmony_ci
3413498266Sopenharmony_ci#include <curl/mprintf.h>
3513498266Sopenharmony_ci/* this is still a public header file that provides the curl_mprintf()
3613498266Sopenharmony_ci   functions while they still are offered publicly. They will be made library-
3713498266Sopenharmony_ci   private one day */
3813498266Sopenharmony_ci
3913498266Sopenharmony_ci#include "strcase.h"
4013498266Sopenharmony_ci/* "strcase.h" provides the strcasecompare protos */
4113498266Sopenharmony_ci
4213498266Sopenharmony_ci#include "strtoofft.h"
4313498266Sopenharmony_ci/* "strtoofft.h" provides this function: curlx_strtoofft(), returns a
4413498266Sopenharmony_ci   curl_off_t number from a given string.
4513498266Sopenharmony_ci*/
4613498266Sopenharmony_ci
4713498266Sopenharmony_ci#include "nonblock.h"
4813498266Sopenharmony_ci/* "nonblock.h" provides curlx_nonblock() */
4913498266Sopenharmony_ci
5013498266Sopenharmony_ci#include "warnless.h"
5113498266Sopenharmony_ci/* "warnless.h" provides functions:
5213498266Sopenharmony_ci
5313498266Sopenharmony_ci  curlx_ultous()
5413498266Sopenharmony_ci  curlx_ultouc()
5513498266Sopenharmony_ci  curlx_uztosi()
5613498266Sopenharmony_ci*/
5713498266Sopenharmony_ci
5813498266Sopenharmony_ci#include "curl_multibyte.h"
5913498266Sopenharmony_ci/* "curl_multibyte.h" provides these functions and macros:
6013498266Sopenharmony_ci
6113498266Sopenharmony_ci  curlx_convert_UTF8_to_wchar()
6213498266Sopenharmony_ci  curlx_convert_wchar_to_UTF8()
6313498266Sopenharmony_ci  curlx_convert_UTF8_to_tchar()
6413498266Sopenharmony_ci  curlx_convert_tchar_to_UTF8()
6513498266Sopenharmony_ci  curlx_unicodefree()
6613498266Sopenharmony_ci*/
6713498266Sopenharmony_ci
6813498266Sopenharmony_ci#include "version_win32.h"
6913498266Sopenharmony_ci/* "version_win32.h" provides curlx_verify_windows_version() */
7013498266Sopenharmony_ci
7113498266Sopenharmony_ci/* Now setup curlx_ * names for the functions that are to become curlx_ and
7213498266Sopenharmony_ci   be removed from a future libcurl official API:
7313498266Sopenharmony_ci   curlx_getenv
7413498266Sopenharmony_ci   curlx_mprintf (and its variations)
7513498266Sopenharmony_ci   curlx_strcasecompare
7613498266Sopenharmony_ci   curlx_strncasecompare
7713498266Sopenharmony_ci
7813498266Sopenharmony_ci*/
7913498266Sopenharmony_ci
8013498266Sopenharmony_ci#define curlx_getenv curl_getenv
8113498266Sopenharmony_ci#define curlx_mvsnprintf curl_mvsnprintf
8213498266Sopenharmony_ci#define curlx_msnprintf curl_msnprintf
8313498266Sopenharmony_ci#define curlx_maprintf curl_maprintf
8413498266Sopenharmony_ci#define curlx_mvaprintf curl_mvaprintf
8513498266Sopenharmony_ci#define curlx_msprintf curl_msprintf
8613498266Sopenharmony_ci#define curlx_mprintf curl_mprintf
8713498266Sopenharmony_ci#define curlx_mfprintf curl_mfprintf
8813498266Sopenharmony_ci#define curlx_mvsprintf curl_mvsprintf
8913498266Sopenharmony_ci#define curlx_mvprintf curl_mvprintf
9013498266Sopenharmony_ci#define curlx_mvfprintf curl_mvfprintf
9113498266Sopenharmony_ci
9213498266Sopenharmony_ci#ifdef ENABLE_CURLX_PRINTF
9313498266Sopenharmony_ci/* If this define is set, we define all "standard" printf() functions to use
9413498266Sopenharmony_ci   the curlx_* version instead. It makes the source code transparent and
9513498266Sopenharmony_ci   easier to understand/patch. Undefine them first. */
9613498266Sopenharmony_ci# undef printf
9713498266Sopenharmony_ci# undef fprintf
9813498266Sopenharmony_ci# undef sprintf
9913498266Sopenharmony_ci# undef msnprintf
10013498266Sopenharmony_ci# undef vprintf
10113498266Sopenharmony_ci# undef vfprintf
10213498266Sopenharmony_ci# undef vsprintf
10313498266Sopenharmony_ci# undef mvsnprintf
10413498266Sopenharmony_ci# undef aprintf
10513498266Sopenharmony_ci# undef vaprintf
10613498266Sopenharmony_ci
10713498266Sopenharmony_ci# define printf curlx_mprintf
10813498266Sopenharmony_ci# define fprintf curlx_mfprintf
10913498266Sopenharmony_ci# define sprintf curlx_msprintf
11013498266Sopenharmony_ci# define msnprintf curlx_msnprintf
11113498266Sopenharmony_ci# define vprintf curlx_mvprintf
11213498266Sopenharmony_ci# define vfprintf curlx_mvfprintf
11313498266Sopenharmony_ci# define mvsnprintf curlx_mvsnprintf
11413498266Sopenharmony_ci# define aprintf curlx_maprintf
11513498266Sopenharmony_ci# define vaprintf curlx_mvaprintf
11613498266Sopenharmony_ci#endif /* ENABLE_CURLX_PRINTF */
11713498266Sopenharmony_ci
11813498266Sopenharmony_ci#endif /* HEADER_CURL_CURLX_H */
119