* mingwex/mbrtowc.c: New file.
* mingwex/wcrtomb.c: New file. * mingwex/btowc.c: New file. * mingwex/wctob.c: New file. * mingwex/mb_wc_common.h: New file. * mingwex/Makefile.in (DISTFILES): Add new files. (Q8_OBJS): Add new objects. * include/wchar.h: Adjust comment about mbrtowc() and related funcions. Add __restrict__ to pointer params in prototypes. (wmemset. wmemchr, wmemcpy, wmemmove, wcstoll, wcstoull): Remove arg names from protototypes.
This commit is contained in:
18
winsup/mingw/mingwex/mb_wc_common.h
Executable file
18
winsup/mingw/mingwex/mb_wc_common.h
Executable file
@@ -0,0 +1,18 @@
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static inline
|
||||
unsigned int get_cp_from_locale (void)
|
||||
{
|
||||
char* cp_string;
|
||||
/*
|
||||
locale :: "lang[_country[.code_page]]"
|
||||
| ".code_page"
|
||||
|
||||
*/
|
||||
|
||||
if ((cp_string = strchr(setlocale(LC_CTYPE, NULL), '.')))
|
||||
return ((unsigned) atoi (cp_string + 1));
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user