Lines Matching +full:- +full:only
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
33 * XXX: correctly handle reserved 'charmap' keyword and '-m' option (require
142 /* LC_MONETARY - POSIX */
186 /* LC_NUMERIC - POSIX */
193 /* LC_NUMERIC - local additions */
195 RADIXCHAR, "Same as decimal_point (FreeBSD only)" }, /* compat */
197 THOUSEP, "Same as thousands_sep (FreeBSD only)" }, /* compat */
199 /* LC_TIME - POSIX */
228 /* LC_TIME - local additions */
230 ABDAY_1, "(FreeBSD only)" },
232 ABDAY_2, "(FreeBSD only)" },
234 ABDAY_3, "(FreeBSD only)" },
236 ABDAY_4, "(FreeBSD only)" },
238 ABDAY_5, "(FreeBSD only)" },
240 ABDAY_6, "(FreeBSD only)" },
242 ABDAY_7, "(FreeBSD only)" },
244 DAY_1, "(FreeBSD only)" },
246 DAY_2, "(FreeBSD only)" },
248 DAY_3, "(FreeBSD only)" },
250 DAY_4, "(FreeBSD only)" },
252 DAY_5, "(FreeBSD only)" },
254 DAY_6, "(FreeBSD only)" },
256 DAY_7, "(FreeBSD only)" },
258 ABMON_1, "(FreeBSD only)" },
260 ABMON_2, "(FreeBSD only)" },
262 ABMON_3, "(FreeBSD only)" },
264 ABMON_4, "(FreeBSD only)" },
266 ABMON_5, "(FreeBSD only)" },
268 ABMON_6, "(FreeBSD only)" },
270 ABMON_7, "(FreeBSD only)" },
272 ABMON_8, "(FreeBSD only)" },
274 ABMON_9, "(FreeBSD only)" },
276 ABMON_10, "(FreeBSD only)" },
278 ABMON_11, "(FreeBSD only)" },
280 ABMON_12, "(FreeBSD only)" },
282 MON_1, "(FreeBSD only)" },
284 MON_2, "(FreeBSD only)" },
286 MON_3, "(FreeBSD only)" },
288 MON_4, "(FreeBSD only)" },
290 MON_5, "(FreeBSD only)" },
292 MON_6, "(FreeBSD only)" },
294 MON_7, "(FreeBSD only)" },
296 MON_8, "(FreeBSD only)" },
298 MON_9, "(FreeBSD only)" },
300 MON_10, "(FreeBSD only)" },
302 MON_11, "(FreeBSD only)" },
304 MON_12, "(FreeBSD only)" },
306 ALTMON_1, "(FreeBSD only)" },
308 ALTMON_2, "(FreeBSD only)" },
310 ALTMON_3, "(FreeBSD only)" },
312 ALTMON_4, "(FreeBSD only)" },
314 ALTMON_5, "(FreeBSD only)" },
316 ALTMON_6, "(FreeBSD only)" },
318 ALTMON_7, "(FreeBSD only)" },
320 ALTMON_8, "(FreeBSD only)" },
322 ALTMON_9, "(FreeBSD only)" },
324 ALTMON_10, "(FreeBSD only)" },
326 ALTMON_11, "(FreeBSD only)" },
328 ALTMON_12, "(FreeBSD only)" },
330 AM_STR, "(FreeBSD only)" },
332 PM_STR, "(FreeBSD only)" },
334 D_MD_ORDER, "(FreeBSD only)" }, /* local */
336 /* LC_MESSAGES - POSIX */
341 /* LC_MESSAGES - local additions */
350 static const char *boguslocales[] = { "UTF-8" };
359 while ((ch = getopt(argc, argv, "ackms:")) != -1) { in main()
377 argc -= optind; in main()
388 /* process '-a' */ in main()
394 /* process '-m' */ in main()
400 /* check for special case '-k list' */ in main()
409 /* process '-c', '-k', or command line arguments. */ in main()
418 argc--; in main()
437 printf("Usage: locale [ -a | -m ]\n" in usage()
438 " locale -k list [prefix]\n" in usage()
439 " locale [ -ck ] [keyword ...]\n"); in usage()
448 * inconsistent thus setlocale() will fail. Maybe add '-V' function to
457 for (i = 0; i < locales->sl_cur; i++) { in list_locales()
458 printf("%s\n", locales->sl_str[i]); in list_locales()
494 for (i = 0; i < locales->sl_cur; i++) { in list_charmaps()
495 s = locales->sl_str[i]; in list_charmaps()
503 /* add US-ASCII, if not yet added */ in list_charmaps()
504 if (sl_find(charmaps, "US-ASCII") == NULL) in list_charmaps()
505 sl_add(charmaps, strdup("US-ASCII")); in list_charmaps()
508 qsort(charmaps->sl_str, charmaps->sl_cur, sizeof(char *), scmp); in list_charmaps()
511 for (i = 0; i < charmaps->sl_cur; i++) { in list_charmaps()
512 printf("%s\n", charmaps->sl_str[i]); in list_charmaps()
548 if (*(dp->d_name) == '.') in init_locales_list()
551 if (strncmp(dp->d_name, boguslocales[i], in init_locales_list()
555 sl_add(locales, strdup(dp->d_name)); in init_locales_list()
560 * POSIX 1003.1-2001 requires presence of 'POSIX' name only here, but in init_locales_list()
570 qsort(locales->sl_str, locales->sl_cur, sizeof(char *), scmp); in init_locales_list()
639 len = snprintf(&rval[roff], sizeof(rval) - roff, "%u;", *cp); in format_grouping()
640 if (len < 0 || (unsigned)len >= sizeof(rval) - roff) in format_grouping()
649 rval[roff - 1] = '\0'; in format_grouping()
667 rval = format_grouping(lc->grouping); in kwval_lconv()
670 rval = lc->int_curr_symbol; in kwval_lconv()
673 rval = lc->currency_symbol; in kwval_lconv()
676 rval = lc->mon_decimal_point; in kwval_lconv()
679 rval = lc->mon_thousands_sep; in kwval_lconv()
682 rval = format_grouping(lc->mon_grouping); in kwval_lconv()
685 rval = lc->positive_sign; in kwval_lconv()
688 rval = lc->negative_sign; in kwval_lconv()
691 rval = &(lc->int_frac_digits); in kwval_lconv()
694 rval = &(lc->frac_digits); in kwval_lconv()
697 rval = &(lc->p_cs_precedes); in kwval_lconv()
700 rval = &(lc->p_sep_by_space); in kwval_lconv()
703 rval = &(lc->n_cs_precedes); in kwval_lconv()
706 rval = &(lc->n_sep_by_space); in kwval_lconv()
709 rval = &(lc->p_sign_posn); in kwval_lconv()
712 rval = &(lc->n_sign_posn); in kwval_lconv()
715 rval = &(lc->int_p_cs_precedes); in kwval_lconv()
718 rval = &(lc->int_p_sep_by_space); in kwval_lconv()
721 rval = &(lc->int_n_cs_precedes); in kwval_lconv()
724 rval = &(lc->int_n_sep_by_space); in kwval_lconv()
727 rval = &(lc->int_p_sign_posn); in kwval_lconv()
730 rval = &(lc->int_n_sign_posn); in kwval_lconv()
769 nl_langinfo(PM_STR)) == -1) in kwval_ltime()
798 static char nastr[3] = "-1"; in kwval_lookup()
836 * Show details about requested keyword according to '-k' and/or '-c'
853 printf("%-20s ", lookup_localecat(cat)); in showdetails()
855 printf("%-20s\t%s\n", kw, lookup_localecat(cat)); in showdetails()
915 #define FMT "%-20s %-12s %-7s %-20s\n" in showkeywordslist()
923 printf("-------------------- ------------ ------- --------------------\n"); in showkeywordslist()