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