5 #include <stl/c_locale.h>
12 /* Structure describing locale data in core for a category. */
13 /* GLIBC internal, see <glibc catalog>/locale/localeinfo.h */
14 #if (__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ > 2))
20 const char *filedata; /* Region mapping the file data. */
21 off_t filesize; /* Size of the file (and the region). */
22 enum /* Flavor of storage used for those. */
24 ld_malloced, /* Both are malloc'd. */
25 ld_mapped, /* name is malloc'd, filedata mmap'd */
26 ld_archive /* Both point into mmap'd archive regions. */
29 /* This provides a slot for category-specific code to cache data computed
30 * about this locale. That code can set a cleanup function to deallocate
34 void (*cleanup) (struct locale_data *);
38 struct lc_time_data *time;
39 const struct gconv_fcts *ctype;
44 unsigned int usage_count; /* Counter for users. */
46 int use_translit; /* Nonzero if the mb*towv*() and wc*tomb()
47 functions should use transliteration. */
49 unsigned int nstrings; /* Number of strings below. */
50 union locale_data_value
54 unsigned int word; /* Note endian issues vs 64-bit pointers. */
56 values[1]; /* Items, usually pointers into `filedata'. */
59 #else /* GLIBC 2.2.x */
64 const char *filedata; /* Region mapping the file data. */
65 off_t filesize; /* Size of the file (and the region). */
66 int mmaped; /* If nonzero the data is mmaped. */
68 unsigned int usage_count; /* Counter for users. */
70 int use_translit; /* Nonzero if the mb*towv*() and wc*tomb()
71 functions should use transliteration. */
72 const char *options; /* Extra options from the locale name,
73 not used in the path to the locale data. */
75 unsigned int nstrings; /* Number of strings below. */
76 union locale_data_value
82 values[1]; /* Items, usually pointers into `filedata'. */
88 typedef __locale_t __c_locale;
90 #if (__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ > 2))
91 # define __nl_langinfo_l nl_langinfo_l
94 #if (__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ > 2))
95 # define __LOCALE_CREATE(nm,category) (void*)newlocale(1 << category, nm, NULL )
96 # define __LOCALE_DESTROY(__loc) freelocale((__c_locale)__loc)
98 # define __LOCALE_CREATE(nm,category) (void*)__newlocale(1 << category, nm, NULL )
99 # define __LOCALE_DESTROY(__loc) __freelocale((__c_locale)__loc)
102 static const char *_empty_str = "";
103 static const char *_C_name = "C";
112 struct _Locale_numeric
122 struct _Locale_collate
127 struct _Locale_monetary
132 struct _Locale_messages
144 void *_Locale_ctype_create( const char *nm, struct _Locale_name_hint* hint )
145 { return __LOCALE_CREATE( nm, LC_CTYPE ); }
147 void* _Locale_numeric_create( const char *nm, struct _Locale_name_hint* hint )
148 { return __LOCALE_CREATE( nm, LC_NUMERIC ); }
150 void* _Locale_time_create( const char *nm, struct _Locale_name_hint* hint )
151 { return __LOCALE_CREATE( nm, LC_TIME ); }
153 void *_Locale_collate_create( const char *nm, struct _Locale_name_hint* hint )
154 { return __LOCALE_CREATE( nm, LC_COLLATE ); }
156 void *_Locale_monetary_create( const char *nm, struct _Locale_name_hint* hint )
157 { return __LOCALE_CREATE( nm, LC_MONETARY ); }
159 void *_Locale_messages_create( const char *nm, struct _Locale_name_hint* hint )
160 { return __LOCALE_CREATE( nm, LC_MESSAGES ); }
163 try to see locale category LC should be used from environment;
164 according POSIX, the order is
166 2. category (LC_CTYPE, LC_NUMERIC, ... )
168 If set nothing, return "C" (this really implemetation-specific).
170 const char *_Locale_aux_default( const char *LC, char *nm )
172 char *name = getenv( "LC_ALL" );
174 if ( name != NULL && *name != 0 ) {
175 return strncpy( nm, name, _Locale_MAX_SIMPLE_NAME );
178 if ( name != NULL && *name != 0 ) {
179 return strncpy( nm, name, _Locale_MAX_SIMPLE_NAME );
181 name = getenv( "LANG" );
182 if ( name != NULL && *name != 0 ) {
183 return strncpy( nm, name, _Locale_MAX_SIMPLE_NAME );
186 return strcpy( nm, "C" );
189 const char *_Locale_ctype_default( char *nm )
191 return _Locale_aux_default( "LC_CTYPE", nm );
194 const char *_Locale_numeric_default( char *nm )
196 return _Locale_aux_default( "LC_NUMERIC", nm );
199 const char *_Locale_time_default( char *nm )
201 return _Locale_aux_default( "LC_TIME", nm );
204 const char *_Locale_collate_default( char *nm )
206 return _Locale_aux_default( "LC_COLLATE", nm );
209 const char *_Locale_monetary_default( char *nm )
211 return _Locale_aux_default( "LC_MONETARY", nm );
214 const char *_Locale_messages_default( char *nm )
216 return _Locale_aux_default( "LC_MESSAGES", nm );
219 char const*_Locale_ctype_name( const void *__loc, char *buf )
221 return __loc != 0 ? strncpy( buf, ((__c_locale)__loc)->__locales[LC_CTYPE]->name, _Locale_MAX_SIMPLE_NAME ) : 0;
224 char const*_Locale_numeric_name( const void *__loc, char *buf )
226 return __loc != 0 ? strncpy( buf, ((__c_locale)__loc)->__locales[LC_NUMERIC]->name, _Locale_MAX_SIMPLE_NAME ) : 0;
229 char const*_Locale_time_name( const void *__loc, char *buf )
231 return __loc != 0 ? strncpy( buf, ((__c_locale)__loc)->__locales[LC_TIME]->name, _Locale_MAX_SIMPLE_NAME ) : 0;
234 char const*_Locale_collate_name( const void *__loc, char *buf )
236 return __loc != 0 ? strncpy( buf, ((__c_locale)__loc)->__locales[LC_COLLATE]->name, _Locale_MAX_SIMPLE_NAME ) : 0;
239 char const*_Locale_monetary_name( const void *__loc, char *buf )
241 return __loc != 0 ? strncpy( buf, ((__c_locale)__loc)->__locales[LC_MONETARY]->name, _Locale_MAX_SIMPLE_NAME ) : 0;
244 char const*_Locale_messages_name( const void *__loc, char *buf )
246 return __loc != 0 ? strncpy( buf, ((__c_locale)__loc)->__locales[LC_MESSAGES]->name, _Locale_MAX_SIMPLE_NAME ) : 0;
249 void _Locale_ctype_destroy( void *__loc )
250 { __LOCALE_DESTROY(__loc); }
252 void _Locale_numeric_destroy( void *__loc )
253 { __LOCALE_DESTROY(__loc); }
255 void _Locale_time_destroy( void *__loc )
256 { __LOCALE_DESTROY(__loc); }
258 void _Locale_collate_destroy( void *__loc )
259 { __LOCALE_DESTROY(__loc); }
261 void _Locale_monetary_destroy( void *__loc )
262 { __LOCALE_DESTROY(__loc); }
264 void _Locale_messages_destroy( void* __loc )
265 { __LOCALE_DESTROY(__loc); }
268 * locale loc expected either locale name indeed (platform-specific)
269 * or string like "LC_CTYPE=LocaleNameForCType;LC_NUMERIC=LocaleNameForNum;"
273 char const*__Extract_locale_name( const char *loc, const char *category, char *buf )
279 if( loc[0]=='L' && loc[1]=='C' && loc[2]=='_') {
280 expr = strstr( (char*)loc, category );
282 return NULL; /* Category not found. */
284 len_name = strcspn( expr, ";" );
285 len_name = len_name > _Locale_MAX_SIMPLE_NAME ? _Locale_MAX_SIMPLE_NAME : len_name;
286 strncpy( buf, expr, len_name );
290 return strncpy( buf, loc, _Locale_MAX_SIMPLE_NAME );
293 char const*_Locale_extract_ctype_name( const char *loc, char *buf, struct _Locale_name_hint* hint )
294 { return __Extract_locale_name( loc, "LC_CTYPE=", buf ); }
296 char const*_Locale_extract_numeric_name( const char *loc, char *buf, struct _Locale_name_hint* hint )
297 { return __Extract_locale_name( loc, "LC_NUMERIC=", buf ); }
299 char const*_Locale_extract_time_name( const char *loc, char *buf, struct _Locale_name_hint* hint )
300 { return __Extract_locale_name( loc, "LC_TIME=", buf ); }
302 char const*_Locale_extract_collate_name( const char *loc, char *buf, struct _Locale_name_hint* hint )
303 { return __Extract_locale_name( loc, "LC_COLLATE=", buf ); }
305 char const*_Locale_extract_monetary_name( const char *loc, char *buf, struct _Locale_name_hint* hint )
306 { return __Extract_locale_name( loc, "LC_MONETARY=", buf ); }
308 char const*_Locale_extract_messages_name( const char *loc, char *buf, struct _Locale_name_hint* hint )
309 { return __Extract_locale_name( loc, "LC_MESSAGES=", buf ); }
311 char const*_Locale_compose_name(char*__DUMMY_PAR1, const char*__DUMMY_PAR2, const char*__DUMMY_PAR3,
312 const char*__DUMMY_PAR4,
313 const char*__DUMMY_PAR5, const char*__DUMMY_PAR6, const char*__DUMMY_PAR7, const char*__DUMMY_PAR8) {
314 /* TODO: what's this? Is this a marker that this is not yet completely
315 implemented? Copy the implementation from c_locale_win32 perhaps? It seems
316 to complement the extract functions above. */
317 printf( "%s:%d\n", __FILE__, __LINE__ );
321 struct _Locale_name_hint* _Locale_get_ctype_hint(struct _Locale_ctype* ctype)
323 struct _Locale_name_hint* _Locale_get_numeric_hint(struct _Locale_numeric* numeric)
325 struct _Locale_name_hint* _Locale_get_time_hint(struct _Locale_time* time)
327 struct _Locale_name_hint* _Locale_get_collate_hint(struct _Locale_collate* collate)
329 struct _Locale_name_hint* _Locale_get_monetary_hint(struct _Locale_monetary* monetary)
331 struct _Locale_name_hint* _Locale_get_messages_hint(struct _Locale_messages* messages)
336 const _Locale_mask_t *_Locale_ctype_table( struct _Locale_ctype *__loc )
338 /* return table with masks (upper, lower, alpha, etc.) */
339 /* return ((__c_locale)__loc)->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_CLASS)].string + 128; */
340 return ((__c_locale)__loc)->__ctype_b;
343 int _Locale_toupper( struct _Locale_ctype *__loc, int c )
344 { return ((__c_locale)__loc)->__ctype_toupper[c]; }
346 int _Locale_tolower( struct _Locale_ctype *__loc, int c )
347 { return ((__c_locale)__loc)->__ctype_tolower[c]; }
349 #if !defined (_STLP_NO_WCHAR_T)
350 _Locale_mask_t _Locale_wchar_ctype(struct _Locale_ctype*__DUMMY_PAR1, wint_t __DUMMY_PAR2, _Locale_mask_t __DUMMY_PAR3) {
351 printf( "%s:%d\n", __FILE__, __LINE__ );
355 wint_t _Locale_wchar_tolower( struct _Locale_ctype *__loc, wint_t c ) {
356 printf( "%s:%d\n", __FILE__, __LINE__ );
357 return __towlower_l( c, ((__c_locale)__loc) );
360 wint_t _Locale_wchar_toupper( struct _Locale_ctype *__loc, wint_t c ) {
361 printf( "%s:%d\n", __FILE__, __LINE__ );
362 return __towupper_l( c, ((__c_locale)__loc) );
366 #if !defined (_STLP_NO_MBSTATE_T)
368 int _Locale_mb_cur_max( struct _Locale_ctype * __DUMMY_PAR) {
369 printf( "%s:%d\n", __FILE__, __LINE__ );
373 int _Locale_mb_cur_min( struct _Locale_ctype * __DUMMY_PAR) {
374 printf( "%s:%d\n", __FILE__, __LINE__ );
378 int _Locale_is_stateless( struct _Locale_ctype * __DUMMY_PAR) {
379 printf( "%s:%d\n", __FILE__, __LINE__ );
383 #if !defined (_STLP_NO_WCHAR_T)
384 wint_t _Locale_btowc(struct _Locale_ctype *__loc, int c) {
386 /* __c_locale __tmp = __uselocale( __loc ); */
388 /* __uselocale( __tmp ); */
392 int _Locale_wctob(struct _Locale_ctype *__loc, wint_t c) {
394 /* __c_locale __tmp = __uselocale( __loc ); */
396 /* __uselocale( __tmp ); */
400 size_t _Locale_mbtowc(struct _Locale_ctype *__DUMMY_PAR1,
401 wchar_t *__DUMMY_PAR2,
402 const char *__DUMMY_PAR3, size_t __DUMMY_PAR4,
403 mbstate_t *__DUMMY_PAR5) {
404 printf( "%s:%d\n", __FILE__, __LINE__ );
408 size_t _Locale_wctomb(struct _Locale_ctype *__DUMMY_PAR1,
409 char *__DUMMY_PAR2, size_t __DUMMY_PAR3,
410 const wchar_t __DUMMY_PAR4,
411 mbstate_t *__DUMMY_PAR5) {
412 printf( "%s:%d\n", __FILE__, __LINE__ );
417 size_t _Locale_unshift(struct _Locale_ctype *__DUMMY_PAR1,
418 mbstate_t *__DUMMY_PAR2,
419 char *__DUMMY_PAR3, size_t __DUMMY_PAR4, char ** __DUMMY_PAR5) {
420 printf( "%s:%d\n", __FILE__, __LINE__ );
424 #endif /* _STLP_NO_MBSTATE_T */
427 int _Locale_strcmp(struct _Locale_collate * __loc,
428 const char *s1, size_t n1,
429 const char *s2, size_t n2) {
431 char buf1[64], buf2[64];
432 while (n1 > 0 && n2 > 0) {
433 size_t bufsize1 = n1 < 63 ? n1 : 63;
434 size_t bufsize2 = n2 < 63 ? n2 : 63;
435 strncpy(buf1, s1, bufsize1); buf1[bufsize1] = 0;
436 strncpy(buf2, s2, bufsize2); buf2[bufsize2] = 0;
438 ret = strcoll_l(buf1, buf2, (__c_locale)__loc);
439 if (ret != 0) return ret;
440 s1 += bufsize1; n1 -= bufsize1;
441 s2 += bufsize2; n2 -= bufsize2;
446 #if !defined (_STLP_NO_WCHAR_T)
447 int _Locale_strwcmp(struct _Locale_collate *__loc,
448 const wchar_t *s1, size_t n1,
449 const wchar_t *s2, size_t n2) {
451 wchar_t buf1[64], buf2[64];
452 while (n1 > 0 && n2 > 0) {
453 size_t bufsize1 = n1 < 63 ? n1 : 63;
454 size_t bufsize2 = n2 < 63 ? n2 : 63;
455 wcsncpy(buf1, s1, bufsize1); buf1[bufsize1] = 0;
456 wcsncpy(buf2, s2, bufsize2); buf2[bufsize2] = 0;
458 ret = wcscoll_l(buf1, buf2, (__c_locale)__loc);
459 if (ret != 0) return ret;
460 s1 += bufsize1; n1 -= bufsize1;
461 s2 += bufsize2; n2 -= bufsize2;
468 size_t _Locale_strxfrm(struct _Locale_collate *__loc,
469 char *dest, size_t dest_n,
470 const char *src, size_t src_n )
472 const char *real_src;
478 if (dest != NULL) dest[0] = 0;
481 if (src[src_n] != 0) {
482 buf = malloc(src_n + 1);
483 strncpy(buf, src, src_n);
489 result = __strxfrm_l(dest, real_src, dest_n, (__c_locale)__loc);
490 if (buf != NULL) free(buf);
494 # ifndef _STLP_NO_WCHAR_T
496 size_t _Locale_strwxfrm( struct _Locale_collate *__loc,
497 wchar_t *dest, size_t dest_n,
498 const wchar_t *src, size_t src_n )
500 const wchar_t *real_src;
506 if (dest != NULL) dest[0] = 0;
509 if (src[src_n] != 0) {
510 buf = malloc((src_n + 1) * sizeof(wchar_t));
511 wcsncpy(buf, src, src_n);
517 result = __wcsxfrm_l(dest, real_src, dest_n, (__c_locale)__loc);
518 if (buf != NULL) free(buf);
526 char _Locale_decimal_point(struct _Locale_numeric *__loc)
528 return (__loc != 0) ? *(__nl_langinfo_l(RADIXCHAR, (__c_locale)__loc)) : '.';
531 char _Locale_thousands_sep(struct _Locale_numeric *__loc)
533 return (__loc != 0) ? *(__nl_langinfo_l(THOUSEP, (__c_locale)__loc)) : ',';
536 const char* _Locale_grouping(struct _Locale_numeric *__loc)
538 return (__loc != 0 && _Locale_thousands_sep(__loc) != '\0' ) ?
539 (__nl_langinfo_l(GROUPING, (__c_locale)__loc)) : "";
542 const char *_Locale_true(struct _Locale_numeric *__loc)
544 return __loc != 0 ? __nl_langinfo_l(YESSTR, (__c_locale)__loc) : "true";
547 const char *_Locale_false(struct _Locale_numeric *__loc)
549 return __loc != 0 ? __nl_langinfo_l(NOSTR, (__c_locale)__loc) : "false";
555 const char *_Locale_int_curr_symbol(struct _Locale_monetary *__loc)
557 return __loc != 0 ? __nl_langinfo_l(INT_CURR_SYMBOL, (__c_locale)__loc) : 0;
560 const char *_Locale_currency_symbol(struct _Locale_monetary *__loc)
562 return __loc != 0 ? __nl_langinfo_l(CURRENCY_SYMBOL, (__c_locale)__loc) : 0;
565 char _Locale_mon_decimal_point(struct _Locale_monetary * __loc)
567 return __loc != 0 ? *(__nl_langinfo_l(MON_DECIMAL_POINT,(__c_locale)__loc)) : '.';
570 char _Locale_mon_thousands_sep(struct _Locale_monetary *__loc)
572 return __loc != 0 ? *(__nl_langinfo_l(MON_THOUSANDS_SEP, (__c_locale)__loc)) : ',';
575 const char *_Locale_mon_grouping(struct _Locale_monetary *__loc)
577 return (__loc != 0 && _Locale_mon_thousands_sep( __loc ) != '\0' ) ?
578 __nl_langinfo_l(MON_GROUPING, (__c_locale)__loc) : _empty_str;
581 const char *_Locale_positive_sign(struct _Locale_monetary *__loc)
583 return __loc != 0 ? __nl_langinfo_l(POSITIVE_SIGN, (__c_locale)__loc) : _empty_str;
586 const char *_Locale_negative_sign(struct _Locale_monetary *__loc)
588 return __loc != 0 ? __nl_langinfo_l(NEGATIVE_SIGN, (__c_locale)__loc) : _empty_str;
591 char _Locale_int_frac_digits(struct _Locale_monetary *__loc)
593 return __loc != 0 ? *(__nl_langinfo_l(INT_FRAC_DIGITS, (__c_locale)__loc)) : CHAR_MAX;
596 char _Locale_frac_digits(struct _Locale_monetary *__loc)
598 return __loc != 0 ? *(__nl_langinfo_l(FRAC_DIGITS, (__c_locale)__loc)) : CHAR_MAX;
601 /* 1 if currency_symbol precedes a positive value, 0 if succeeds */
602 int _Locale_p_cs_precedes(struct _Locale_monetary *__loc)
604 return __loc != 0 ? *(__nl_langinfo_l(P_CS_PRECEDES, (__c_locale)__loc)) : CHAR_MAX;
607 /* 1 if a space separates currency_symbol from a positive value. */
608 int _Locale_p_sep_by_space(struct _Locale_monetary *__loc)
610 return __loc != 0 ? *(__nl_langinfo_l(P_SEP_BY_SPACE, (__c_locale)__loc)) : CHAR_MAX;
614 * 0 Parentheses surround the quantity and currency_symbol
615 * 1 The sign string precedes the quantity and currency_symbol
616 * 2 The sign string succeeds the quantity and currency_symbol.
617 * 3 The sign string immediately precedes the currency_symbol.
618 * 4 The sign string immediately succeeds the currency_symbol.
620 int _Locale_p_sign_posn(struct _Locale_monetary *__loc)
622 return __loc != 0 ? *(__nl_langinfo_l(P_SIGN_POSN, (__c_locale)__loc)) : CHAR_MAX;
625 /* 1 if currency_symbol precedes a negative value, 0 if succeeds */
626 int _Locale_n_cs_precedes(struct _Locale_monetary *__loc)
628 return __loc != 0 ? *(__nl_langinfo_l(N_CS_PRECEDES, (__c_locale)__loc)) : CHAR_MAX;
631 /* 1 if a space separates currency_symbol from a negative value. */
632 int _Locale_n_sep_by_space(struct _Locale_monetary *__loc)
634 return __loc != 0 ? *(__nl_langinfo_l(N_SEP_BY_SPACE, (__c_locale)__loc)) : CHAR_MAX;
638 * 0 Parentheses surround the quantity and currency_symbol
639 * 1 The sign string precedes the quantity and currency_symbol
640 * 2 The sign string succeeds the quantity and currency_symbol.
641 * 3 The sign string immediately precedes the currency_symbol.
642 * 4 The sign string immediately succeeds the currency_symbol.
644 int _Locale_n_sign_posn(struct _Locale_monetary *__loc)
646 return __loc != 0 ? *(__nl_langinfo_l(N_SIGN_POSN, (__c_locale)__loc)) : CHAR_MAX;
651 const char *_Locale_full_monthname(struct _Locale_time *__loc, int _m )
653 return (__loc != 0 && _m >= 0 && _m < 12) ? __nl_langinfo_l(MON_1 + _m, (__c_locale)__loc) : 0;
656 const char *_Locale_abbrev_monthname(struct _Locale_time *__loc, int _m )
658 return (__loc != 0 && _m >= 0 && _m < 12) ? __nl_langinfo_l(ABMON_1 + _m, (__c_locale)__loc) : 0;
661 const char *_Locale_full_dayofweek(struct _Locale_time *__loc, int _d )
663 return (__loc != 0 && _d >= 0 && _d < 7) ? __nl_langinfo_l(DAY_1 + _d, (__c_locale)__loc) : 0;
666 const char *_Locale_abbrev_dayofweek(struct _Locale_time *__loc, int _d )
668 return (__loc != 0 && _d >= 0 && _d < 7) ? __nl_langinfo_l(ABDAY_1 + _d, (__c_locale)__loc) : 0;
671 const char *_Locale_d_t_fmt(struct _Locale_time *__loc)
673 return __loc != 0 ? __nl_langinfo_l(D_T_FMT, (__c_locale)__loc) : 0;
676 const char *_Locale_d_fmt(struct _Locale_time *__loc )
678 return __loc != 0 ? __nl_langinfo_l(D_FMT, (__c_locale)__loc) : 0;
681 const char *_Locale_t_fmt(struct _Locale_time *__loc )
683 return __loc != 0 ? __nl_langinfo_l(T_FMT, (__c_locale)__loc) : 0;
686 const char *_Locale_long_d_t_fmt(struct _Locale_time *__loc )
688 return __loc != 0 ? __nl_langinfo_l(ERA_D_T_FMT, (__c_locale)__loc) : 0;
691 const char *_Locale_long_d_fmt(struct _Locale_time *__loc )
693 return __loc != 0 ? __nl_langinfo_l(ERA_D_FMT, (__c_locale)__loc) : 0;
696 const char *_Locale_am_str(struct _Locale_time *__loc )
698 return __loc != 0 ? __nl_langinfo_l(AM_STR, (__c_locale)__loc) : _empty_str;
701 const char *_Locale_pm_str(struct _Locale_time* __loc )
703 return __loc != 0 ? __nl_langinfo_l(PM_STR, (__c_locale)__loc) : _empty_str;
706 const char *_Locale_t_fmt_ampm(struct _Locale_time *__loc )
708 return __loc != 0 ? __nl_langinfo_l(T_FMT_AMPM, (__c_locale)__loc) : 0;
713 nl_catd_type _Locale_catopen(struct _Locale_messages *__loc, const char *__cat_name )
715 return catopen( __cat_name, NL_CAT_LOCALE );
718 void _Locale_catclose(struct _Locale_messages *__loc, nl_catd_type __cat )
723 const char *_Locale_catgets(struct _Locale_messages *__loc, nl_catd_type __cat,
724 int __setid, int __msgid, const char *dfault)
726 return catgets( __cat, __setid, __msgid, dfault );