Bug 251468

Summary: nl_langinfo man page doesn't list legal inputs
Product: Base System Reporter: Karl Williamson <khw>
Component: binAssignee: Yuri Pankov <yuripv>
Status: Closed FIXED    
Severity: Affects Many People CC: bugs, doc, yuripv
Priority: --- Flags: yuripv: mfc-stable12+
Version: CURRENT   
Hardware: Any   
OS: Any   
URL: https://reviews.freebsd.org/D27606

Description Karl Williamson 2020-11-29 21:55:01 UTC
The parameter to this function is an enum nl_item.  The possible values are not given.  There is an example ABDAY_1, but searching for that in the entire documentation structure yielded nothing.
Comment 1 Yuri Pankov freebsd_committer freebsd_triage 2020-11-29 22:53:48 UTC
Man page references the header containing recognized names:

The manifest constant names and values of item are defined in <langinfo.h>.
Comment 2 Karl Williamson 2020-12-01 16:39:36 UTC
If I could have easily found that header file, I would not have filed this bug.   What would have been most convenient would be for the text that names that hdr in the man page were to be a hyper link to the source of that file.

I tried searching the project for ABDAY_1 and got no results whatsoever
Comment 3 Yuri Pankov freebsd_committer freebsd_triage 2020-12-14 14:33:53 UTC
I agree that having the recognized values in the man page would be helpful, more so knowing that those don't change often (if ever).
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-12-17 02:33:58 UTC
A commit references this bug:

Author: yuripv
Date: Thu Dec 17 02:33:52 UTC 2020
New revision: 368711
URL: https://svnweb.freebsd.org/changeset/base/368711

Log:
  nl_langinfo(3): document recognized item names

  While here, remove .Tn macro usage (prompted by mandoc lint).

  PR:		251468
  Reviewed by:	bapt
  Differential Revision:	https://reviews.freebsd.org/D27606

Changes:
  head/lib/libc/locale/nl_langinfo.3