Bertrand SIMONNET | e6cd738 | 2015-07-01 15:39:44 -0700 | [diff] [blame] | 1 | #ifndef HEADER_CURL_CURLX_H |
| 2 | #define HEADER_CURL_CURLX_H |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 3 | /*************************************************************************** |
| 4 | * _ _ ____ _ |
| 5 | * Project ___| | | | _ \| | |
| 6 | * / __| | | | |_) | | |
| 7 | * | (__| |_| | _ <| |___ |
| 8 | * \___|\___/|_| \_\_____| |
| 9 | * |
Alex Deymo | 486467e | 2017-12-19 19:04:07 +0100 | [diff] [blame] | 10 | * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 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 |
Alex Deymo | 8f1a214 | 2016-06-28 14:49:26 -0700 | [diff] [blame] | 14 | * are also available at https://curl.haxx.se/docs/copyright.html. |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 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 | ***************************************************************************/ |
| 24 | |
| 25 | /* |
| 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 |
| 29 | * be. |
| 30 | */ |
| 31 | |
| 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- |
| 35 | private one day */ |
| 36 | |
Elliott Hughes | cee0338 | 2017-06-23 12:17:18 -0700 | [diff] [blame] | 37 | #include "strcase.h" |
| 38 | /* "strcase.h" provides the strcasecompare protos */ |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 39 | |
| 40 | #include "strtoofft.h" |
| 41 | /* "strtoofft.h" provides this function: curlx_strtoofft(), returns a |
| 42 | curl_off_t number from a given string. |
| 43 | */ |
| 44 | |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 45 | #include "nonblock.h" |
| 46 | /* "nonblock.h" provides curlx_nonblock() */ |
| 47 | |
| 48 | #include "warnless.h" |
| 49 | /* "warnless.h" provides functions: |
| 50 | |
| 51 | curlx_ultous() |
| 52 | curlx_ultouc() |
| 53 | curlx_uztosi() |
| 54 | */ |
| 55 | |
| 56 | /* Now setup curlx_ * names for the functions that are to become curlx_ and |
| 57 | be removed from a future libcurl official API: |
| 58 | curlx_getenv |
| 59 | curlx_mprintf (and its variations) |
Elliott Hughes | cee0338 | 2017-06-23 12:17:18 -0700 | [diff] [blame] | 60 | curlx_strcasecompare |
| 61 | curlx_strncasecompare |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 62 | |
| 63 | */ |
| 64 | |
| 65 | #define curlx_getenv curl_getenv |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 66 | #define curlx_mvsnprintf curl_mvsnprintf |
| 67 | #define curlx_msnprintf curl_msnprintf |
| 68 | #define curlx_maprintf curl_maprintf |
| 69 | #define curlx_mvaprintf curl_mvaprintf |
| 70 | #define curlx_msprintf curl_msprintf |
| 71 | #define curlx_mprintf curl_mprintf |
| 72 | #define curlx_mfprintf curl_mfprintf |
| 73 | #define curlx_mvsprintf curl_mvsprintf |
| 74 | #define curlx_mvprintf curl_mvprintf |
| 75 | #define curlx_mvfprintf curl_mvfprintf |
| 76 | |
| 77 | #ifdef ENABLE_CURLX_PRINTF |
| 78 | /* If this define is set, we define all "standard" printf() functions to use |
Bertrand SIMONNET | e6cd738 | 2015-07-01 15:39:44 -0700 | [diff] [blame] | 79 | the curlx_* version instead. It makes the source code transparent and |
| 80 | easier to understand/patch. Undefine them first. */ |
Kristian Monsen | 5ab5018 | 2010-05-14 18:53:44 +0100 | [diff] [blame] | 81 | # undef printf |
| 82 | # undef fprintf |
| 83 | # undef sprintf |
| 84 | # undef snprintf |
| 85 | # undef vprintf |
| 86 | # undef vfprintf |
| 87 | # undef vsprintf |
| 88 | # undef vsnprintf |
| 89 | # undef aprintf |
| 90 | # undef vaprintf |
| 91 | |
| 92 | # define printf curlx_mprintf |
| 93 | # define fprintf curlx_mfprintf |
| 94 | # define sprintf curlx_msprintf |
| 95 | # define snprintf curlx_msnprintf |
| 96 | # define vprintf curlx_mvprintf |
| 97 | # define vfprintf curlx_mvfprintf |
| 98 | # define vsprintf curlx_mvsprintf |
| 99 | # define vsnprintf curlx_mvsnprintf |
| 100 | # define aprintf curlx_maprintf |
| 101 | # define vaprintf curlx_mvaprintf |
| 102 | #endif /* ENABLE_CURLX_PRINTF */ |
| 103 | |
Bertrand SIMONNET | e6cd738 | 2015-07-01 15:39:44 -0700 | [diff] [blame] | 104 | #endif /* HEADER_CURL_CURLX_H */ |
| 105 | |