Commit Graph

19 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
Eitan Adler
0f701093d2 Revert r227812 and r227808 per discussion
Reviewed by:	many
Approved by:	des
2011-12-02 15:41:09 +00:00
Eitan Adler
55e84fcee1 - add check for pointer equality prior to performing the O(n) pass
- while here change 's' to 's1' in strcoll

Submitted by:	eadler@
Reviewed by:	theraven@
Approved by:	brooks@
MFC after:	2 weeks
2011-11-22 00:07:53 +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
Daniel Gerzo
bd604b4b06 - ANSIfy function definitions
- use nul when we are looking for a terminating character where appropriate

Approved by:	imp
2009-02-03 17:58:20 +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
Dmitrij Tejblum
e755fb7671 __collate_substitute() do something non-trivial only for German. For everyone
else, it is equivalent to strdup(). So, we will check if  the substitution
tables are trivial at the load time, and possibly save 2 calls to
__collate_substitute() in strcoll().

Still, __collate_substitute() should not exist.
1999-09-12 21:15:28 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +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
Jordan K. Hubbard
51295a4d3e General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
1996-07-12 18:57:58 +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
db4dc2ff6e If locale not available, fallback to strcasecmp, not to strcmp 1995-04-16 22:43:45 +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