Commit Graph

334 Commits

Author SHA1 Message Date
Andrey A. Chernov
9d793e98ec Add GBK encoding
PR:             51504
Submitted by:   Statue <statue@freebsd.sinica.edu.tw>
2003-06-01 15:30:56 +00:00
Ruslan Ermilov
3a5146d9e2 Assorted mdoc(7) fixes.
Approved by:	re (blanket)
2003-05-22 13:02:28 +00:00
Jacques Vidrine
d05090827f Back out the `hiding' of strlcpy and strlcat. Several people
vocally objected to this safety belt.
2003-05-01 19:03:14 +00:00
Jacques Vidrine
5723e501ab `Hide' strlcpy and strlcat (using the namespace.h / __weak_reference
technique) so that we don't wind up calling into an application's
version if the application defines them.

Inspired by:	qpopper's interfering and buggy version of strlcpy
2003-04-29 21:13:50 +00:00
Tim J. Robbins
e3e8878435 When called with s == NULL, behave as if wc == L'\0' as required by the
standard.
2003-04-10 09:20:38 +00:00
Andrey A. Chernov
cfcd9a45b5 According to C99 decimal_point can't be the empty string, mention it. 2003-03-20 08:13:34 +00:00
Andrey A. Chernov
befb332a6b decimal_point can't be "" according to C99, so set it to standard "."
in that case.
2003-03-20 08:05:20 +00:00
Tim J. Robbins
542bd65fcb MFp4: Implementations of the wcstof() and wcstold() functions. 2003-03-13 06:29:53 +00:00
Tim J. Robbins
60bf07bd33 Fix a bad free() call that would occur if some #if 0'd code was used. 2003-02-22 00:06:05 +00:00
Jacques Vidrine
6d7bd75a4e Whack 28 unused variables. 2003-02-18 13:39:52 +00:00
Philippe Charnier
d649825182 The .Fn function 2003-02-06 11:04:47 +00:00
Jens Schweikhardt
9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Ruslan Ermilov
facc67676f mdoc(7) police: Deal with self-xrefs. 2002-12-24 13:41:48 +00:00
Ruslan Ermilov
2efeeba554 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
Ruslan Ermilov
5c564bae0a mdoc(7) police: Fixed abuses of the .Ar and .Em macros. 2002-12-18 13:33:04 +00:00
Ruslan Ermilov
1fae73b137 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
Ruslan Ermilov
db8993ce9e Capitalize ASCII code names.
Approved by:	re
2002-12-05 08:50:00 +00:00
Ruslan Ermilov
279062fae1 mdoc(7) police: sweep. 2002-11-29 17:35:09 +00:00
Ruslan Ermilov
92b1f2f7a3 mdoc(7) police: sweep. 2002-11-29 16:42:23 +00:00
Ruslan Ermilov
c51d717f0c libc_r wasn't so tied to libc for 22 months. 2002-11-18 09:50:57 +00:00
Tim J. Robbins
b18146b4c2 Add cross references to mbrtowc(3) and wcrtomb(3). 2002-11-10 11:14:58 +00:00
Tim J. Robbins
2f5154a2c1 Don't check whether the first byte of the buffer is a null byte when
the buffer has zero length (n == 0).
2002-11-10 10:49:14 +00:00
Tim J. Robbins
7183f43d95 Describe the n' and ps' arguments to mbrlen(). 2002-11-09 10:21:01 +00:00
Tim J. Robbins
f4937dbebc Typo: pointer to -> pointed to 2002-11-09 09:47:06 +00:00
Tim J. Robbins
490eeb06b4 Use wide character ctype functions directly instead of relying on
4.4BSD extensions to the single-byte ctype functions.
2002-11-09 05:19:08 +00:00
Tim J. Robbins
39df93ae41 Add a missing return statement for the pwcs == NULL case (XSI extension). 2002-11-09 04:13:26 +00:00
Tim J. Robbins
f6b767e33f Add two additional references to the See Also section, which contain much
better descriptions of UTF-8 and related issues.
2002-10-30 11:49:05 +00:00
Tim J. Robbins
a019c0e525 Remove unnecessary inclusion of <rune.h> to make it obvious that this file
does not use the deprecated rune system.
2002-10-29 09:03:57 +00:00
Tim J. Robbins
c5929b304e Handle boundary cases more correctly; mblen(s, 0) and mbtowc(NULL, s, 0)
return -1 regardless of what s points to, mbtowc(&w, s, 1) sets w to a
null wide character when s points to a null byte. This seems to be closer
to what most other implementations do, but the C99 standard contradicts
itself for these cases.
2002-10-28 08:24:46 +00:00
Garrett Wollman
688dfe4533 Do not include <sys/syslimits.h> directly; it is not intended for general
consumption.
2002-10-27 17:44:33 +00:00
Tim J. Robbins
b6f33850e0 Style sweep. 2002-10-27 10:41:21 +00:00
Tim J. Robbins
583efa1268 Use an internal buffer for the result when the first argument is NULL. 2002-10-25 13:24:45 +00:00
Tim J. Robbins
9acd2d9b3c Avoid truncating invalid wide characters that are outside the range of
'unsigned char'; signal an error instead.
2002-10-16 11:37:38 +00:00
Tim J. Robbins
0b78986fe2 FA, FB and FC are lead bytes according to recent Microsoft documentation. 2002-10-14 01:50:45 +00:00
Tim J. Robbins
d891f26821 Style changes. Mainly removing excessive whitespace and parens. 2002-10-14 01:46:18 +00:00
Andrey A. Chernov
8a093dade3 Cosmetic: use LCMONETARY_SIZE_{FULL,MIN} defines like in other places 2002-10-12 11:31:07 +00:00
Tim J. Robbins
972baa3747 Add a UTF-8 encoding method, which will eventually replace the antique
"UTF2" method. Although UTF-8 and the old UTF2 encoding are compatible
for 16-bit characters, the new UTF-8 implementation is much more strict
about rejecting malformed input and also handles the full 31 bit range
of characters.
2002-10-10 22:56:18 +00:00
Tim J. Robbins
f4da1a754d Add support for the 6 new C99 struct lconv members dealing with formatting
international monetary values: int_p_cs_precedes, int_n_cs_precedes,
int_p_sep_by_space, int_n_sep_by_space, int_p_sign_posn, int_n_sign_posn.
This should not break existing binaries or LC_MONETARY data files.

