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