diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-11-24 22:18:55 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-11-24 22:18:55 +0100 |
commit | 1255925a6121cc5f2f09fbe40f2434ab11cc84f7 (patch) | |
tree | ee08a08c9236fa998d02a45221a3e44641778fdd | |
parent | 336022663a5a38d1dfed6e1dc68d776d1e7e67fe (diff) | |
download | busybox-w32-1255925a6121cc5f2f09fbe40f2434ab11cc84f7.tar.gz busybox-w32-1255925a6121cc5f2f09fbe40f2434ab11cc84f7.tar.bz2 busybox-w32-1255925a6121cc5f2f09fbe40f2434ab11cc84f7.zip |
Move locale, unicode, and "use sendfile?" options to library tuning
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | Config.in | 138 | ||||
-rw-r--r-- | libbb/Config.src | 138 |
2 files changed, 138 insertions, 138 deletions
@@ -147,131 +147,6 @@ config INSTALL_NO_USR | |||
147 | will install applets only to /bin and /sbin, | 147 | will install applets only to /bin and /sbin, |
148 | never to /usr/bin or /usr/sbin. | 148 | never to /usr/bin or /usr/sbin. |
149 | 149 | ||
150 | config LOCALE_SUPPORT | ||
151 | bool "Enable locale support (system needs locale for this to work)" | ||
152 | default n | ||
153 | help | ||
154 | Enable this if your system has locale support and you would like | ||
155 | busybox to support locale settings. | ||
156 | |||
157 | config UNICODE_SUPPORT | ||
158 | bool "Support Unicode" | ||
159 | default y | ||
160 | help | ||
161 | This makes various applets aware that one byte is not | ||
162 | one character on screen. | ||
163 | |||
164 | Busybox aims to eventually work correctly with Unicode displays. | ||
165 | Any older encodings are not guaranteed to work. | ||
166 | Probably by the time when busybox will be fully Unicode-clean, | ||
167 | other encodings will be mainly of historic interest. | ||
168 | |||
169 | config UNICODE_USING_LOCALE | ||
170 | bool "Use libc routines for Unicode (else uses internal ones)" | ||
171 | default n | ||
172 | depends on UNICODE_SUPPORT && LOCALE_SUPPORT | ||
173 | help | ||
174 | With this option on, Unicode support is implemented using libc | ||
175 | routines. Otherwise, internal implementation is used. | ||
176 | Internal implementation is smaller. | ||
177 | |||
178 | config FEATURE_CHECK_UNICODE_IN_ENV | ||
179 | bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables" | ||
180 | default n | ||
181 | depends on UNICODE_SUPPORT && !UNICODE_USING_LOCALE | ||
182 | help | ||
183 | With this option on, Unicode support is activated | ||
184 | only if locale-related variables have the value of the form | ||
185 | "xxxx.utf8" | ||
186 | |||
187 | Otherwise, Unicode support will be always enabled and active. | ||
188 | |||
189 | config SUBST_WCHAR | ||
190 | int "Character code to substitute unprintable characters with" | ||
191 | depends on UNICODE_SUPPORT | ||
192 | default 63 | ||
193 | help | ||
194 | Typical values are 63 for '?' (works with any output device), | ||
195 | 30 for ASCII substitute control code, | ||
196 | 65533 (0xfffd) for Unicode replacement character. | ||
197 | |||
198 | config LAST_SUPPORTED_WCHAR | ||
199 | int "Range of supported Unicode characters" | ||
200 | depends on UNICODE_SUPPORT | ||
201 | default 767 | ||
202 | help | ||
203 | Any character with Unicode value bigger than this is assumed | ||
204 | to be non-printable on output device. Many applets replace | ||
205 | such characters with substitution character. | ||
206 | |||
207 | The idea is that many valid printable Unicode chars | ||
208 | nevertheless are not displayed correctly. Think about | ||
209 | combining charachers, double-wide hieroglyphs, obscure | ||
210 | characters in dozens of ancient scripts... | ||
211 | Many terminals, terminal emulators, xterms etc will fail | ||
212 | to handle them correctly. Choose the smallest value | ||
213 | which suits your needs. | ||
214 | |||
215 | Typical values are: | ||
216 | 126 - ASCII only | ||
217 | 767 (0x2ff) - there are no combining chars in [0..767] range | ||
218 | (the range includes Latin 1, Latin Ext. A and B), | ||
219 | code is ~700 bytes smaller for this case. | ||
220 | 4351 (0x10ff) - there are no double-wide chars in [0..4351] range, | ||
221 | code is ~300 bytes smaller for this case. | ||
222 | 12799 (0x31ff) - nearly all non-ideographic characters are | ||
223 | available in [0..12799] range, including | ||
224 | East Asian scripts like katakana, hiragana, hangul, | ||
225 | bopomofo... | ||
226 | 0 - off, any valid printable Unicode character will be printed. | ||
227 | |||
228 | config UNICODE_COMBINING_WCHARS | ||
229 | bool "Allow zero-width Unicode characters on output" | ||
230 | default n | ||
231 | depends on UNICODE_SUPPORT | ||
232 | help | ||
233 | With this option off, any Unicode char with width of 0 | ||
234 | is substituted on output. | ||
235 | |||
236 | config UNICODE_WIDE_WCHARS | ||
237 | bool "Allow wide Unicode characters on output" | ||
238 | default n | ||
239 | depends on UNICODE_SUPPORT | ||
240 | help | ||
241 | With this option off, any Unicode char with width > 1 | ||
242 | is substituted on output. | ||
243 | |||
244 | config UNICODE_BIDI_SUPPORT | ||
245 | bool "Bidirectional character-aware line input" | ||
246 | default n | ||
247 | depends on UNICODE_SUPPORT && !UNICODE_USING_LOCALE | ||
248 | help | ||
249 | With this option on, right-to-left Unicode characters | ||
250 | are treated differently on input (e.g. cursor movement). | ||
251 | |||
252 | config UNICODE_NEUTRAL_TABLE | ||
253 | bool "In bidi input, support non-ASCII neutral chars too" | ||
254 | default n | ||
255 | depends on UNICODE_BIDI_SUPPORT | ||
256 | help | ||
257 | In most cases it's enough to treat only ASCII non-letters | ||
258 | (i.e. punctuation, numbers and space) as characters | ||
259 | with neutral directionality. | ||
260 | With this option on, more extensive (and bigger) table | ||
261 | of neutral chars will be used. | ||
262 | |||
263 | config UNICODE_PRESERVE_BROKEN | ||
264 | bool "Make it possible to enter sequences of chars which are not Unicode" | ||
265 | default n | ||
266 | depends on UNICODE_SUPPORT | ||
267 | help | ||
268 | With this option on, on line-editing input (such as used by shells) | ||
269 | invalid UTF-8 bytes are not substituted with the selected | ||
270 | substitution character. | ||
271 | For example, this means that entering 'l', 's', ' ', 0xff, [Enter] | ||
272 | at shell prompt will list file named 0xff (single char name | ||
273 | with char value 255), not file named '?'. | ||
274 | |||
275 | config PAM | 150 | config PAM |
276 | bool "Support for PAM (Pluggable Authentication Modules)" | 151 | bool "Support for PAM (Pluggable Authentication Modules)" |
277 | default n | 152 | default n |
@@ -279,19 +154,6 @@ config PAM | |||
279 | Use PAM in some busybox applets (currently login and httpd) instead | 154 | Use PAM in some busybox applets (currently login and httpd) instead |
280 | of direct access to password database. | 155 | of direct access to password database. |
281 | 156 | ||
282 | config FEATURE_USE_SENDFILE | ||
283 | bool "Use sendfile system call" | ||
284 | default y | ||
285 | select PLATFORM_LINUX | ||
286 | help | ||
287 | When enabled, busybox will use the kernel sendfile() function | ||
288 | instead of read/write loops to copy data between file descriptors | ||
289 | (for example, cp command does this a lot). | ||
290 | If sendfile() doesn't work, copying code falls back to read/write | ||
291 | loop. sendfile() was originally implemented for faster I/O | ||
292 | from files to sockets, but since Linux 2.6.33 it was extended | ||
293 | to work for many more file types. | ||
294 | |||
295 | config LONG_OPTS | 157 | config LONG_OPTS |
296 | bool "Support for --long-options" | 158 | bool "Support for --long-options" |
297 | default y | 159 | default y |
diff --git a/libbb/Config.src b/libbb/Config.src index 6ba256290..18a40f2ac 100644 --- a/libbb/Config.src +++ b/libbb/Config.src | |||
@@ -153,6 +153,131 @@ config FEATURE_EDITING_ASK_TERMINAL | |||
153 | correctly, or want to save on code size (about 400 bytes), | 153 | correctly, or want to save on code size (about 400 bytes), |
154 | then do not turn this option on. | 154 | then do not turn this option on. |
155 | 155 | ||
156 | config LOCALE_SUPPORT | ||
157 | bool "Enable locale support (system needs locale for this to work)" | ||
158 | default n | ||
159 | help | ||
160 | Enable this if your system has locale support and you would like | ||
161 | busybox to support locale settings. | ||
162 | |||
163 | config UNICODE_SUPPORT | ||
164 | bool "Support Unicode" | ||
165 | default y | ||
166 | help | ||
167 | This makes various applets aware that one byte is not | ||
168 | one character on screen. | ||
169 | |||
170 | Busybox aims to eventually work correctly with Unicode displays. | ||
171 | Any older encodings are not guaranteed to work. | ||
172 | Probably by the time when busybox will be fully Unicode-clean, | ||
173 | other encodings will be mainly of historic interest. | ||
174 | |||
175 | config UNICODE_USING_LOCALE | ||
176 | bool "Use libc routines for Unicode (else uses internal ones)" | ||
177 | default n | ||
178 | depends on UNICODE_SUPPORT && LOCALE_SUPPORT | ||
179 | help | ||
180 | With this option on, Unicode support is implemented using libc | ||
181 | routines. Otherwise, internal implementation is used. | ||
182 | Internal implementation is smaller. | ||
183 | |||
184 | config FEATURE_CHECK_UNICODE_IN_ENV | ||
185 | bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables" | ||
186 | default n | ||
187 | depends on UNICODE_SUPPORT && !UNICODE_USING_LOCALE | ||
188 | help | ||
189 | With this option on, Unicode support is activated | ||
190 | only if locale-related variables have the value of the form | ||
191 | "xxxx.utf8" | ||
192 | |||
193 | Otherwise, Unicode support will be always enabled and active. | ||
194 | |||
195 | config SUBST_WCHAR | ||
196 | int "Character code to substitute unprintable characters with" | ||
197 | depends on UNICODE_SUPPORT | ||
198 | default 63 | ||
199 | help | ||
200 | Typical values are 63 for '?' (works with any output device), | ||
201 | 30 for ASCII substitute control code, | ||
202 | 65533 (0xfffd) for Unicode replacement character. | ||
203 | |||
204 | config LAST_SUPPORTED_WCHAR | ||
205 | int "Range of supported Unicode characters" | ||
206 | depends on UNICODE_SUPPORT | ||
207 | default 767 | ||
208 | help | ||
209 | Any character with Unicode value bigger than this is assumed | ||
210 | to be non-printable on output device. Many applets replace | ||
211 | such characters with substitution character. | ||
212 | |||
213 | The idea is that many valid printable Unicode chars | ||
214 | nevertheless are not displayed correctly. Think about | ||
215 | combining charachers, double-wide hieroglyphs, obscure | ||
216 | characters in dozens of ancient scripts... | ||
217 | Many terminals, terminal emulators, xterms etc will fail | ||
218 | to handle them correctly. Choose the smallest value | ||
219 | which suits your needs. | ||
220 | |||
221 | Typical values are: | ||
222 | 126 - ASCII only | ||
223 | 767 (0x2ff) - there are no combining chars in [0..767] range | ||
224 | (the range includes Latin 1, Latin Ext. A and B), | ||
225 | code is ~700 bytes smaller for this case. | ||
226 | 4351 (0x10ff) - there are no double-wide chars in [0..4351] range, | ||
227 | code is ~300 bytes smaller for this case. | ||
228 | 12799 (0x31ff) - nearly all non-ideographic characters are | ||
229 | available in [0..12799] range, including | ||
230 | East Asian scripts like katakana, hiragana, hangul, | ||
231 | bopomofo... | ||
232 | 0 - off, any valid printable Unicode character will be printed. | ||
233 | |||
234 | config UNICODE_COMBINING_WCHARS | ||
235 | bool "Allow zero-width Unicode characters on output" | ||
236 | default n | ||
237 | depends on UNICODE_SUPPORT | ||
238 | help | ||
239 | With this option off, any Unicode char with width of 0 | ||
240 | is substituted on output. | ||
241 | |||
242 | config UNICODE_WIDE_WCHARS | ||
243 | bool "Allow wide Unicode characters on output" | ||
244 | default n | ||
245 | depends on UNICODE_SUPPORT | ||
246 | help | ||
247 | With this option off, any Unicode char with width > 1 | ||
248 | is substituted on output. | ||
249 | |||
250 | config UNICODE_BIDI_SUPPORT | ||
251 | bool "Bidirectional character-aware line input" | ||
252 | default n | ||
253 | depends on UNICODE_SUPPORT && !UNICODE_USING_LOCALE | ||
254 | help | ||
255 | With this option on, right-to-left Unicode characters | ||
256 | are treated differently on input (e.g. cursor movement). | ||
257 | |||
258 | config UNICODE_NEUTRAL_TABLE | ||
259 | bool "In bidi input, support non-ASCII neutral chars too" | ||
260 | default n | ||
261 | depends on UNICODE_BIDI_SUPPORT | ||
262 | help | ||
263 | In most cases it's enough to treat only ASCII non-letters | ||
264 | (i.e. punctuation, numbers and space) as characters | ||
265 | with neutral directionality. | ||
266 | With this option on, more extensive (and bigger) table | ||
267 | of neutral chars will be used. | ||
268 | |||
269 | config UNICODE_PRESERVE_BROKEN | ||
270 | bool "Make it possible to enter sequences of chars which are not Unicode" | ||
271 | default n | ||
272 | depends on UNICODE_SUPPORT | ||
273 | help | ||
274 | With this option on, on line-editing input (such as used by shells) | ||
275 | invalid UTF-8 bytes are not substituted with the selected | ||
276 | substitution character. | ||
277 | For example, this means that entering 'l', 's', ' ', 0xff, [Enter] | ||
278 | at shell prompt will list file named 0xff (single char name | ||
279 | with char value 255), not file named '?'. | ||
280 | |||
156 | config FEATURE_NON_POSIX_CP | 281 | config FEATURE_NON_POSIX_CP |
157 | bool "Non-POSIX, but safer, copying to special nodes" | 282 | bool "Non-POSIX, but safer, copying to special nodes" |
158 | default y | 283 | default y |
@@ -177,6 +302,19 @@ config FEATURE_VERBOSE_CP_MESSAGE | |||
177 | cp: cannot stat '/vmlinuz/file': Not a directory | 302 | cp: cannot stat '/vmlinuz/file': Not a directory |
178 | This will cost you ~60 bytes. | 303 | This will cost you ~60 bytes. |
179 | 304 | ||
305 | config FEATURE_USE_SENDFILE | ||
306 | bool "Use sendfile system call" | ||
307 | default y | ||
308 | select PLATFORM_LINUX | ||
309 | help | ||
310 | When enabled, busybox will use the kernel sendfile() function | ||
311 | instead of read/write loops to copy data between file descriptors | ||
312 | (for example, cp command does this a lot). | ||
313 | If sendfile() doesn't work, copying code falls back to read/write | ||
314 | loop. sendfile() was originally implemented for faster I/O | ||
315 | from files to sockets, but since Linux 2.6.33 it was extended | ||
316 | to work for many more file types. | ||
317 | |||
180 | config FEATURE_COPYBUF_KB | 318 | config FEATURE_COPYBUF_KB |
181 | int "Copy buffer size, in kilobytes" | 319 | int "Copy buffer size, in kilobytes" |
182 | range 1 1024 | 320 | range 1 1024 |