Commit Graph

325 Commits

Author SHA1 Message Date
schweikh
d3367c5f5d Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
ru
4979ab8d81 mdoc(7) police: Deal with self-xrefs. 2002-12-24 13:41:48 +00:00
ru
51fe7c1a88 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
ru
863465c1ab mdoc(7) police: Fixed abuses of the .Ar and .Em macros. 2002-12-18 13:33:04 +00:00
ru
8746d263e1 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
ru
4b97577172 Capitalize ASCII code names.
Approved by:	re
2002-12-05 08:50:00 +00:00
ru
ec73cae726 mdoc(7) police: sweep. 2002-11-29 17:35:09 +00:00
ru
ecf768b1cc mdoc(7) police: sweep. 2002-11-29 16:42:23 +00:00
ru
40e2359f4b libc_r wasn't so tied to libc for 22 months. 2002-11-18 09:50:57 +00:00
tjr
29fe4660c0 Add cross references to mbrtowc(3) and wcrtomb(3). 2002-11-10 11:14:58 +00:00
tjr
68886a9d65 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
tjr
5401930441 Describe the n' and ps' arguments to mbrlen(). 2002-11-09 10:21:01 +00:00
tjr
266f7b288a Typo: pointer to -> pointed to 2002-11-09 09:47:06 +00:00
tjr
6eb74185cd 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
tjr
cbcd393990 Add a missing return statement for the pwcs == NULL case (XSI extension). 2002-11-09 04:13:26 +00:00
tjr
f84979c549 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
tjr
3c0cce1566 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
tjr
61b6263e81 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
wollman
f8a79b86e6 Do not include <sys/syslimits.h> directly; it is not intended for general
consumption.
2002-10-27 17:44:33 +00:00
tjr
dd9e331ae2 Style sweep. 2002-10-27 10:41:21 +00:00
tjr
035cd9e947 Use an internal buffer for the result when the first argument is NULL. 2002-10-25 13:24:45 +00:00
tjr
ccd9275d4e 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
tjr
bfd4cfc4dc FA, FB and FC are lead bytes according to recent Microsoft documentation. 2002-10-14 01:50:45 +00:00
tjr
061d1d394f Style changes. Mainly removing excessive whitespace and parens. 2002-10-14 01:46:18 +00:00
ache
6ee6cab0af Cosmetic: use LCMONETARY_SIZE_{FULL,MIN} defines like in other places 2002-10-12 11:31:07 +00:00
tjr
d62abf19a3 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
tjr
c112e4d2cb 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
tjr
b5f0d0d8f2 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
tjr
9e7f867aa7 Remove rants/whines about the rune interface being superior to the
ISO C interface.
2002-10-06 06:03:23 +00:00
tjr
b3e1209c7a 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
tjr
064f96637b Improve three instances of questionable or confusing grammar. 2002-10-03 14:09:06 +00:00
tjr
89d813cf15 Add an example. 2002-10-03 14:07:26 +00:00
tjr
e3f15214bf 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
tjr
b9c5c09473 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
tjr
915a8cf342 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
tjr
f18ee8bb40 Add an Examples section with an example of how to use the functions. 2002-10-03 08:49:29 +00:00
tjr
2f81b61678 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
tjr
491569a0a7 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
tjr
397f4349cf Deprecate the rest of the rune interface. 2002-09-18 06:19:12 +00:00
tjr
7eb8c7cf9a Mark mbmb(), mbrune(), and mbrrune() as deprecated functions. We want to
get applications to move to the ISO C interfaces as well as have the
freedom to replace the rune interfaces with ones that support stateful
conversions some time in the future.
2002-09-18 06:11:21 +00:00
tjr
8569d04e14 Add wcstod() as a wrapper around strtod(). It does not handle any characters
that strtod() does not (alternate digit characters, etc. are not handled).
2002-09-15 08:38:51 +00:00
tjr
b2a34e6f87 Use the heap instead of the stack to store temporary multibyte string
buffers; this is slower but safer for threaded programs where threads
often have relatively low stack size limits.
2002-09-15 08:06:17 +00:00
tjr
4448ddb047 Correct type of second argument: it is wchar_t ** restrict,
not wchar_t * restrict.
2002-09-12 09:25:27 +00:00
tjr
5f5cd9d0b8 Add an implementation of wcsftime() (wide character version of strftime()). 2002-09-11 08:57:11 +00:00
tjr
7c848d9cfd Add wcstol() and wcstoul(), based on strtol() and strtoul(). 2002-09-08 13:27:26 +00:00
tjr
cd5ca96599 Style: One space between "restrict" qualifier and "*". 2002-09-06 11:24:06 +00:00
tjr
573a3e8e5e Set errno to EILSEQ when invalid multibyte sequences are detected
(XSI extension to 1003.1-2001).
2002-09-03 01:09:47 +00:00
tjr
3c7d05d837 Typo: refer to MB_LEN_MAX instead of MB_CHAR_MAX (which does not exist). 2002-09-01 07:21:58 +00:00
tjr
2e5584e864 Add restrict qualifiers to the arguments of mbstowcs, mbtowc() and
wcstombs().
2002-09-01 07:08:22 +00:00
tjr
ca719015df Implement the XSI extension which allows the destination string to be
NULL, and returns the number of bytes that would be required to store
the result of the conversion without storing anything.

PR:		17694
2002-08-31 14:16:12 +00:00