Cygwin: wcitoascii: move to wchar.h as inline function
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
0d2ad77c40
commit
77883ac914
|
@ -481,12 +481,6 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob)
|
||||||
return patbuf;
|
return patbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
wcitoascii(char *dst, wint_t *src)
|
|
||||||
{
|
|
||||||
while ((*dst++ = *src++));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The main glob() routine: compiles the pattern (optionally processing
|
* The main glob() routine: compiles the pattern (optionally processing
|
||||||
* quotes), calls glob1() to do the real pattern matching, and finally
|
* quotes), calls glob1() to do the real pattern matching, and finally
|
||||||
|
|
|
@ -52,6 +52,14 @@ size_t wirtomb (char *, wint_t, mbstate_t *);
|
||||||
a UTF-32 value. Defined in strfuncs.cc */
|
a UTF-32 value. Defined in strfuncs.cc */
|
||||||
extern size_t mbrtowi (wint_t *, const char *, size_t, mbstate_t *);
|
extern size_t mbrtowi (wint_t *, const char *, size_t, mbstate_t *);
|
||||||
|
|
||||||
|
/* convert wint_t string to char string, but *only* if the string consists
|
||||||
|
entirely of ASCII chars */
|
||||||
|
static inline void
|
||||||
|
wcitoascii(char *dst, wint_t *src)
|
||||||
|
{
|
||||||
|
while ((*dst++ = *src++));
|
||||||
|
}
|
||||||
|
|
||||||
/* like wcslen, just for wint_t */
|
/* like wcslen, just for wint_t */
|
||||||
static inline size_t
|
static inline size_t
|
||||||
wcilen (const wint_t *wcs)
|
wcilen (const wint_t *wcs)
|
||||||
|
|
Loading…
Reference in New Issue