Lines Matching refs:locale
1 /* $NetBSD: hard-locale.c,v 1.1.1.1 2016/01/13 03:15:30 christos Exp $ */
3 /* hard-locale.c -- Determine whether a locale is hard.
26 # include <locale.h>
37 #include "hard-locale.h"
39 /* Return nonzero if the current CATEGORY locale is hard, i.e. if you
57 char *locale = malloc (strlen (p) + 1);
58 if (locale)
60 strcpy (locale, p);
62 /* Temporarily set the locale to the "C" and "POSIX" locales
64 or the other is the caller's locale. */
66 && strcmp (p, locale) == 0)
68 && strcmp (p, locale) == 0))
71 /* Restore the caller's locale. */
72 setlocale (category, locale);
73 free (locale);