summaryrefslogtreecommitdiff
path: root/usr.bin/locale
Commit message (Collapse)AuthorAgeFilesLines
* locale: exit 1 if unknown keyword was specifiedYuri Pankov2020-06-132-8/+24
| | | | | | | | PR: 241906 Submitted by: Akos Somfai <akos.somfai@gmail.com> Notes: svn path=/head/; revision=362146
* locale: initialize variables to make gcc happyYuri Pankov2019-09-111-1/+1
| | | | | | | Reported by: jenkins Notes: svn path=/head/; revision=352216
* locale: more output fixesYuri Pankov2019-09-1110-142/+286
| | | | | | | | | | | | | | | | | - make abday, day, abmon, mon, am_pm output quoting match linux - workaround localeconv() issue for mon_grouping and grouping (PR172215) - for other values not available in default locale, output -1 instead of 127 (CHAR_MAX) as returned by localeconv() With these changes, output of `locale` and `locale -k` for all keywords specified by POSIX exactly matches the linux one. PR: 237752 Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D21599 Notes: svn path=/head/; revision=352214
* locale: handle day, abday, mon, abmon, am_pm keywordsYuri Pankov2019-09-108-133/+472
| | | | | | | | | | | | | | | All of these are defined as mandatory by POSIX. While here, mark all non-standard ones as FreeBSD-only as other systems (at least, GNU/Linux and illumos) do not handle them, so we should not encourage their use. PR: 237752 Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D21490 Notes: svn path=/head/; revision=352138
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Adopt SRCTOP in usr.binWarner Losh2017-03-121-1/+1
| | | | | | | | | | | | Prefer ${SRCTOP}/foo over ${.CURDIR}/../../foo and ${SRCTOP}/usr.bin/foo over ${.CURDIR}/../foo for paths in Makefiles. Differential Revision: https://reviews.freebsd.org/D9932 Sponsored by: Netflix Silence on: arch@ (twice) Notes: svn path=/head/; revision=315170
* locale: fix the powerpc buildEric van Gyzen2016-12-061-0/+2
| | | | | | | | | | Reported by: markj (and bde, in a way) MFC after: 3 days X-MFC with: r309364 Sponsored by: Dell EMC Notes: svn path=/head/; revision=309624
* locale: enable more warnings; fix themEric van Gyzen2016-12-012-20/+18
| | | | | | | | | | | | Do not set WARNS, so it gets the current default of 6. Fix the warnings by sprinkling static, const, or strdup. Make some constant data tables const. Fix whitespace. MFC after: 1 week Sponsored by: Dell EMC Notes: svn path=/head/; revision=309367
* locale: fix buffer managementEric van Gyzen2016-12-011-15/+15
| | | | | | | | | | | | Also, handle signed and unsigned chars, and more gracefully handle invalid input. Submitted by: bde in response to r309331 MFC after: 1 week Sponsored by: Dell EMC Notes: svn path=/head/; revision=309364
* Include limits.h for CHAR_MAXEric van Gyzen2016-11-301-0/+1
| | | | | | | | | | This was needed on stable/10. Apparently, sys/param.h supplies CHAR_MAX on head. Include limits.h anyway, for consistency, and because C says so. Sponsored by: Dell EMC Notes: svn path=/head/; revision=309331
* locale: fix display of "grouping" and "mon_grouping" valuesEric van Gyzen2016-11-191-2/+31
| | | | | | | | | | | | The "grouping" and "mon_grouping" values are arrays of one-byte integers, not arrays of ASCII characters. Display them in a format similar to GNU and MacOS. MFC after: 3 days Sponsored by: Dell EMC Notes: svn path=/head/; revision=308824
* We need to lookup locale when command line argumentsHajimu UMEMOTO2016-11-181-1/+1
| | | | | | | | are specified, as well. MFC after: 1 week Notes: svn path=/head/; revision=308809
* Lookup locale when print all keywords as well.Hajimu UMEMOTO2016-11-181-1/+2
| | | | | | | | | Reported by: dumbbell Reviewed by: dumbbell MFC after: 1 week Notes: svn path=/head/; revision=308808
* Use nitems() from sys/param.h.Marcelo Araujo2016-07-301-2/+2
| | | | | | | | MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) Notes: svn path=/head/; revision=303543
* Use the nitems() macroBaptiste Daroussin2016-04-171-2/+4
| | | | Notes: svn path=/head/; revision=298169
* Fix a ton of speelling errorsEitan Adler2015-10-211-2/+2
| | | | | | | | | | arc lint is helpful Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com Differential Revision: https://reviews.freebsd.org/D3337 Notes: svn path=/head/; revision=289677
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * Sync with HEAD.David E. O'Brien2013-02-082-46/+68
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=246555
| * Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+19
| | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | Sort options.Greg Lehey2012-11-171-7/+18
| | | | | | | | | | | | | | | | | | Add comment on standards conformity. MFC after: 14 days Notes: svn path=/head/; revision=243202
* | Correctly handle keywords without options.Greg Lehey2012-11-171-2/+2
| | | | | | | | | | | | | | | | Reported by: swills@ MFC after: 14 days Notes: svn path=/head/; revision=243201
* | More style(9) tabs vs. spaces:Greg Lehey2012-11-101-25/+25
| | | | | | | | | | | | | | | | | | | | - tabs after #define - Not in comments. MFC after: 2 weeks Notes: svn path=/head/; revision=242851
* | Replace spaces by tabs where appropriate.Greg Lehey2012-11-081-38/+38
| | | | | | | | | | | | | | Reminded by: jh@ Notes: svn path=/head/; revision=242808
* | Make parameters to -c and -k options optional. If no parameters areGreg Lehey2012-11-082-13/+24
|/ | | | | | | | | | | | supplied, print information for all keywords. Improve output of -c option, in particular in conjunction with -k option. MFC after: 14 days Notes: svn path=/head/; revision=242743
* Remove trailing whitespace per mdoc lint warningEitan Adler2012-03-291-2/+2
| | | | | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days Notes: svn path=/head/; revision=233648
* Always assign WARNS using ?=Ulrich Spörlein2010-03-021-3/+3
| | | | | | | | | | - fix some nearby style bugs - include Makefile.inc where it makes sense and reduces duplication Approved by: ed (co-mentor) Notes: svn path=/head/; revision=204585
* Raise WARNS for various tools where possible.Ed Schouten2010-01-171-1/+1
| | | | | | | Submitted by: Marius Nünnerich <marius@nuenneri.ch> Notes: svn path=/head/; revision=202532
* Add the comment "(FreeBSD only)" to the altmonth_x keywordsEdwin Groothuis2009-10-071-12/+12
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=197847
* Backout changes for c_fmt, x_fmt and X_fmt, they were coming fromEdwin Groothuis2009-10-051-3/+0
| | | | | | | the wrong patches. Apologies. Notes: svn path=/head/; revision=197766
* Modified locale(1) to be able to show the altmon_X fields and the [cxX]_fmt's.Edwin Groothuis2009-10-052-8/+40
| | | | | | | | | Also modify the "-k list" option to display only fields with a certain prefix. MFC after: 1 week Notes: svn path=/head/; revision=197764
* Xref setlocale(3), bump document date.Tom Rhodes2005-11-011-1/+3
| | | | Notes: svn path=/head/; revision=151934
* Use the standard section name.Ruslan Ermilov2005-01-181-1/+1
| | | | Notes: svn path=/head/; revision=140458
* Added the EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-171-1/+1
| | | | Notes: svn path=/head/; revision=140368
* Remove la_LN.* from the list of bogus locales. They're incomplete, butTim J. Robbins2004-08-021-1/+1
| | | | | | | still potentially useful. Notes: svn path=/head/; revision=133014
* Exclude bogus la_LN.* and UTF-8 locales from the output of locale -aTim J. Robbins2004-08-021-1/+11
| | | | | | | to discourage people from using them. Notes: svn path=/head/; revision=133013
* Clean up language and markup.Ruslan Ermilov2004-05-191-24/+25
| | | | Notes: svn path=/head/; revision=129437
* Back out LANG printing changes. POSIX is unclear in this place, butAndrey A. Chernov2004-02-021-10/+11
| | | | | | | other systems do that in the old way. Notes: svn path=/head/; revision=125329
* Fix printout case when LANG is overwritten by LC_ALLAndrey A. Chernov2004-02-011-11/+10
| | | | Notes: svn path=/head/; revision=125298
* Userland signed char fixes for PPC build. Problems were using a charPeter Grehan2004-01-221-1/+1
| | | | | | | | | | | | return for getopt() and comparing to -1, ditto with fgetc() and EOF, and using the kg_nice value from <sys/user.h> Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at> Reviewed by: obrien, bde (a while back) Tested lightly on: ppc, i386, make universe Notes: svn path=/head/; revision=124830
* Grammar, spelling and punctuation sweep.Christian Brueffer2003-11-261-9/+9
| | | | | | | Approved by: re (rwatson) Notes: svn path=/head/; revision=122992
* Move scmp() to more appropriate locationAlexey Zelkin2003-06-261-10/+9
| | | | Notes: svn path=/head/; revision=116877
* Add support of '-m' option to show charmaps (or correctly to say list ofAlexey Zelkin2003-06-262-13/+54
| | | | | | | | | available codesets) Modify manpages appropriatelly Notes: svn path=/head/; revision=116876
* implement LC_MONETARY's int_* keywordsAlexey Zelkin2003-06-261-2/+32
| | | | Notes: svn path=/head/; revision=116873
* locale.c:Alexey Zelkin2003-06-252-7/+6
| | | | | | | | | | | | | Use newly added __detect_path_locale() helper to lookup _PathLocale value. It adds boundary checking for PATH_LOCALE environment variable value and check for super-user fallback. Makefile: Add lib/libc/locale to compiler's include path (for setlocale.h) Notes: svn path=/head/; revision=116851