Commit Graph

20 Commits

Author SHA1 Message Date
Baptiste Daroussin
c71b548239 Fix typo
Remove useless tests before free()

Suggested by:	jilles
2015-08-09 00:19:14 +00:00
Baptiste Daroussin
2a6abeebef The collate functions within libc have been using version 1 and 1.2 of the
packed LC_COLLATE binary formats. These were generated with the colldef
tool, but the new LC_COLLATE files are going to be generated by the new
localedef tool using CLDR POSIX files as input.  The BSD-flavored
version of localedef identifies the format as "BSD 1.0".  Any
LC_COLLATE file with a different version will simply not be loaded, and
all LC* categories will get set to "C" (aka "POSIX") locale.

This work is based off of Nexenta's contribution to Illumos.
The integration with xlocale is John Marino's work for Dragonfly.

The following commits will enable localedef tool, disable the colldef
tool, add generated colldef directory, and finally remove colldef from
base.

The only difference with Dragonfly are:
- a few fixes to build with clang
- And identification of the flavor as "BSD 1.0" instead of "Dragonfly 4.4"

Obtained from:	Dragonfly
2015-08-07 23:41:26 +00:00
David Chisnall
3c87aa1d3d Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a
load of _l suffixed versions of various standard library functions that use
the global locale, making them take an explicit locale parameter.  Also
adds support for per-thread locales.  This work was funded by the FreeBSD
Foundation.

Please test any code you have that uses the C standard locale functions!

Reviewed by:    das (gdtoa changes)
Approved by:    dim (mentor)
2011-11-20 14:45:42 +00:00
Xin LI
ecc61e2fb1 Further simplify the code.
Submitted by:	Christoph Mallon <christoph.mallon gmx.de>
2008-10-19 09:10:44 +00:00
Xin LI
f53577c0d4 Use strlcpy() in !localized case to avoid the -1's. 2008-10-17 21:29:05 +00:00
Tim J. Robbins
58d38e2520 Style: One space between "restrict" qualifier and "*". 2002-09-06 11:24:06 +00:00
Robert Drehmel
33f9b60eee - Add the 'restrict' qualifier required by IEEE Std 1003.1-2001
to the function definition of strxfrm(3) in form of our
   '__restrict' macro.
 - Use an ANSI-C function definition for strxfrm(3).
 - Change the manual page accordingly.
2002-08-14 21:01:04 +00:00
David E. O'Brien
de5fe5d53b rcsid[]->__FBSDID 2001-11-07 19:55:16 +00:00
David E. O'Brien
5864b79cd2 Make the rcsid and FreeBSD IDs more sane in the wcs* and wmem* files.
Do the same for the non-wcs*/wmem* files while I'm here.
2001-05-24 08:47:42 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Andrey A. Chernov
f0e6ee9f05 fix wrong return result
fix n=0 case
improve manpage
1999-02-12 23:40:41 +00:00
Andrey A. Chernov
0ea569ff6f Fix handling more than 1 char with non-C locale
Misc. cleanup
PR: 6825
Submitted by: Sergey Gershtein <sg@mplik.ru>
1998-06-05 09:49:51 +00:00
Peter Wemm
7e546392b5 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Andrey A. Chernov
c2bfae006a Back out fallback approximation changes, they are not so right to live 1996-08-13 17:03:18 +00:00
Andrey A. Chernov
45110ccfce Use better approximation if collate info not available.
Fix bug: strxfrm+strcmp != strcoll, if collate info not available
1996-06-09 14:56:08 +00:00
Andrey A. Chernov
e96a21509f Minor optimization. 1995-02-18 11:36:33 +00:00
Andrey A. Chernov
7b7aeeccde Copyrights cleanup 1995-02-18 01:39:00 +00:00
Andrey A. Chernov
a4d5d0cbde Add 8bit collate stuff
Submitted by: alex@elvisti.kiev.ua
1995-02-16 17:01:11 +00:00
Rodney W. Grimes
58f0484fa2 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00