mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-16 15:11:52 +00:00
Add setlocale LC_CTYPE
This commit is contained in:
parent
ff501b3580
commit
404392d45c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11871
@ -19,6 +19,9 @@ with groff; see the file COPYING. If not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <ctype.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <locale.h>
|
||||
#endif
|
||||
#include "cmap.h"
|
||||
|
||||
cmap cmlower(CMAP_BUILTIN);
|
||||
@ -49,6 +52,9 @@ cmap_init::cmap_init()
|
||||
if (initialised)
|
||||
return;
|
||||
initialised = 1;
|
||||
#ifdef __FreeBSD__
|
||||
(void) setlocale(LC_CTYPE, "");
|
||||
#endif
|
||||
for (int i = 0; i <= UCHAR_MAX; i++) {
|
||||
cmupper.v[i] = ISASCII(i) && islower(i) ? toupper(i) : i;
|
||||
cmlower.v[i] = ISASCII(i) && isupper(i) ? tolower(i) : i;
|
||||
|
@ -19,6 +19,9 @@ with groff; see the file COPYING. If not, write to the Free Software
|
||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <ctype.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <locale.h>
|
||||
#endif
|
||||
#include "cset.h"
|
||||
|
||||
cset csalpha(CSET_BUILTIN);
|
||||
@ -86,6 +89,9 @@ cset_init::cset_init()
|
||||
if (initialised)
|
||||
return;
|
||||
initialised = 1;
|
||||
#ifdef __FreeBSD__
|
||||
(void) setlocale(LC_CTYPE, "");
|
||||
#endif
|
||||
for (int i = 0; i <= UCHAR_MAX; i++) {
|
||||
csalpha.v[i] = ISASCII(i) && isalpha(i);
|
||||
csupper.v[i] = ISASCII(i) && isupper(i);
|
||||
|
Loading…
Reference in New Issue
Block a user