Lines Matching +full:in +full:- +full:functions
8 - Manipulation of per-thread locales (POSIX)
9 - Locale-aware functions taking an explicit locale argument (Darwin)
14 -----
22 With this in mind, various libc-private functions have been modified to take a
25 variants of these functions, to make it harder for accidental uses of the
26 global-locale versions to slip in.
29 --------------
31 A locale is encapsulated in a `locale_t`, which is an opaque type: a pointer to
37 A locale_t is almost immutable after creation. There are no functions that modify it,
47 with each locale. These are used by various functions that previously had a
54 -----------------
61 constraints as with the pre-xlocale libc. Calls to any locale-aware functions
62 in threads using the global locale, while modifying the global locale, have
70 little more `malloc()` memory, so is not done in the initial version.
73 -------
75 The existing locale implementation included several ad-hoc caching layers.
89 If, in the future, it is determined that caching is beneficial, it can be added
90 quite easily in xlocale.c. Given, however, that any locale-aware call is going
96 ----------
98 The `localeconv()` function is an exception to the immutable-after-creation
99 rule. In the classic implementation, this function returns a pointer to some
101 This is not possible in a multithreaded environment, with multiple locales.
105 still safe on any machine where word-sized stores are atomic: two concurrent
109 ---------------------
111 A large number of functions have been modified to take an explicit `locale_t`
113 to supply the `locale_t` parameter. This is in line with the Darwin public
114 APIs, but also simplifies the modifications to these functions. The
117 if any functions attempt to use them.
119 The ctype.h functions are a little different. These are not implemented in
120 terms of their locale-aware versions, for performance reasons. Each of these
124 --------------------------
127 deprecated functions - we should not be encouraging people to use deprecated
131 -------------------
133 The pointer values 0 and -1 have special meanings as `locale_t` values. Any
135 macro on it before using it. For efficiency, this can be emitted in functions
140 ----------------------
143 fairly expensive to use any of the ctype.h functions. We could improve this
144 quite a lot by storing the rune locale data in a __thread-qualified variable.
146 Several of the existing FreeBSD locale-aware functions appear to be wrong. For
149 that does not put numbers and the letters A-F in the same location as ASCII.
150 Some functions, like `strcoll()` only work on single-byte encodings. No
151 attempt has been made to fix existing limitations in the libc functions other
154 Intuitively, setting a thread-local locale should ensure that all locale-aware
155 functions can be used safely from that thread. In fact, this is not the case
156 in either this implementation or the Darwin one. You must call `duplocale()`