Reviewed by:	ache
MFC after:	1 month
2002-10-09 09:19:28 +00:00
Tim J. Robbins
d9e5246b17 Add a note to the Compatiblity section suggesting that these functions
only be used for byte values. Add cross-references to the wide-char
counterparts.
2002-10-06 10:15:38 +00:00
Tim J. Robbins
82f520853b Remove rants/whines about the rune interface being superior to the
ISO C interface.
2002-10-06 06:03:23 +00:00
Tim J. Robbins
bc98899df0 Remove a completely incorrect statement from the Return Values section.
Add cross-references to the restartable mulitybte functions (mbrlen(3) etc.)
2002-10-06 05:58:24 +00:00
Tim J. Robbins
17f6e5b0e7 Improve three instances of questionable or confusing grammar. 2002-10-03 14:09:06 +00:00
Tim J. Robbins
28ddc4138c Add an example. 2002-10-03 14:07:26 +00:00
Tim J. Robbins
b06b097805 Document towlower() and towupper() in separate manual pages instead of
trying to confusingly document both on the same page. The new manual pages
are based on tolower(3) and toupper(3) instead of the old towlower(3).
2002-10-03 11:23:06 +00:00
Tim J. Robbins
9981ef2702 Point out that although toupper() and tolower() really accept rune_t's
and not just unsigned char's, callers should use towupper() and towlower()
instead when working with wide characters if portability is a concern.
2002-10-03 11:14:00 +00:00
Tim J. Robbins
73d6e4a5a2 towlower() appeared twice in the synopsis; one of the occurrences should
have been towupper(). Add towupper() to the Name section while I'm at it.

Obtained from:	NetBSD (junyoung)
2002-10-03 10:40:01 +00:00
Tim J. Robbins
f2a67ef1bd Add an Examples section with an example of how to use the functions. 2002-10-03 08:49:29 +00:00
Tim J. Robbins
03ab141313 Warn when setinvalidrune() is referenced for consistency with the rest
of the rune functions (except sgetrune() and sputrune(), which are really
macros).
2002-09-24 09:25:37 +00:00
Tim J. Robbins
1302dabd28 Add the remaining C99 wide character string to integer conversion functions.
Restrict qualifiers were added to the existing prototypes in <inttypes.h>
and the typedef for wchar_t was removed.
2002-09-22 08:06:45 +00:00
Tim J. Robbins
530bb9225d Deprecate the rest of the rune interface. 2002-09-18 06:19:12 +00:00