|
| 1 | +menu "klibc options" |
| 2 | + |
| 3 | + comment "------------rt_memset options------------" |
| 4 | + config RT_KLIBC_USING_USER_MEMSET |
| 5 | + bool "Enable rt_memset to use user-defined version" |
| 6 | + default n |
| 7 | + |
| 8 | + if !RT_KLIBC_USING_USER_MEMSET |
| 9 | + config RT_KLIBC_USING_LIBC_MEMSET |
| 10 | + bool "Enable rt_memset to use libc memset" |
| 11 | + default n |
| 12 | + |
| 13 | + config RT_KLIBC_USING_TINY_MEMSET |
| 14 | + bool "Enable rt_memset to use tiny version" |
| 15 | + depends on !RT_KLIBC_USING_LIBC_MEMSET |
| 16 | + default n |
| 17 | + endif |
| 18 | + |
| 19 | + comment "------------rt_memcpy options------------" |
| 20 | + config RT_KLIBC_USING_USER_MEMCPY |
| 21 | + bool "Enable rt_memcpy to use user-defined version" |
| 22 | + default n |
| 23 | + |
| 24 | + if !RT_KLIBC_USING_USER_MEMCPY |
| 25 | + config RT_KLIBC_USING_LIBC_MEMCPY |
| 26 | + bool "Enable rt_memcpy to use libc memcpy" |
| 27 | + default n |
| 28 | + |
| 29 | + config RT_KLIBC_USING_TINY_MEMCPY |
| 30 | + bool "Enable rt_memcpy to use tiny version" |
| 31 | + depends on !RT_KLIBC_USING_LIBC_MEMCPY |
| 32 | + default n |
| 33 | + endif |
| 34 | + |
| 35 | + comment "------------rt_memmove options------------" |
| 36 | + config RT_KLIBC_USING_USER_MEMMOVE |
| 37 | + bool "Enable rt_memmove to use user-defined version" |
| 38 | + default n |
| 39 | + |
| 40 | + if !RT_KLIBC_USING_USER_MEMMOVE |
| 41 | + config RT_KLIBC_USING_LIBC_MEMMOVE |
| 42 | + bool "Enable rt_memmove to use libc memmove" |
| 43 | + default n |
| 44 | + endif |
| 45 | + |
| 46 | + comment "------------rt_memcmp options------------" |
| 47 | + config RT_KLIBC_USING_USER_MEMCMP |
| 48 | + bool "Enable rt_memcmp to use user-defined version" |
| 49 | + default n |
| 50 | + |
| 51 | + if !RT_KLIBC_USING_USER_MEMCMP |
| 52 | + config RT_KLIBC_USING_LIBC_MEMCMP |
| 53 | + bool "Enable rt_memcmp to use libc memcmp" |
| 54 | + default n |
| 55 | + endif |
| 56 | + |
| 57 | + comment "------------rt_strstr options------------" |
| 58 | + config RT_KLIBC_USING_USER_STRSTR |
| 59 | + bool "Enable rt_strstr to use user-defined version" |
| 60 | + default n |
| 61 | + |
| 62 | + if !RT_KLIBC_USING_USER_STRSTR |
| 63 | + config RT_KLIBC_USING_LIBC_STRSTR |
| 64 | + bool "Enable rt_strstr to use libc strstr" |
| 65 | + default n |
| 66 | + endif |
| 67 | + |
| 68 | + comment "------------rt_strcasecmp options------------" |
| 69 | + config RT_KLIBC_USING_USER_STRCASECMP |
| 70 | + bool "Enable rt_strcasecmp to use user-defined version" |
| 71 | + default n |
| 72 | + |
| 73 | + comment "------------rt_strncpy options------------" |
| 74 | + config RT_KLIBC_USING_USER_STRNCPY |
| 75 | + bool "Enable rt_strncpy to use user-defined version" |
| 76 | + default n |
| 77 | + |
| 78 | + if !RT_KLIBC_USING_USER_STRNCPY |
| 79 | + config RT_KLIBC_USING_LIBC_STRNCPY |
| 80 | + bool "Enable rt_strncpy to use libc strncpy" |
| 81 | + default n |
| 82 | + endif |
| 83 | + |
| 84 | + comment "------------rt_strcpy options------------" |
| 85 | + config RT_KLIBC_USING_USER_STRCPY |
| 86 | + bool "Enable rt_strcpy to use user-defined version" |
| 87 | + default n |
| 88 | + |
| 89 | + if !RT_KLIBC_USING_USER_STRCPY |
| 90 | + config RT_KLIBC_USING_LIBC_STRCPY |
| 91 | + bool "Enable rt_strcpy to use libc strcpy" |
| 92 | + default n |
| 93 | + endif |
| 94 | + |
| 95 | + comment "------------rt_strncmp options------------" |
| 96 | + config RT_KLIBC_USING_USER_STRNCMP |
| 97 | + bool "Enable rt_strncmp to use user-defined version" |
| 98 | + default n |
| 99 | + |
| 100 | + if !RT_KLIBC_USING_USER_STRNCMP |
| 101 | + config RT_KLIBC_USING_LIBC_STRNCMP |
| 102 | + bool "Enable rt_strncmp to use libc strncmp" |
| 103 | + default n |
| 104 | + endif |
| 105 | + |
| 106 | + comment "------------rt_strcmp options------------" |
| 107 | + config RT_KLIBC_USING_USER_STRCMP |
| 108 | + bool "Enable rt_strcmp to use user-defined version" |
| 109 | + default n |
| 110 | + |
| 111 | + if !RT_KLIBC_USING_USER_STRCMP |
| 112 | + config RT_KLIBC_USING_LIBC_STRCMP |
| 113 | + bool "Enable rt_strcmp to use libc strcmp" |
| 114 | + default n |
| 115 | + endif |
| 116 | + |
| 117 | + comment "------------rt_strlen options------------" |
| 118 | + config RT_KLIBC_USING_USER_STRLEN |
| 119 | + bool "Enable rt_strlen to use user-defined version" |
| 120 | + default n |
| 121 | + |
| 122 | + if !RT_KLIBC_USING_USER_STRLEN |
| 123 | + config RT_KLIBC_USING_LIBC_STRLEN |
| 124 | + bool "Enable rt_strlen to use libc strlen" |
| 125 | + default n |
| 126 | + endif |
| 127 | + |
| 128 | + comment "------------rt_strlen options------------" |
| 129 | + config RT_KLIBC_USING_USER_STRLEN |
| 130 | + bool "Enable rt_strlen to use user-defined version" |
| 131 | + default n |
| 132 | + |
| 133 | + if !RT_KLIBC_USING_USER_STRLEN |
| 134 | + config RT_KLIBC_USING_LIBC_STRLEN |
| 135 | + bool "Enable rt_strlen to use libc strlen" |
| 136 | + default n |
| 137 | + endif |
| 138 | + |
| 139 | + comment "------------rt_strnlen options------------" |
| 140 | + config RT_KLIBC_USING_USER_STRNLEN |
| 141 | + bool "Enable rt_strnlen to use user-defined version" |
| 142 | + default n |
| 143 | + |
| 144 | + comment "------------rt_vsscanf options------------" |
| 145 | + config RT_KLIBC_USING_LIBC_VSSCANF |
| 146 | + bool "Enable rt_vsscanf to use libc vsscanf" |
| 147 | + default n |
| 148 | + |
| 149 | + comment "------------rt_vsnprintf options------------" |
| 150 | + config RT_KLIBC_USING_LIBC_VSNPRINTF |
| 151 | + bool "Enable rt_vsnprintf to use libc vsscanf" |
| 152 | + default n |
| 153 | + |
| 154 | + config RT_KLIBC_USING_VSNPRINTF_LONGLONG |
| 155 | + bool "Enable rt_vsnprintf function to support long-long format" |
| 156 | + depends on !RT_KLIBC_USING_LIBC_VSNPRINTF |
| 157 | + default n |
| 158 | + help |
| 159 | + Support for the long long integral types (with the ll, z and t length modifiers for specifiers |
| 160 | + %d,%i,%o,%x,%X,%u, and with the %p specifier). Note: 'L' (long double) is not supported. |
| 161 | + |
| 162 | + menuconfig RT_KLIBC_USING_VSNPRINTF_STANDARD |
| 163 | + bool "Enable standard rt_vsnprintf version" |
| 164 | + default y if ARCH_CPU_64BIT |
| 165 | + default n |
| 166 | + select RT_KLIBC_USING_VSNPRINTF_LONGLONG |
| 167 | + depends on !RT_KLIBC_USING_LIBC_VSNPRINTF |
| 168 | + help |
| 169 | + Standard version of rt_vsnprintf, which is full function but higher stack usage. |
| 170 | + |
| 171 | + if RT_KLIBC_USING_VSNPRINTF_STANDARD |
| 172 | + |
| 173 | + config RT_KLIBC_USING_VSNPRINTF_DECIMAL_SPECIFIERS |
| 174 | + bool "Support decimal notation floating point conversion specifiers (%f, %F)" |
| 175 | + default y |
| 176 | + help |
| 177 | + Support for the decimal notation floating point conversion specifiers (%f, %F) |
| 178 | + |
| 179 | + config RT_KLIBC_USING_VSNPRINTF_EXPONENTIAL_SPECIFIERS |
| 180 | + bool "Support exponential notation floating point conversion specifiers (%e, %g, %E, %G)" |
| 181 | + default y |
| 182 | + help |
| 183 | + Support for the exponential notation floating point conversion specifiers (%e, %g, %E, %G) |
| 184 | + |
| 185 | + config RT_KLIBC_USING_VSNPRINTF_WRITEBACK_SPECIFIER |
| 186 | + bool "Support length write-back specifier (%n)" |
| 187 | + default y |
| 188 | + help |
| 189 | + Support for the length write-back specifier (%n) |
| 190 | + |
| 191 | + config RT_KLIBC_USING_VSNPRINTF_CHECK_NUL_IN_FORMAT_SPECIFIER |
| 192 | + bool "safety check: no NULL end string" |
| 193 | + default y if RT_USING_DEBUG |
| 194 | + default n |
| 195 | + help |
| 196 | + Be extra-safe, and don't assume format specifiers are completed correctly |
| 197 | + before the format string end. |
| 198 | + |
| 199 | + config RT_KLIBC_USING_VSNPRINTF_MSVC_STYLE_INTEGER_SPECIFIERS |
| 200 | + bool "Support MSVC style integer specifiers" |
| 201 | + default n |
| 202 | + help |
| 203 | + the integer format specifiers used in Microsoft's Visual C++ (MSVC) compiler. |
| 204 | + These specifiers, like %I64d for 64-bit integers, deviate slightly from the standard |
| 205 | + C format specifiers and are specific to MSVC. They allow for controlled formatting of |
| 206 | + integers in printf()-like functions, accommodating different integer sizes and ensuring |
| 207 | + compatibility with MSVC's environment. It's important to note that these specifiers might |
| 208 | + not be recognized or function in other compilers due to their MSVC-specific nature. |
| 209 | + |
| 210 | + config RT_KLIBC_USING_VSNPRINTF_INTEGER_BUFFER_SIZE |
| 211 | + int "'ntoa' conversion buffer size" |
| 212 | + default 32 |
| 213 | + help |
| 214 | + 'ntoa' conversion buffer size, this must be big enough to hold one converted |
| 215 | + numeric number including padded zeros (dynamically created on stack) |
| 216 | + |
| 217 | + config RT_KLIBC_USING_VSNPRINTF_DECIMAL_BUFFER_SIZE |
| 218 | + int "printing individual decimal numbers buffer size" |
| 219 | + default 32 |
| 220 | + help |
| 221 | + size of the fixed (on-stack) buffer for printing individual decimal numbers. |
| 222 | + this must be big enough to hold one converted floating-point value including |
| 223 | + padded zeros. |
| 224 | + |
| 225 | + config RT_KLIBC_USING_VSNPRINTF_FLOAT_PRECISION |
| 226 | + int "floating point conversion specifiers" |
| 227 | + default 6 |
| 228 | + help |
| 229 | + Default precision for the floating point conversion specifiers (the C standard sets this at 6) |
| 230 | + |
| 231 | + config RT_KLIBC_USING_VSNPRINTF_MAX_INTEGRAL_DIGITS_FOR_DECIMAL |
| 232 | + int "integral nums printed as float in rt_vsnprint" |
| 233 | + default 9 |
| 234 | + help |
| 235 | + According to the C languages standard, printf() and related functions must be able to print any |
| 236 | + integral number in floating-point notation, regardless of length, when using the %f specifier - |
| 237 | + possibly hundreds of characters, potentially overflowing your buffers. In this implementation, |
| 238 | + all values beyond this threshold are switched to exponential notation. |
| 239 | + |
| 240 | + config RT_KLIBC_USING_VSNPRINTF_LOG10_TAYLOR_TERMS |
| 241 | + int "the number of terms in a Taylor series expansion of log_10(x)" |
| 242 | + default 4 |
| 243 | + range 2 99 |
| 244 | + help |
| 245 | + The number of terms in a Taylor series expansion of log_10(x) to |
| 246 | + use for approximation - including the power-zero term (i.e. the |
| 247 | + value at the point of expansion). |
| 248 | + |
| 249 | + endif |
| 250 | +endmenu |
0 commit comments