Kconfig 9.8 KB

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