/* Internal state used by the functions c32srtombs() and c32snrtombs(). */
mbstate_t _gl_c32srtombs_state
-/* The state must initially be in the "initial state"; so, zero-initialize it.
+/* The state must initially be in an "initial state"; so, zero-initialize it.
On most systems, putting it into BSS is sufficient. Not so on Mac OS X 10.3,
see <https://lists.gnu.org/r/bug-gnulib/2009-01/msg00329.html>.
When it needs an initializer, use 0 or {0} as initializer? 0 only works
new_bufcount = mbf->bufcount;
- /* If mbf->state is not in the initial state, some more 32-bit wide character
+ /* If mbf->state is not in an initial state, some more 32-bit wide character
may be hiding in the state. We need to call mbrtoc32 again. */
if (mbsinit (&mbf->state))
{
iter->cur.bytes = 0;
iter->cur.wc_valid = true;
- /* When in the initial state, we can go back treating ASCII
+ /* When in an initial state, we can go back treating ASCII
characters more quickly. */
if (mbsinit (&iter->state))
iter->in_shift = false;
if (nstate >= (res > 0 ? res : 1))
abort ();
res -= nstate;
- /* Set *ps to the initial state. */
+ /* Set *ps to an initial state. */
# if defined _WIN32 && !defined __CYGWIN__
/* Native Windows. */
/* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4 bytes matter.
buffered bytes (in the range 0..3), followed by up to 3 buffered bytes.
See mbrtowc.c.
- In wc -> mb direction, mbstate_t contains no information. In other
- words, it is always in the initial state. */
+ words, it is always in an initial state. */
static_assert (sizeof (mbstate_t) >= 4);
/* Internal state used by the functions mbsrtoc32s() and mbsnrtoc32s(). */
mbstate_t _gl_mbsrtoc32s_state
-/* The state must initially be in the "initial state"; so, zero-initialize it.
+/* The state must initially be in an "initial state"; so, zero-initialize it.
On most systems, putting it into BSS is sufficient. Not so on Mac OS X 10.3,
see <https://lists.gnu.org/r/bug-gnulib/2009-01/msg00329.html>.
When it needs an initializer, use 0 or {0} as initializer? 0 only works
/* Internal state used by the functions mbsrtowcs() and mbsnrtowcs(). */
mbstate_t _gl_mbsrtowcs_state
-/* The state must initially be in the "initial state"; so, zero-initialize it.
+/* The state must initially be in an "initial state"; so, zero-initialize it.
On most systems, putting it into BSS is sufficient. Not so on Mac OS X 10.3,
see <https://lists.gnu.org/r/bug-gnulib/2009-01/msg00329.html>.
When it needs an initializer, use 0 or {0} as initializer? 0 only works
static inline int
mbtowc_unlocked (wchar_t *pwc, const char *p, size_t m)
{
- /* Put the hidden internal state of mbtowc into its initial state.
+ /* Put the hidden internal state of mbtowc into an initial state.
This is needed at least with glibc, uClibc, and MSVC CRT.
See <https://sourceware.org/bugzilla/show_bug.cgi?id=9674>. */
mbtowc (NULL, NULL, 0);
iter->cur.bytes = 0;
iter->cur.wc_valid = true;
- /* When in the initial state, we can go back treating ASCII
+ /* When in an initial state, we can go back treating ASCII
characters more quickly. */
if (mbsinit (&iter->state))
iter->in_shift = false;
#endif
-/* Test whether *PS is in the initial state. */
+/* Test whether *PS is in an initial state. */
#if @GNULIB_MBSINIT@
# if @REPLACE_MBSINIT@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
#undef wcrtomb
{
/* This implementation of wcrtomb supports only stateless encodings.
- ps must be in the initial state. */
+ ps must be in an initial state. */
if (ps != NULL && !mbsinit (ps))
{
errno = EINVAL;
/* Internal state used by the functions wcsrtombs() and wcsnrtombs(). */
mbstate_t _gl_wcsrtombs_state
-/* The state must initially be in the "initial state"; so, zero-initialize it.
+/* The state must initially be in an "initial state"; so, zero-initialize it.
On most systems, putting it into BSS is sufficient. Not so on Mac OS X 10.3,
see <https://lists.gnu.org/r/bug-gnulib/2009-01/msg00329.html>.
When it needs an initializer, use 0 or {0} as initializer? 0 only works
/* It is OK if this conversion fails. */
if (ret != (size_t)(-1))
{
- /* mbrtoc32 being regular, means that STATE is in the initial state. */
+ /* mbrtoc32 being regular, means that STATE is in an initial state. */
ASSERT (mbsinit (&state));
ret = mbrtoc32 (&c32, "", 0, &state);
/* mbrtoc32 being regular, means that it returns (size_t)(-2), not