David E. O'Brien
8449399687
Split sentences at period boundaries.
2011-12-02 11:55:09 +00:00
David Chisnall
2013459487
Fix a crash when trying to duplicate a locale that contains some implicit C locale components.
...
Reported by: Michael Butler
Approved by: dim (mentor)
2011-11-22 14:11:42 +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
Jens Schweikhardt
208aa01fbd
Fix grammar.
...
PR: 140457
Submitted by: jeremyhu AT apple.com
MFC after: 2 weeks
2011-09-27 17:54:10 +00:00
Ulrich Spörlein
20a95cd6fc
Revert most of r210764, now that mdocml does the right
...
thing with empty quotation macros.
Requested by: Alex Kozlov
2010-12-28 10:08:50 +00:00
Ulrich Spörlein
0d9deed52c
mdoc: drop redundant .Pp and .LP calls
...
They have no effect when coming in pairs, or before .Bl/.Bd
2010-10-08 12:40:16 +00:00
Warner Losh
2c0959ae6b
Powerpc is special here. powerpc and powerpc64 use different ABIs, so
...
their implementations aren't in the same files. Introduce LIBC_ARCH
and use that in preference to MACHINE_CPUARCH. Tested by amd64 and
powerpc64 builds (thanks nathanw@)
2010-08-24 20:54:43 +00:00
Warner Losh
25faff346c
MFtbemd:
...
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
2010-08-23 22:24:11 +00:00
Ulrich Spörlein
3d05ebbcf8
mdoc: remove unbalanced quotes
2010-08-02 13:11:41 +00:00
Ulrich Spörlein
c0da74038d
mdoc: make sure to pass at least one argument to quotation macros
2010-08-02 13:11:35 +00:00
Benedict Reuschling
29a6389aeb
Apply a small grammar fix to {toupper,tolower}(3).
...
PR: docs/140458
Submitted by: Jeremy Huddleston (Jeremyhu at apple dot com)
MFC after: 5 days
2010-07-25 13:32:19 +00:00
Ulrich Spörlein
2583690e62
mdoc: simplify quotation scheme
...
Reviewed by: brueffer
2010-05-11 23:08:38 +00:00
Ulrich Spörlein
a17c1cc009
mdoc: remove .Pp where not needed
...
This trips up mdocml and can simply go away.
Reviewed by: ru
Approved by: philip, ed (mentors)
2010-04-14 18:29:26 +00:00
Christian Brueffer
11ea9440c3
Fix grammar.
...
PR: 140459
Submitted by: Jeremy Huddleston <Jeremyhu@apple.com>
MFC after: 1 week
2009-11-16 14:33:31 +00:00
Peter Pentchev
753509aeb6
Fix the grammar in the isprint(3) description.
...
PR: 140456
Submitted by: Jeremy Huddleston <jeremyhu@apple.com>
2009-11-13 09:07:33 +00:00
Peter Pentchev
94317a7384
Fix the grammar in the isgraph(3) description, almost as per the PR.
...
PR: 140455
Submitted by: Jeremy Huddleston <jeremyhu@apple.com>
MFC after: 2 weeks
2009-11-13 09:03:50 +00:00
Peter Pentchev
82a1bd6a61
Fix the grammar as in the PR, and then some.
...
PR: 140454
Submitted by: Jeremy Huddleston <jeremyhu@apple.com>
MFC after: 2 weeks
2009-11-11 11:31:02 +00:00
Edwin Groothuis
28c42042d8
Modified locale(1) to be able to show the altmon_X fields and the [cxX]_fmt's.
...
Also modify the "-k list" option to display only fields with a certain prefix.
MFC after: 1 week
2009-10-05 07:13:15 +00:00
Dag-Erling Smørgrav
ae02066b83
Let the armchair generals handle this one.
2009-09-04 07:44:58 +00:00
Dag-Erling Smørgrav
5b1237b600
Document the need for a cast when passing a char to a ctype function.
...
MFC after: 2 weeks
2009-09-03 10:06:37 +00:00
Roman Divacky
f400c2b850
Change dstp to be const and remove bogus cast.
...
Submitted by: christoph.mallon at gmx.de
Approved by: kib (mentor)
2009-01-15 20:45:59 +00:00
Roman Divacky
f27b1c064c
Introduce a local variable and use it instead of passed in parameter
...
to get rid of restrict qualifier discarding. This lets libc compile
cleanly in gnu99 mode.
Suggested by: kib, christoph.mallon at gmx.de
Approved by: kib (mentor)
2009-01-15 18:53:52 +00:00
Antoine Brodin
59e7781613
Don't allocate the constant array "props" on the stack in wctype.
...
PR: 74743
Submitted by: knut st. osmundsen
Approved by: rwatson (mentor)
MFC after: 1 month
2008-03-17 18:22:23 +00:00
Andrey A. Chernov
67e7bdee55
Fix longstanding mb/wc functions segfault if error occurse
...
inside _<encoding>_init().
Currently _EUC_init() only was affected.
2008-01-23 03:05:35 +00:00
Andrey A. Chernov
5ebf111155
Better fix for longstanding segfault. Don't touch current locale at all
...
on unknown encoding. Previous fix resets it to POSIX.
2008-01-23 02:17:27 +00:00
Andrey A. Chernov
5776848851
1) Add (void) cast to _none_init() (while I am here)
...
2) Fix longstanding segfault in mb/wc code when unknown encoding is specified
in the locale file (mb/wc functions becomes NULL in that case).
2008-01-23 01:57:26 +00:00
Andrey A. Chernov
91e0bf6a77
Introduce new encoding: "ASCII"
...
It differs from default C/POSIX "NONE" mainly by stricter 8bit check
for mb*towc*/wc*tomb* family, returning EILSEQ
2008-01-21 23:48:12 +00:00
Alexey Zelkin
2992b5e82c
Remove 3rd clause of license
...
Per request of: glenn halperin at symbian.com
2007-12-12 07:43:23 +00:00
Rong-En Fan
a964324e72
- Include runetype.h for _RuneLocale_
2007-11-07 14:45:48 +00:00
Andrey A. Chernov
7f5004e7ba
Back out 2nd part of wrong iswascii() change in prev. commit.
2007-10-23 17:39:28 +00:00
Andrey A. Chernov
4932c895e7
Add comment explaining __mb_sb_limit trick here.
2007-10-15 09:51:30 +00:00
Andrey A. Chernov
367ed4e13d
The problem is: currently our single byte ctype(3) functions are broken
...
for wide characters locales in the argument range >= 0x80 - they may
return false positives.
Example 1: for UTF-8 locale we currently have:
iswspace(0xA0)==1 and isspace(0xA0)==1
(because iswspace() and isspace() are the same code)
but must have
iswspace(0xA0)==1 and isspace(0xA0)==0
(because there is no such character and all others in the range
0x80..0xff for the UTF-8 locale, it keeps ASCII only in the single byte
range because our internal wchar_t representation for UTF-8 is UCS-4).
Example 2: for all wide character locales isalpha(arg) when arg > 0xFF may
return false positives (must be 0).
(because iswalpha() and isalpha() are the same code)
This change address this issue separating single byte and wide ctype
and also fix iswascii() (currently iswascii() is broken for
arguments > 0xFF).
This change is 100% binary compatible with old binaries.
Reviewied by: i18n@
2007-10-13 16:28:22 +00:00
Gabor Kovesdan
b9d8f1d9c7
- Fix typo
...
Approved by: keramida (mentor)
MFC after: 3 days
2007-05-04 16:01:07 +00:00
Daniel Eischen
5f864214bb
Use C comments since we now preprocess these files with CPP.
2007-04-29 14:05:22 +00:00
Warner Losh
c879ae3536
Per Regents of the University of Calfornia letter, remove advertising
...
clause.
# If I've done so improperly on a file, please let me know.
2007-01-09 00:28:16 +00:00
Ruslan Ermilov
9a29fb3baf
Add missing comma.
2006-10-13 16:11:12 +00:00
Tom Rhodes
639dab2286
Fix a bug where, for 6-byte sequences, the top 6 bits get compared to
...
111111 rather than the top 7 bits being compared against 1111110 causing
illegal bytes fe and ff being treated the same as legal bytes fc and fd.
2006-03-30 09:04:12 +00:00
Daniel Eischen
4c6aab055d
Add __collate_load_error and __collate_range_cmp to the list of
...
FBSDprivate locale symbols. These functions are needed by
libcompat.
Add _cleanup to the list of stdio FBSDprivate symbols. Some
third party applications use this. This will be removed and
replaced by fcloseall() once libc version is bumped.
Add _res to the list of resolv symbols.
Found by: portbuilder runs (thanks Kris!)
2006-03-30 04:37:08 +00:00
Daniel Eischen
6fad3aaf15
Add each directory's symbol map file to SYM_MAPS.
2006-03-13 01:15:01 +00:00
Daniel Eischen
cce72e8860
Add symbol maps and initial symbol version definitions to libc.
...
Reviewed by: davidxu
2006-03-13 00:53:21 +00:00
Ruslan Ermilov
110e1704d3
-mdoc sweep.
2005-11-17 13:00:00 +00:00
Stefan Farfeleder
613100918d
Include a couple of headers to ensure consistency between the prototype and
...
the function definition.
2005-09-12 19:52:42 +00:00
Tim J. Robbins
d2a57b3026
Add HISTORY section.
2005-07-21 10:53:27 +00:00
Tim J. Robbins
9376b9d71a
Add cross-reference to nextwctype(3).
2005-07-21 10:32:17 +00:00
Tim J. Robbins
5a94ee1180
Add COMPATIBILITY and HISTORY sections. Fix typo.
2005-07-21 10:27:45 +00:00
Tim J. Robbins
a385e04b47
Remove confusing "single C char locales" phrase; arguments to these
...
functions and must now be either an unsigned char or EOF, regardless of
locale.
2005-07-17 04:11:06 +00:00
Tim J. Robbins
5b86168f54
Remove confusing "single C char locales" phrase; arguments to tolower()
...
and toupper() must now be either an unsigned char or EOF, regardless of
locale.
2005-07-17 03:37:00 +00:00
Ruslan Ermilov
228f8c4f8b
Make <runefile.h> internal to libc.
...
Suggested by: phantom
2005-05-16 09:32:41 +00:00
Ruslan Ermilov
edc431123e
Make the format of LC_COLLATE files architecture independent.
2005-02-27 20:31:13 +00:00
Alexey Zelkin
e94c6cb4a2
. Static'ize functions exported via function reference variables only.
...
. Replace inclusion of sys/param.h to sys/cdefs.h and sys/types.h where
appropriate.
. move _*_init() prototypes to mblocal.h, and remove these prototypes
from .c files
. use _none_init() in __setrunelocale() instead of duplicating code
. move __mb* variables from table.c to none.c allowing us to not to
export _none_*() externs, and appropriately remove them from mblocal.h
Ok'ed by: tjr
2005-02-27 15:11:09 +00:00
Alexey Zelkin
f9b5e461bb
ANSI'fy prototypes
2005-02-27 14:54:23 +00:00
Ruslan Ermilov
3fb3a43079
Make the format of LC_CTYPE files architecture independent by
...
introducing the disk formats for _RuneLocale and friends.
The disk formats do not have (useless) pointers and have 32-bit
quantities instead of rune_t and long. (htonl(3) only works
with 32-bit quantities, so there's no loss).
Bootstrap mklocale(1) when necessary. (Bootstrapping from 4.x
would be trivial (verified), but we no longer provide pre-5.3
source upgrades and this is the first commit to actually break
it.)
2005-02-26 21:47:54 +00:00
Stefan Farfeleder
610b5a1fb1
Fix comparisons that test if an unsigned value is < 0.
...
Reviewed by: tjr
2005-02-12 08:45:12 +00:00
Ruslan Ermilov
24a0682c64
Sort sections.
2005-01-20 09:17:07 +00:00
Ruslan Ermilov
e8fbc77632
Markup style.
2005-01-15 11:22:13 +00:00
Ruslan Ermilov
2d82ac3110
Scheduled mdoc(7) sweep.
2005-01-11 20:50:51 +00:00
Tim J. Robbins
17ebe40096
Implement rpmatch(), a semi-standard interface (as found on AIX, Tru64,
...
GNU) for determining whether a string is an affirmative or negative
response to a question according to the current locale. This is done
by matching the response against nl_langinfo(3) items YESEXPR and NOEXPR.
2005-01-09 03:55:13 +00:00
Andrey A. Chernov
27ecbe8a77
Remove setrunelocale()
2004-10-18 02:06:18 +00:00
Tim J. Robbins
31d330fb2a
Remove the obsolete <rune.h> interface.
2004-10-17 06:51:50 +00:00
Tim J. Robbins
79a3948997
Remove support for the obsolete UTF2 encoding.
2004-10-17 02:29:15 +00:00
Stefan Farfeleder
e60b9f5130
Prefer C99's __func__ over GCC's __FUNCTION__.
2004-09-22 16:56:49 +00:00
Tim J. Robbins
8d2a49a247
Re-word warning about the UTF2 encoding, taking care to use the word
...
"obsolete" instead of "deprecated".
2004-08-21 08:08:29 +00:00
Tim J. Robbins
4740653c84
Bump document date for previous.
2004-08-21 08:03:18 +00:00
Tim J. Robbins
6a4d3d68c7
Re-word warning about the rune interface, taking care to use the word
...
"obsolete" instead of "deprecated".
2004-08-21 08:00:31 +00:00
Tim J. Robbins
5a52f3c22c
Change "deprecated" in link-time warnings about various rune functions
...
to "obsolete".
2004-08-21 07:48:06 +00:00
Tim J. Robbins
b9b90a1312
Re-word compatibility section, taking care to use the word "obsolete" to
...
describe the 4.4BSD extension of accepting characters (runes) outside of
the range of unsigned char.
2004-08-21 07:37:08 +00:00
Tom Rhodes
1bdc6fddbf
/me kicks cvs update
...
Revert previous commit, tjr already fixed it and I was too stupid to
notice this fact.
Approved by: re (to avoid failing cvs ci)
2004-08-17 04:56:03 +00:00
Tom Rhodes
daa790840c
Fix incorrect code in an example. The previous example would produce
...
19 column positions wide in the first line and 20 in the rest of the lines.
This fixes the example to provide the correct output.
PR: 53454
Noticed by: Kuang-che Wu <kcwu@kcwu.homeip.net>
Submitted by: Marc Silver <marcs@draenor.org>
Approved by: re (scottl)
2004-08-17 04:45:52 +00:00
Tim J. Robbins
5349fd7f49
Fix example.
2004-08-12 12:32:14 +00:00
Tim J. Robbins
de6c9c9d5b
Implement wcwidth() as an inline function.
2004-08-12 12:19:11 +00:00
Tim J. Robbins
0db74aa4a9
Re-word the COMPATIBILITY section, taking care to use the word "deprecated"
...
to describe the 4.4BSD extension of accepting arguments outside the range
of unsigned char. This gives us freedom to remove this extension when we
remove the <rune.h> interface in FreeBSD 6.
2004-07-29 23:32:41 +00:00
Tim J. Robbins
a351559479
Remove unnecessary #include directives.
2004-07-29 06:18:40 +00:00
Tim J. Robbins
a0998ce663
Prefer <runetype.h> to <rune.h>, since the latter is going away soon.
2004-07-29 06:16:19 +00:00
Tim J. Robbins
e214931fbf
Remove useless checks for characters longer than INT_MAX bytes.
2004-07-29 06:08:31 +00:00
Tim J. Robbins
ea9a9a377b
Add UTF-8-specific implementations of mbsnrtowcs() and wcsnrtombs().
...
These convert plain ASCII characters in-line, making them only slightly
slower than the single-byte ("NONE" encoding) version when processing
ASCII strings.
2004-07-27 06:29:48 +00:00
Tim J. Robbins
6740cd8374
Return the correct value when dst == NULL and conversion has stopped after
...
nwc dropping to zero.
2004-07-22 02:57:29 +00:00
Tim J. Robbins
1949a3470f
Implement the GNU extensions of mbsnrtowcs() and wcsnrtombs(). These are
...
convenient when the source string isn't null-terminated.
Implement the other conversion functions (mbstowcs(), mbsrtowcs(), wcstombs(),
wcsrtombs()) in terms of these new functions.
2004-07-21 10:54:57 +00:00
Tim J. Robbins
550473de5b
Add fast paths for conversion of plain ASCII characters.
2004-07-09 15:46:06 +00:00
Tim J. Robbins
ee446de0b1
Add a function to iterate over all characters in a particular character
...
class. This is necessary in order to implement tr(1) efficiently in
multibyte locales, since the brute force method of finding all characters
in a class is infeasible with a 32-bit (or wider) wchar_t.
2004-07-08 06:43:37 +00:00
Ruslan Ermilov
b9384efc1c
Markup nits.
2004-07-05 06:39:03 +00:00
Ruslan Ermilov
1c85060a13
Sort SEE ALSO references (in dictionary order, ignoring case).
2004-07-04 20:55:50 +00:00
Ruslan Ermilov
1a0a934547
Mechanically kill hard sentence breaks.
2004-07-02 23:52:20 +00:00
Ruslan Ermilov
d37ea99837
Removed trailing whitespace.
2004-07-02 19:07:33 +00:00
Ruslan Ermilov
33992dc0ed
Markup, grammar, and spelling fixes.
2004-06-30 20:09:10 +00:00
Ruslan Ermilov
bd486f888e
Fixed a typo.
2004-06-30 19:32:41 +00:00
Tim J. Robbins
ddc1eded85
Prefix the names of members of _RuneLocale and its sub-structures
...
with ``__'' to avoid polluting the namespace. This doesn't change the
documented rune interface at all, but breaks applications that accessed
_RuneLocale directly.
2004-06-23 07:01:44 +00:00
Mike Pritchard
c20133b039
Spelling fixes.
2004-06-21 19:54:56 +00:00
Tim J. Robbins
c05bd9ae25
Buffer partial wide characters more efficiently: instead of storing the
...
multibyte representation in conversion state objects, store the
accumulated wide character, set number and number of bytes remaining
to avoid having to derive them every time mbrtowc() is called.
2004-05-27 10:54:34 +00:00
Tim J. Robbins
18b2031298
Scan the source string for invalid wide characters in wcsrtombs()
...
in the dst == NULL case.
2004-05-25 10:45:24 +00:00
Tim J. Robbins
675e7ddbee
Grab all the information we need about a character with one call to
...
__maskrune() instead of one direct call and one through iswprint().
2004-05-23 13:20:09 +00:00
Tim J. Robbins
5e44d7ebe1
Use conversion state objects to store the accumulated wide character,
...
low bound, and the number of bytes remaining instead of storing the
raw byte sequence and deriving them every time mbrtowc() is called.
This is much faster -- about twice as fast in some crude benchmarks.
2004-05-17 12:32:40 +00:00
Tim J. Robbins
6107476759
Use a simpler and faster buffering scheme for partial multibyte characters.
2004-05-17 11:16:14 +00:00
Tim J. Robbins
b666b593eb
Use a simpler, faster buffering scheme for partial characters in mbrtowc().
2004-05-14 15:40:47 +00:00
Tim J. Robbins
ea4ac135ff
Allow encoding modules to override the default implementations of
...
mbsrtowcs() and wcsrtombs(). Provide a fast implementation for the
trivial "NONE" encoding.
2004-05-13 11:20:27 +00:00
Tim J. Robbins
f789f94dbb
Fix braino in previous: check that the second byte in the character
...
buffer is non-null when the character is two bytes long, not when
the buffer is two bytes long.
2004-05-13 03:08:28 +00:00
Tim J. Robbins
6155c34adf
Reduce overhead by calling internal versions of the multibyte conversion
...
functions directly wherever possible.
2004-05-12 14:26:54 +00:00
Tim J. Robbins
2051a8f2d5
Move prototypes of various encoding-related functions into a new header
...
file to avoid extern'ing them all over the place.
2004-05-12 14:09:04 +00:00
Tim J. Robbins
88af941a73
In the absence of proper validation, at least check that null bytes
...
do not appear as anything but the first byte of a multibyte character.
2004-05-11 14:08:22 +00:00
Tim J. Robbins
45a11576f3
Use a binary search to find the range containing a character in
...
RuneRange arrays. This is much faster when there are hundreds of
ranges (as is the case in UTF-8 locales) and was inspired by a
similar change made by Apple in Darwin.
2004-05-09 13:04:49 +00:00
Andrey A. Chernov
28aec5a68c
Rewrite split_lines() to operate safely
...
PR: 62694
Submitted by: moulin p <moulin.p@calyopea.com>
2004-04-25 19:56:50 +00:00
Tim J. Robbins
fc813796d2
Perform some basic validation of multibyte conversion state objects.
2004-04-12 13:09:18 +00:00
Tim J. Robbins
c282a0a1ed
Remove a nonsensical remark about byte order markers in UTF-8 streams.
2004-04-12 12:58:41 +00:00
Tim J. Robbins
78c4a3f225
Document the meaning of the zero return value.
2004-04-11 05:19:19 +00:00
David Xu
6464650388
Fix a typo. I was locked out for two days from my machine.
2004-04-10 14:36:57 +00:00
Tim J. Robbins
fa02ee78c8
Don't cast away const qualifiers.
...
Spotted by: bde
2004-04-10 00:27:52 +00:00
Tim J. Robbins
8b8109275c
Update manual pages for change to C99 mbrtowc() semantics.
2004-04-08 09:59:02 +00:00
Tim J. Robbins
ca2dae426e
Allow partial multibyte characters to accumulate in conversion state
...
objects passed to mbrtowc(), mbsrtowcs(), and mbrlen(), as required
by C99.
2004-04-07 10:48:19 +00:00
Tim J. Robbins
e97e856274
Begin conversions for sgetrune() and sputrune() in the initial
...
conversion state.
2004-04-07 09:49:10 +00:00
Tim J. Robbins
dc763237da
Prepare to handle state-dependent encodings. This mainly involves not
...
taking shortcuts when it comes to storing and passing around conversion
states.
2004-04-07 09:47:56 +00:00
Tim J. Robbins
ed870c6a8e
Begin in the initial shift state in mbstowcs() and wcstombs().
...
(This change is non-functional since nothing uses states yet.)
2004-04-07 08:33:23 +00:00
Tim J. Robbins
74f90def09
Prepare to handle state-dependent encodings. This mainly involves not
...
taking shortcuts when it comes to storing and passing around conversion
states.
2004-04-06 13:14:03 +00:00
Tim J. Robbins
4fb9e805dc
Remove support for emulating mbrtowc() and wcrtomb() in terms of the
...
old rune interface now that it is no longer needed.
2004-04-04 11:31:29 +00:00
Tim J. Robbins
4f6d4aa30d
Reimplement the GB18030 encoding method using the new-style (mbrtowc()/
...
wcrtomb()) interface.
2004-04-04 11:00:42 +00:00
Tim J. Robbins
54c61797df
Reimplement the deprecated UTF2 encoding method using the UTF-8 code
...
as a base. mbrtowc() and wcrtomb() are now implemented directly
instead of being emulatedi with sgetrune() and sputrune().
2004-04-04 10:49:45 +00:00
Tim J. Robbins
6de4bcc717
Add cross-references to isideogram(3), isphonogram(3), isrune(3),
...
isspecial(3) and wctype(3).
2004-03-30 08:11:57 +00:00
Tim J. Robbins
32d9553d83
Add basic manual pages for isideogram(), isphonogram(), isrune()
...
and isspecial().
2004-03-30 07:23:54 +00:00
Tim J. Robbins
bee1de57ca
Trim cross-references.
2004-03-30 07:19:35 +00:00
Tim J. Robbins
ba6699086d
Document the isnumber() and ishexnumber() functions, and explain how they
...
differ (at least in theory) from isdigit() and isxdigit().
2004-03-30 07:02:04 +00:00
Tim J. Robbins
ab02b93f75
Remove duplicate MLINK.
2004-03-29 21:46:52 +00:00
Tim J. Robbins
97062607cd
Recognize the "rune" character class in wctype().
2004-03-27 08:59:21 +00:00
Diomidis Spinellis
3f0a01ea87
Make consistent with the better written wcsrtombs function:
...
- Fix syntax
- Remove the (slightly wrong) duplicate explanation of the error condition
- Change reference to invalid multibyte character into invalid wide character
2004-02-27 15:03:22 +00:00
Andrey A. Chernov
41ddc53bca
LC_ALL not always take priority over other LC_*
...
Obtained from: NetBSD
PR: 62047
2004-01-31 19:15:32 +00:00
Andrey A. Chernov
e6e9fb749a
Add reference to environ(7)
2004-01-29 09:27:24 +00:00
Jacques Vidrine
84d9142f58
Remove unused variables and function declarations. Add missing headers.
2004-01-06 18:26:15 +00:00
Andrey A. Chernov
ad4688e131
Properly advance "x/y/z" form slash-pointers in some rare cases
...
PR: 60539
2003-12-24 10:16:46 +00:00
Andrey A. Chernov
6abda1f093
First byte of GBK-like sequences is 0x81, not 0x80
2003-12-19 12:54:42 +00:00
Tim J. Robbins
40c5c1f8a1
Set __mbrtowc and __wcrtomb correctly when changing to the C/POSIX locale.
...
Save __mbrtowc and __wcrtomb and restore them when changing back to
the cached locale.
Reported by: perky
2003-12-08 23:52:22 +00:00
Tim J. Robbins
bc0b3a1800
Split multibyte(3) into separate manual pages for each function.
...
Instead of just deleting it, turn the original page into a general
overview of the multibyte character conversion functions, somewhat
similar to stdio(3).
2003-12-07 06:33:52 +00:00
Tim J. Robbins
da44487bd7
Split the documentation for localeconv() off into a separate manual page.
2003-12-07 06:00:00 +00:00
Tim J. Robbins
8962b7a518
Update cross references after utf2/euc move.
2003-11-15 02:26:04 +00:00
Tim J. Robbins
f76c65296c
Remove section 4 versions of these manual pages, they have been
...
moved into section 5.
2003-11-15 02:15:25 +00:00
Tim J. Robbins
93584b12e6
Install the section 5 versions of EUC and UTF2 manual pages instead of
...
the section 4 versions.
2003-11-15 02:13:09 +00:00
Tim J. Robbins
ee0694adb9
Update the EUC and UTF2 manual pages for their new home in section 5.
...
These have been repo-copied from euc.4 and utf2.4.
2003-11-15 01:54:46 +00:00
Tim J. Robbins
b1c572ad5b
Fix a typo that caused mbrtowc() to always return 0.
2003-11-11 07:25:05 +00:00
Tim J. Robbins
cc7a3285a5
Add one more cross-reference to gb2312(5).
2003-11-08 03:23:11 +00:00
Tim J. Robbins
16854d3c8f
Add cross-references to new gb2312(5) manual page.
2003-11-08 03:07:56 +00:00
Tim J. Robbins
e31d6d8149
Add a fairly simple manual page for the new GB2312 encoding.
2003-11-08 03:02:45 +00:00
Tim J. Robbins
9e0bd333f0
Remove unused #includes.
2003-11-08 02:58:37 +00:00
Tim J. Robbins
eb402e14d8
Use __inline instead of inline.
2003-11-08 02:56:03 +00:00
Tim J. Robbins
c2f9330393
Refer to wide characters instead of runes. Remove redundant example locale.
...
Catch up with renaming of "Japanese" to "ja_JP.eucJP". Comment out the
statement that EUC is provided for compatibility with UNIX-based systems;
this is not a very good opening paragraph.
2003-11-08 02:52:31 +00:00
Tim J. Robbins
5d9c483db1
Refer to wide characters instead of runes.
2003-11-08 02:46:02 +00:00
David Xu
6d7a04b013
Add gb2312 encoding.
2003-11-05 22:52:51 +00:00
Tim J. Robbins
90c7d99f5b
Implement mbrtowc() and wcrtomb() directly (sync with big5.c).
2003-11-05 07:56:45 +00:00
Tim J. Robbins
02f4f60ad5
Convert the Big5, EUC, MSKanji and UTF-8 encoding methods to implement
...
mbrtowc() and wcrtomb() directly. GB18030, GBK and UTF2 are left
unconverted; GB18030 will be done eventually, but GBK and UTF2 may just
be removed, as they are subsets of GB18030 and UTF-8 respectively.
2003-11-02 10:09:33 +00:00
Tim J. Robbins
d390e53270
Remove TODO comment about creating a macro version of towctrans().
...
Remove unnecessary inclusion of <ctype.h>.
2003-11-01 08:20:58 +00:00
Tim J. Robbins
d4f6cd06dd
Allow mbrtowc() and wcrtomb() to be implemented directly, instead of
...
as wrappers around the deprecated 4.4BSD rune functions. This paves the
way for state-dependent encodings, which the rune API does not support.
- Add __emulated_sgetrune() and __emulated_sputrune(), which are
implementations of sgetrune() and sputrune() in terms of
mbrtowc() and wcrtomb().
- Rename the old rune-wrapper mbrtowc() and wcrtomb() functions to
__emulated_mbrtowc() and __emulated_wcrtomb().
- Add __mbrtowc and __wcrtomb function pointers, which point to the
current locale's conversion functions, or the __emulated versions.
- Implement mbrtowc() and wcrtomb() as calls to these function pointers.
- Make the "NONE" encoding implement mbrtowc() and wcrtomb() directly.
All of this emulation mess will be removed, together with rune support,
in FreeBSD 6.
2003-11-01 05:13:13 +00:00
Tim J. Robbins
1e8742e9cd
Don't bother passing a freshly-zeroed mbstate to mbsrtowcs() etc.
...
when the current implementation won't use it, anyway. Just pass NULL.
This will need to be changed when state-dependent encodings are
supported, but there's no need to take the performance hit
in the meantime.
2003-10-31 13:29:00 +00:00
Tim J. Robbins
cf651e6b5c
Implement fgetrune(), fungetrune() and fputrune() as wrappers around
...
fgetwc(), ungetwc() and fputwc().
2003-10-31 10:55:19 +00:00
Tim J. Robbins
4539e95a0f
Remove incomplete support for running FreeBSD userland on old NetBSD kernels
...
lacking the issetugid() and utrace() syscalls.
2003-10-29 10:45:01 +00:00
Ruslan Ermilov
fe08efe680
mdoc(7): Use the new feature of the .In macro.
2003-09-08 19:57:22 +00:00