From owner-dev-commits-src-all@freebsd.org Thu Dec 24 23:43:29 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 76B824D5A20; Thu, 24 Dec 2020 23:43:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D268d2s1pz3kdV; Thu, 24 Dec 2020 23:43:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54F74192A1; Thu, 24 Dec 2020 23:43:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BONhTcn076358; Thu, 24 Dec 2020 23:43:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BONhT59076357; Thu, 24 Dec 2020 23:43:29 GMT (envelope-from git) Date: Thu, 24 Dec 2020 23:43:29 GMT Message-Id: <202012242343.0BONhT59076357@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Yuri Pankov Subject: git: 73655764e5fb - nl_langinfo(3): document recognized item names MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 73655764e5fb330e513a9057f1cfe5477c749c87 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2020 23:43:29 -0000 The branch stable/12 has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=73655764e5fb330e513a9057f1cfe5477c749c87 commit 73655764e5fb330e513a9057f1cfe5477c749c87 Author: Yuri Pankov AuthorDate: 2020-12-17 02:33:52 +0000 Commit: Yuri Pankov CommitDate: 2020-12-24 23:42:03 +0000 nl_langinfo(3): document recognized item names While here, remove .Tn macro usage (prompted by mandoc lint). PR: 251468 (cherry picked from commit 3cd6e2390cae6395f0a873612818cb7ee4a1749e) --- lib/libc/locale/nl_langinfo.3 | 102 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 94 insertions(+), 8 deletions(-) diff --git a/lib/libc/locale/nl_langinfo.3 b/lib/libc/locale/nl_langinfo.3 index d8c01b2f135f..73cba4c18084 100644 --- a/lib/libc/locale/nl_langinfo.3 +++ b/lib/libc/locale/nl_langinfo.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 30, 2012 +.Dd December 14, 2020 .Dt NL_LANGINFO 3 .Os .Sh NAME @@ -46,10 +46,6 @@ the particular language or cultural area defined in the program or thread's locale, or in the case of .Fn nl_langinfo_l , the locale passed as the second argument. -The manifest constant names and values of -.Fa item -are defined in -.In langinfo.h . .Pp Calls to .Fn setlocale @@ -59,12 +55,102 @@ or to the category .Dv LC_ALL , may overwrite the buffer pointed to by the return value. +.Pp +The manifest constant names and values of +.Fa item +are defined in +.In langinfo.h . +.Pp +The following standard constants are recognized: +.Bl -column "Constant" "Category" +.It Sy Constant Ta Sy Category Ta Sy Description +.It Dv CODESET Ta Dv LC_CTYPE Ta codeset name +.It Dv D_T_FMT Ta Dv LC_TIME Ta string for formatting date and time +.It Dv D_FMT Ta Dv LC_TIME Ta date format string +.It Dv T_FMT Ta Dv LC_TIME Ta time format string +.It Dv T_FMT_AMPM Ta Dv LC_TIME Ta a.m. or p.m. time format string +.It Dv AM_STR Ta Dv LC_TIME Ta ante-meridiem affix +.It Dv PM_STR Ta Dv LC_TIME Ta post-meridiem affix +.It Dv DAY_1 Ta Dv LC_TIME Ta name of the first day of the week +.It Dv DAY_2 Ta Dv LC_TIME Ta name of the second day of the week +.It Dv DAY_3 Ta Dv LC_TIME Ta name of the third day of the week +.It Dv DAY_4 Ta Dv LC_TIME Ta name of the fourth day of the week +.It Dv DAY_5 Ta Dv LC_TIME Ta name of the fifth day of the week +.It Dv DAY_6 Ta Dv LC_TIME Ta name of the sixth day of the week +.It Dv DAY_7 Ta Dv LC_TIME Ta name of the seventh day of the week +.It Dv ABDAY_1 Ta Dv LC_TIME Ta abbreviated name of the first day of the week +.It Dv ABDAY_2 Ta Dv LC_TIME Ta abbreviated name of the second day of the week +.It Dv ABDAY_3 Ta Dv LC_TIME Ta abbreviated name of the third day of the week +.It Dv ABDAY_4 Ta Dv LC_TIME Ta abbreviated name of the fourth day of the week +.It Dv ABDAY_5 Ta Dv LC_TIME Ta abbreviated name of the fifth day of the week +.It Dv ABDAY_6 Ta Dv LC_TIME Ta abbreviated name of the sixth day of the week +.It Dv ABDAY_7 Ta Dv LC_TIME Ta abbreviated name of the seventh day of the week +.It Dv MON_1 Ta Dv LC_TIME Ta name of the first month of the year +.It Dv MON_2 Ta Dv LC_TIME Ta name of the second month +.It Dv MON_3 Ta Dv LC_TIME Ta name of the third month +.It Dv MON_4 Ta Dv LC_TIME Ta name of the fourth month +.It Dv MON_5 Ta Dv LC_TIME Ta name of the fifth month +.It Dv MON_6 Ta Dv LC_TIME Ta name of the sixth month +.It Dv MON_7 Ta Dv LC_TIME Ta name of the seventh month +.It Dv MON_8 Ta Dv LC_TIME Ta name of the eighth month +.It Dv MON_9 Ta Dv LC_TIME Ta name of the ninth month +.It Dv MON_10 Ta Dv LC_TIME Ta name of the tenth month +.It Dv MON_11 Ta Dv LC_TIME Ta name of the eleventh month +.It Dv MON_12 Ta Dv LC_TIME Ta name of the twelfth month +.It Dv ABMON_1 Ta Dv LC_TIME Ta abbreviated name of the first month +.It Dv ABMON_2 Ta Dv LC_TIME Ta abbreviated name of the second month +.It Dv ABMON_3 Ta Dv LC_TIME Ta abbreviated name of the third month +.It Dv ABMON_4 Ta Dv LC_TIME Ta abbreviated name of the fourth month +.It Dv ABMON_5 Ta Dv LC_TIME Ta abbreviated name of the fifth month +.It Dv ABMON_6 Ta Dv LC_TIME Ta abbreviated name of the sixth month +.It Dv ABMON_7 Ta Dv LC_TIME Ta abbreviated name of the seventh month +.It Dv ABMON_8 Ta Dv LC_TIME Ta abbreviated name of the eighth month +.It Dv ABMON_9 Ta Dv LC_TIME Ta abbreviated name of the ninth month +.It Dv ABMON_10 Ta Dv LC_TIME Ta abbreviated name of the tenth month +.It Dv ABMON_11 Ta Dv LC_TIME Ta abbreviated name of the eleventh month +.It Dv ABMON_12 Ta Dv LC_TIME Ta abbreviated name of the twelfth month +.It Dv ERA Ta Dv LC_TIME Ta era description segments +.It Dv ERA_D_FMT Ta Dv LC_TIME Ta era date format string +.It Dv ERA_D_T_FMT Ta Dv LC_TIME Ta era date and time format string +.It Dv ERA_T_FMT Ta Dv LC_TIME Ta era time format string +.It Dv ALT_DIGITS Ta Dv LC_TIME Ta alternative symbols for digits +.It Dv RADIXCHAR Ta Dv LC_NUMERIC Ta radix character +.It Dv THOUSEP Ta Dv LC_NUMERIC Ta separator for thousands +.It Dv YESEXPR Ta Dv LC_MESSAGES Ta affirmative response extended regular +expression +.It Dv NOEXPR Ta Dv LC_MESSAGES Ta negative response extended regular expression +.It Dv CRNCYSTR Ta Dv LC_MONETARY Ta local currency symbol, preceded by '-' if the +symbol should appear before the value, '+' if the symbol should appear after the +value, or '.' if the symbol should replace the radix character; if the local +currency symbol is the empty string, implementations may return the empty string +.Pq Qq +.El +.Pp +The following non-standard +.Fx +extensions are recognized: +.Bl -column "Constant" "Category" +.It Sy Constant Ta Sy Category Ta Sy Description +.It Dv D_MD_ORDER Ta Dv LC_TIME Ta month/day order +.It Dv ALTMON_1 Ta Dv LC_TIME Ta standalone name of the first month +.It Dv ALTMON_2 Ta Dv LC_TIME Ta standalone name of the second month +.It Dv ALTMON_3 Ta Dv LC_TIME Ta standalone name of the third month +.It Dv ALTMON_4 Ta Dv LC_TIME Ta standalone name of the fourth month +.It Dv ALTMON_5 Ta Dv LC_TIME Ta standalone name of the fifth month +.It Dv ALTMON_6 Ta Dv LC_TIME Ta standalone name of the sixth month +.It Dv ALTMON_7 Ta Dv LC_TIME Ta standalone name of the seventh month +.It Dv ALTMON_8 Ta Dv LC_TIME Ta standalone name of the eighth month +.It Dv ALTMON_9 Ta Dv LC_TIME Ta standalone name of the ninth month +.It Dv ALTMON_10 Ta Dv LC_TIME Ta standalone name of the tenth month +.It Dv ALTMON_11 Ta Dv LC_TIME Ta standalone name of the eleventh month +.It Dv ALTMON_12 Ta Dv LC_TIME Ta standalone name of the twelfth month +.It Dv YESSTR Ta Dv LC_MESSAGES Ta affirmative response string +.It Dv NOSTR Ta Dv LC_MESSAGES Ta negative response string +.El .Sh RETURN VALUES In a locale where langinfo data is not defined, .Fn nl_langinfo -returns a pointer to the corresponding string in the -.Tn POSIX -locale. +returns a pointer to the corresponding string in the POSIX locale. .Fn nl_langinfo_l returns the same values as .Fn nl_langinfo .