Commit Graph

449 Commits

Author SHA1 Message Date
Andrey A. Chernov
45206d5c69 Fix wrong address when EucInfo > "variable" size 2002-08-07 20:20:56 +00:00
Andrey A. Chernov
6892b144e8 Style fixes in preparation for rewritting 2002-08-07 18:02:45 +00:00
Andrey A. Chernov
ecc4c62066 Style fixes in preparation of code rewritting 2002-08-07 16:45:23 +00:00
Tim J. Robbins
71a63bac1b Build iswctype.c and manual pages for the functions it defines. 2002-08-06 00:49:59 +00:00
Tim J. Robbins
677adc79c2 Add missing prototypes for extension functions to the SYNOPSIS. 2002-08-05 11:02:04 +00:00
Tim J. Robbins
21b7821a9e Use In macro instead of Fd. Add crossref to wctype(3). Refer to 1003.1-2001
in STANDARDS section. Document functions which are extensions to the standard.
2002-08-05 10:50:39 +00:00
Tim J. Robbins
15c57797bb Use the In macro instead of Fd. Add crossref to wctrans(3). Refer to
1003.1-2001 in STANDARDS section.
2002-08-05 10:48:05 +00:00
Tim J. Robbins
6b44a04d1c Implement the missing <wctype.h> functions: isw*() (iswalnum() etc.),
towlower() and towupper() required by ISO C90 Amd. 1.

iswascii(), iswhexnumber(), iswideogram(), iswnumber(), iswphonogram(),
iswrune() and iswspecial() have also been implemented for consistency
with the BSD extensions in <ctype.h>.
2002-08-05 10:45:23 +00:00
Andrey A. Chernov
3a317a1229 Reject encoding > ENCODING_LEN at early stage instead of truncating it.
Use ptr == NULL instead of !ptr in few places.
Move saverr declaration to global section.
2002-08-05 09:58:45 +00:00
Tim J. Robbins
008a2c53ce Manual pages for wide character classification (isw*) and case conversion
(tow*) functions from NetBSD, unmodified except for the addition of $FreeBSD$.

Obtained from:	NetBSD
2002-08-05 08:04:58 +00:00
Tim J. Robbins
4bd5585fbd Change wctype_t to an unsigned type to avoid warnings. 2002-08-04 12:43:53 +00:00
Tim J. Robbins
4645079944 Add the ISO C90 Amd. 1 wctrans(3) and towctrans(3) functions. 2002-08-04 12:09:08 +00:00
Tim J. Robbins
92ece88d16 Add btowc(3) to SEE ALSO section. 2002-08-04 11:02:21 +00:00
Andrey A. Chernov
f75bb0aa25 Use errno to indicate failure reason.
Remove incomplete checks for 'name' and 'PatchLocale', they must be
already checked at this point.
2002-08-04 09:37:28 +00:00
Bruce Evans
1a2140f531 Fixed some style bugs (unsorting of MLINKS, and more than 1 assignment to
MAN per section).
2002-08-04 07:54:41 +00:00
Andrey A. Chernov
10bc1114ce Rewrite loadlocale() to eliminate LOAD_CATEGORY macro to save space. 2002-08-04 04:29:54 +00:00
Andrey A. Chernov
9bb322433e Add ERRORS section according to POSIX (no errors) 2002-08-03 17:20:45 +00:00
Andrey A. Chernov
2f6754febb Catch empty encoding name too 2002-08-03 17:09:21 +00:00
Andrey A. Chernov
40b97dcb2a Fix return codes to match what setrunelocale() returns 2002-08-03 16:26:47 +00:00
Andrey A. Chernov
5740f28044 Preserve errno in fallback code 2002-08-03 15:56:25 +00:00
Tim J. Robbins
e9fb70115f Add ISO C90 Amd. 1 btowc(3) and wctob(3) functions. 2002-08-03 13:49:55 +00:00
Tim J. Robbins
196099d661 Correct use of Nm macro in NAME section and a broken cross reference. 2002-08-03 12:39:41 +00:00
Andrey A. Chernov
710d708144 Return errno provided by fopen, not always ENOENT.
Return EFTYPE instead of EINVAL for wrong locale file format.
Whitespaces.
2002-08-03 11:55:19 +00:00
Andrey A. Chernov
256ddd5999 Check encoding for ".", ".." and / inside 2002-08-03 10:23:06 +00:00
Andrey A. Chernov
5568219d15 Return EINVAL for NULL or too long encoding, not EFAULT 2002-08-03 09:10:31 +00:00
Andrey A. Chernov
83c9580dbb Return ENAMETOOLONG for long PATH_LOCALE, not EFAULT 2002-08-03 09:07:27 +00:00
Andrey A. Chernov
a17eafe2a8 1) Use errno to indicate faulure reason.
2) Move incomplete check for / in locale name from env section to
loadlocale(), add check for "." and ".." too.
It allows to check any argument, not env only.
3) Redesing LOAD_CATEGORY macro to eliminate code duplication.
4) Try harder in fallback code: if old locale can't be restored,
load "C" locale
5) White space formatting, long lines, etc.
2002-08-03 09:04:44 +00:00
Tim J. Robbins
5b32667c57 Add ISO C90 Amd. 1 wctype(3) and iswctype(3) functions. 2002-08-03 04:18:40 +00:00
Andrey A. Chernov
4e7b46d8e2 Sligtly modify previous out-of-bounds fix: just break instead of
return(NULL) for upward compatibility with more LC_* categories may be
implemented in future.
2002-08-02 13:36:54 +00:00
Andrey A. Chernov
ef1e7a2656 Prevent out of bounds writting for too many slashes case.
Replace strnpy + ='\0' with strlcpy

MFC after:	1 day
2002-08-02 01:04:49 +00:00
Jeroen Ruigrok van der Werven
eb12e52a25 Remove the hard-coded limit of 3 bytes for EUC encodings.
Satoshi NIIMI-san kindly explained that EUC does not limit the byte length to
any arbitrary number.

We now set the limit to the maximum octet length of the codeset and it is
locale-specific.

Submitted by:	Yong-Jhen Hong <winard@ms11.url.com.tw>
2002-04-14 10:55:42 +00:00
Dag-Erling Smørgrav
0b759b867a Install digittoint.3 (forgotten in rev 1.21)
PR:		docs/26451
Submitted by:	Adrian Filipi-Martin <adrian@ubergeeks.com>
2002-04-13 22:32:33 +00:00
Dima Dorfman
62538f5a03 This was recently MFC'd, so it will appear in 4.6.
PR:		37018
2002-04-13 04:25:56 +00:00
Jeroen Ruigrok van der Werven
a243e676fe Fix EUC encoding conversion for codeset 3 and 4 to comply to the specification.
PR:		28552
Submitted by:	NIIMI Satoshi <sa2c@and.or.jp>
2002-04-07 16:37:15 +00:00
Mark Murray
4cd0119367 Do not use __progname directly (except in [gs]etprogname(3)).
Also, make an internal _getprogname() that is used only inside
libc. For libc, getprogname(3) is a weak symbol in case a
function of the same name is defined in userland.
2002-03-29 22:43:43 +00:00
David E. O'Brien
333fc21e3c Fix the style of the SCM ID's.
I believe have made all of libc .c's as consistent as possible.
2002-03-22 21:53:29 +00:00
David E. O'Brien
c05ac53b8b Remove __P() usage. 2002-03-21 22:49:10 +00:00
Ruslan Ermilov
c8c5079d10 mdoc(7) police: tidy up. 2002-03-18 15:44:27 +00:00
Ruslan Ermilov
dab055db89 bde got caught by mdoc(7) police. :-) 2002-03-15 17:53:20 +00:00
Ruslan Ermilov
9a04350e3d mdoc(7) police: don't you notice the warnings? 2002-03-15 17:50:21 +00:00
Mike Barcroft
fd8e4ebc8c o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
  source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
  Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
  POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
  and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
  complexities associated with having MD (asm and inline) versions, and
  having to prevent exposure of these functions in other headers that
  happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
  third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on:	alpha, i386
Reviewed by:	bde, jake, tmm
2002-02-18 20:35:27 +00:00
Andrey A. Chernov
831e8f614c Do not try to convert to char already converted C monetary locale members.
Do this conversion on locale load stage instead.
2002-01-28 08:26:38 +00:00
Alexey Zelkin
a2fb0481d7 get __time_load_locale() prototype from include file, rather than declare
own
2002-01-24 15:38:59 +00:00
Andrey A. Chernov
ff7448f849 Restore C99 standard conformance information, isblank() _is_ in final
standard document

Pointed by: "Jacques A. Vidrine" <n@nectar.cc>
2002-01-22 20:14:35 +00:00
Bruce Evans
afac94af5c Replaced bogus cross references by the usual one for the ctype family
(ctype(3)).
2002-01-11 15:39:50 +00:00
Bruce Evans
87e0032026 Removed assertion that isblank() conforms to C90 too. This assertion
is correct but less than useful.  There is some uncertainty about whether
isblank() is in C99, but it is certainly not in C90.  It just conforms
to C89 because it is a conforming extension.
2002-01-11 15:21:03 +00:00
Bruce Evans
5fb3acfaaf Fixed unsorting of almost all lists in previous commit.
Removed assertion that isblank() is in C99 here too.
2002-01-11 15:15:17 +00:00
Bruce Evans
758671eb0d Fixed unsorting of MLINKS in previous commit.
Fixed unsorting of SRCS in rev.1.18.
2002-01-11 14:57:11 +00:00
Nik Clayton
6a3003ce51 Remove assertion that isblank() is in C99, pointed out by ache. 2002-01-10 12:22:00 +00:00
Nik Clayton
26dabb6003 From the PR:
1. ctype.h defines digittoint(), isnumber() and ishexnmber(), yet
        they are not documented in any of the manpages.

        2. The ctype manpage references a non-existent manpage for
        digittoint().

        3. The isascii() manpage claims it is standards compliant, when
        it isn't.

        4. isblank() claims it is _not_ standards compliant, when it
        is.

Fix by including the appropriate .Nm entries, and with a new digittoint.3
page.

PR:		docs/26451
Submitted by:	Adrian Filipi-Martin <adrian@ubergeeks.com>
2002-01-09 13:43:31 +00:00
Alexey Zelkin
0388ec7cac Back out recent replacement of LC_MESSAGES file with directory.
Requested by:   ache
2001-12-24 11:49:49 +00:00
Alexey Zelkin
709eed76bd Slightly re-work locale messages storage scheme. Before this commit
LC_MESSAGES related data was installed to <locale>/LC_MESSAGES file.
Now it go to <locale>/LC_MESSAGES/SYS_LC_MESSAGES file. LC_MESSAGES
directory is supposed to be storage of message catalogs of userland tools.
This should allow us to avoid many potential problems with future
libintl related functionality introduction.

Thanks for useful suggestions about correct way how to replace plain
files with directories at installworld stage to: Ruslan Ermilov <ru>
2001-12-21 13:14:02 +00:00
Alexey Zelkin
f43a321bf0 style(9)'ify 2001-12-20 18:28:52 +00:00
Alexey Zelkin
f2d0f4274b Add my e-mail to copyrights 2001-12-20 15:30:02 +00:00
Ruslan Ermilov
de400a7b97 mdoc(7) police: use no-break space. 2001-12-12 13:46:15 +00:00
Ruslan Ermilov
f079ab33c6 mdoc(7) police: use no-break space, fix markup. 2001-12-12 13:45:35 +00:00
Ruslan Ermilov
5411c22ae5 mdoc(7) police: use non-break space, remove whitespace at EOL, fix markup. 2001-12-12 13:42:25 +00:00
Alexey Zelkin
74f2b97544 * Add my e-mail to copyrights
* style(9)'ify
2001-12-11 15:55:42 +00:00
Alexey Zelkin
b21656a8f4 Fix grouping string handling 2001-12-11 15:26:36 +00:00
Andrey A. Chernov
8ede26d773 Clarify ' ' space issue 2001-12-05 16:33:11 +00:00
Andrey A. Chernov
e3a3c468a5 Remove specific reference to ASCII space (' '), it is true for localized
spaces too
2001-12-02 12:31:44 +00:00
Andrey A. Chernov
f2f94c9675 Clarify isblank range 2001-11-30 05:39:08 +00:00
Andrey A. Chernov
a72d401cce Clarify valid isspace() range 2001-11-30 02:01:32 +00:00
Andrey A. Chernov
307b922e38 Clarify that is[x]digit() class is the same in any locale 2001-11-29 15:23:46 +00:00
Ruslan Ermilov
32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Andrey A. Chernov
74b6098af4 First appeared in 5.0, not in 4.4 2001-09-17 08:18:45 +00:00
Ruslan Ermilov
c4d9468ea0 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
Dima Dorfman
7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Ruslan Ermilov
f80eb0cb14 mdoc(7) police: fixed bugs in rev. 1.19, split section headers names. 2001-07-04 10:53:15 +00:00
Andrey A. Chernov
d118fd8a39 Return "" if reallocf() fails 2001-06-25 20:56:59 +00:00
Andrey A. Chernov
ecffe71379 Describe success return value 2001-06-25 20:50:06 +00:00
Andrey A. Chernov
4e86aa7f9d Add transition period hack allowing old locale names return proper codeset too 2001-06-25 09:03:10 +00:00
Andrey A. Chernov
75d03a7f04 Handle "ASCII" and "US-ASCII" aliases 2001-06-10 23:22:31 +00:00
Alexey Zelkin
1d7f7b7a7a add nl_langinfo(3) 2001-05-03 15:12:52 +00:00
Alexey Zelkin
b3d588380e Eliminate BUGS section. No one of listed bugs is applicable to FreeBSD-current
anymore.
2001-05-03 15:05:16 +00:00
Alexey Zelkin
1496a706b9 add manpage for nl_langinfo(3)
Reviewed by:	ru
2001-05-03 15:02:50 +00:00
Daniel Eischen
278d1a20e8 Include <unistd.h> so that read(2) and write(2) don't cause warnings. 2001-04-10 03:55:19 +00:00
Ruslan Ermilov
50c9722d3b mdoc(7) police: LIBRARY should be before SYNOPSIS. 2001-03-29 13:03:23 +00:00
Ruslan Ermilov
4a558355e5 MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
Andrey A. Chernov
71a71d575f Implement D_MD_ORDER (local extension) to get month/day order from locale 2001-03-19 11:55:12 +00:00
David E. O'Brien
1e58303f9f Use our standard .c rcsid format. 2001-03-05 10:21:05 +00:00
David E. O'Brien
e4efb830ff Fix copyright breakage in rev 1.2.
We *cannot* remove clause #4 from the Univ of California's license.
2001-03-05 10:18:15 +00:00
Andrey A. Chernov
54e3bc256e Change mon_decimal_point from "." to "" (N/A>) as it is specified by POSIX for
POSIX locale.
2001-03-03 21:03:15 +00:00
Andrey A. Chernov
c0bbece16d Actually implement T_FMT_AMPM 2001-03-02 22:12:19 +00:00
Ruslan Ermilov
efbe286b68 Removed duplicate $FreeBSD$. 2001-03-02 13:00:26 +00:00
Ruslan Ermilov
825d095dd3 Fix setlocale() to conform to the ISO C and POSIX standards.
The below text is quoted from the latest POSIX draft:

: The values of locale categories shall be determined by a precedence
: order; the first condition met below determines the value:
:
: 1. If the LC_ALL environment variable is defined and is not null,
:    the value of LC_ALL shall be used.
: 2. If the LC_* environment variable (LC_COLLATE, LC_CTYPE, LC_MESSAGES,
:    LC_MONETARY, LC_NUMERIC, LC_TIME) is defined and is not null, the
:    value of the environment variable shall be used to initialize the
:    category that corresponds to the environment variable.
: 3. If the LANG environment variable is defined and is not null, the
:    value of the LANG environment variable shall be used.
: 4. If the LANG environment variable is not set or is set to the empty
:    string, the implementation-defined default locale shall be used.

The conditions 1 and 2 were interchanged, i.e., LC_* were looked first,
then LC_ALL, then LANG (note that LC_ALL and LANG were essentially the
same, providing the default, with LC_ALL taking precedence over LANG).
Now, LC_ALL and LANG serve the different purposes.  LC_ALL overrides
any LC_*, and LANG provides the default fallback.

Testcase:

/usr/bin/env LC_ALL=C LC_TIME=de_DE.ISO_8859-1 /bin/date

Should return date in the "C" locale format.

Inspired by:	date(1) reference page in the Draft
2001-03-02 12:45:52 +00:00
Daniel Eischen
3b5b529f2e s/fstat/_fstat/
Approved by:	phantom
2001-03-01 04:59:01 +00:00
Ruslan Ermilov
588a200ce1 .St -ansiC -> .St -isoC 2001-02-26 13:23:47 +00:00
Alexey Zelkin
41b55591ce Fix visibility of empty variable -- it should be static.
Submitted by:	bde and Hartmut Brandt <brandt@fokus.gmd.de> (via PR)
PR:		bin/25308
2001-02-24 13:13:48 +00:00
Alexey Zelkin
e1467aa917 cleanup commentaries 2001-02-19 19:09:00 +00:00
Andrey A. Chernov
c80a91609d Deal properly with "0" 2001-02-19 06:19:51 +00:00
Andrey A. Chernov
8a8e51d8e8 CRNCYSTR: determine '.' too 2001-02-17 11:15:30 +00:00
Andrey A. Chernov
59dde0d08d Implement CRNCYSTR 2001-02-17 07:35:01 +00:00
Andrey A. Chernov
d6a3432e11 Return {YES,NO}STR from locale
Approved by:	phantom
2001-02-13 23:32:48 +00:00
Alexey Zelkin
39d2c772eb catch up to __part_load_locale() interface change 2001-02-13 15:32:21 +00:00
Alexey Zelkin
fc38c1e548 add additional function parameter: bufsize_min. it's possible
to check two sizes per one function invocation now.

Suggested by: ache
2001-02-13 15:29:39 +00:00
Alexey Zelkin
b161fb0061 Make comparsions more clear (per style(9)) 2001-02-12 08:56:39 +00:00
Alexey Zelkin
ba4a5c925a Assume that "" passed as parameter also means "no grouping"
Make comparsions more clear (per style(9))
2001-02-12 08:55:12 +00:00
Robert Watson
4be19dddae o Fix build of libc broken in revision 1.2. offsetof() requires the
inclusion of stddef.h.

Reviewed by:	peter
2001-02-12 02:44:33 +00:00
Alexey Zelkin
fc19bba6aa Don't use hardcoded struct size, use offsetof() instead (make size calculations
dynamic)
2001-02-11 15:09:31 +00:00
Alexey Zelkin
9040b756dd Don't try to convert grouping strings in case if C or POSIX locale
was explicitly specified.

Submitted by:	ache
2001-02-11 15:07:26 +00:00
Alexey Zelkin
cb03ae3061 make it possible to specify grouping number from range 0..CHAR_MAX,
not only one-digit number
2001-02-10 20:22:45 +00:00
Alexey Zelkin
7d2cc62ba3 Use "namespace.h" and "un-namespace.h"
Requested by:	deischen
2001-02-10 19:57:26 +00:00
Alexey Zelkin
1bd7723d09 . Fix semantics of grouping (LC_MONETARY::mon_grouping,
LC_NUMERIC::grouping) values.
. Always set __XXX_changed flags then loading numeric & monetary locale
  categories to allow localeconv() to use C locale also.
2001-02-10 15:36:46 +00:00
Andrey A. Chernov
ab9577f234 As temporary workaround for missing *grouping fields parser always return "no
grouping" (CHAR_MAX, '\0').
Fixme: grouping parser needs to be implemented.
2001-02-10 04:32:55 +00:00
Andrey A. Chernov
96be743f80 According to Garrett, POSIX widely use -1 to indicate CHAR_MAX, so back out
all my "-1" -> "something" fixes and replace -1 with CHAR_MAX directly in
strtol() in cnv()
2001-02-10 03:31:23 +00:00
Andrey A. Chernov
d2712eafa7 Use __XSTRING(CHAR_MAX) instead of "127" and strtol() base 0 to parse it (0x7f) 2001-02-10 02:00:56 +00:00
Andrey A. Chernov
1506a668dc Correct myself a bit: situation is broken not for _all_ numeric LC_MONETARY,
LC_NUMERIC fields, but only for *grouping fields - other fields are converted
to a chars in localeconv(), so final change is:

"-1" -> "127"

127 here is because CHAR_MAX supposed, which is _positive_ (SUSv2 requirement),
not negative as 255. It is still a bit of hack. To find real CHAR_MAX will be
better to sprintf() it once somewhere in static buffer. *grouping parsing
still broken and missing and needs to be implemented.
2001-02-10 01:38:18 +00:00
Andrey A. Chernov
051f867fe1 NOTE: according to SUSV2 and other implementations, numeric elements in
LC_MONETARY, LC_NUMERIC are byte-arrays, not ASCII strings!

Fix "C" locale, change "-1" to {CHAR_MAX, '\0'} according to standards.

This is only partial fix - locale loading procedure remains broken as before
and load too big values for all locales.  All numeric strings there should be
converted with something like atoi() and placed into bytes.  Maybe I do it
later, if someone will not fix it faster.
2001-02-10 00:43:32 +00:00
Andrey A. Chernov
d0e2083fdd Implement CODESET 2001-02-09 22:43:39 +00:00
Andrey A. Chernov
634c946524 Back out attempt to implement CRNCYSTR - require additional prefixes according
to SUSV2. Add comment explaining it instead.
2001-02-09 18:39:17 +00:00
Andrey A. Chernov
218bcbcb4d Explicitly mark deprecated entries.
Return currency_symbol for CRNCYSTR
Return "%r" for T_FMT_AMPM
Remove obsoleted comment about c_fmt
Return "" for {YES,NO}STR
2001-02-09 18:16:12 +00:00
Alexey Zelkin
747a8b55e8 add lmonetary.?, lnumeric.?, ldpart.?, lmessages.?, nl_langinfo.c
remove lconv.c
2001-02-08 17:13:24 +00:00
Alexey Zelkin
60e1d74ff8 Add SUSv2 compatible nl_langinfo() function. It still need some work, but
this is already usable one.
2001-02-08 17:12:03 +00:00
Alexey Zelkin
e690a5563f Make localeconv() actual function. Now it will use LC_MONETARY/LC_NUMERIC
information to fill return structure. Remove unused anymore stub.
2001-02-08 17:03:01 +00:00
Alexey Zelkin
90423ececf Make FreeBSD locale support complete: add support for rest locale categories
LC_MONETARY, LC_NUMERIC and LC_MESSAGES. Remove stub functions since they
don't need anymore.

Reviewed by:	silence on -i18n
2001-02-08 16:58:53 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Daniel Eischen
d201fe46e3 Remove _THREAD_SAFE and make libc thread-safe by default by
adding (weak definitions to) stubs for some of the pthread
functions.  If the threads library is linked in, the real
pthread functions will pulled in.

Use the following convention for system calls wrapped by the
threads library:
	__sys_foo - actual system call
	_foo - weak definition to __sys_foo
	foo - weak definition to __sys_foo

Change all libc uses of system calls wrapped by the threads
library from foo to _foo.  In order to define the prototypes
for _foo(), we introduce namespace.h and un-namespace.h
(suggested by bde).  All files that need to reference these
system calls, should include namespace.h before any standard
includes, then include un-namespace.h after the standard
includes and before any local includes.  <db.h> is an exception
and shouldn't be included in between namespace.h and
un-namespace.h  namespace.h will define foo to _foo, and
un-namespace.h will undefine foo.

Try to eliminate some of the recursive calls to MT-safe
functions in libc/stdio in preparation for adding a mutex
to FILE.  We have recursive mutexes, but would like to avoid
using them if possible.

Remove uneeded includes of <errno.h> from a few files.

Add $FreeBSD$ to a few files in order to pass commitprep.

Approved by:	-arch
2001-01-24 13:01:12 +00:00
Ruslan Ermilov
4263595653 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
Ruslan Ermilov
c23155a43a mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
Kris Kennaway
b777873ec1 Disallow '/' characters in LC_* environment variables which might
be used to point to a bad locale file. This is only believed to be a
minor security risk - the only risk is if some program uses the result
of a localized string as a format specifier in a vulnerable function
like sprintf(). No such code is believed to exist in the FreeBSD base
system, although it is possible that badly written third party code
would do that.

Submitted by:	imp
Approved by:	ache
2000-09-08 07:29:48 +00:00
Warner Losh
12b92015dd The comparison against 0 should be against LC_ALL. category isn't a
boolean and it is LC_ALL that's special.

Someone submitted this to me a long time ago, but I can't find the
mail now.
2000-09-04 03:43:24 +00:00
Andrey A. Chernov
6ea9889255 fix comment 2000-07-07 08:24:50 +00:00
Andrey A. Chernov
3bc7ba9057 Describe agrument range correctly, according to multibyte(3)
Remove unneded comment
2000-07-03 13:03:15 +00:00
Andrey A. Chernov
8b96e6c916 Megre XPG4 code into libc 2000-06-03 12:24:08 +00:00
Alexey Zelkin
314c685440 mdoc related fixes:
. synchronize NAME and SYNOPSIS sections
. replace .Ev macros with .Dv / .Er / .Em macros  as mdoc(7)
  specification declare
2000-05-12 10:22:50 +00:00
Alexey Zelkin
25bb73e063 Introduce ".Lb" macro to libc manpages.
More libraries manpages updates following.
2000-04-21 09:42:15 +00:00
Andrey A. Chernov
70c1e1b6d9 Add comment after locales
Use .Li for type

Suggested-by: sheldonh
2000-04-12 18:38:30 +00:00
Andrey A. Chernov
199b1670eb Better wording according to multibyte(3)
Better man formatting
Add reference to multibyte(3)
2000-04-11 14:41:37 +00:00
Andrey A. Chernov
1c0a1964ab Back out valid argument domain change - sneak to this function by error.
Reword test condition better. Previous variant was true for negative
characters too.
2000-03-28 11:46:40 +00:00
Andrey A. Chernov
4c48fdaf53 Describe valid argument domain for 8-bit wide locales to prevent common error
calling ctype functions with signed char as an argument.
2000-03-28 11:36:31 +00:00
David E. O'Brien
f506ed7467 There is a problem in that one cannot use ctype.h at the same time as parts
of the C++ stdlib.  Our ctype.h uses symbols of the form _<X> to denote the
various character classes.  Our ctype.h also extends the usual ctype.h
offering by adding the "_T" (special) class.  Problem is parts of the STL
also use the symbol "_T" as its parameterized type.  These two uses are
incompatible.

Thus change the form of the symbols used in ctype to something that fixes
the current problem and is less likely to cause conflicts in the future.

Requested by:	Tomoaki NISHIYAMA <tomoaki@biol.s.u-tokyo.ac.jp>
Ok'ed by:	JKH
2000-02-08 07:43:26 +00:00
Jason Evans
9233c4d942 Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),
just use _foo() <-- foo().  In the case of a libpthread that doesn't do
call conversion (such as linuxthreads and our upcoming libpthread), this
is adequate.  In the case of libc_r, we still need three names, which are
now _thread_sys_foo() <-- _foo() <-- foo().

Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(),
nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo().

Remove all internal libc usage of: creat(), pause(), sleep(), system(),
tcdrain(), wait(), and waitpid().

Make thread cancellation fully POSIX-compliant.

Suggested by:	deischen
2000-01-27 23:07:25 +00:00
Sheldon Hearn
99d751fbe3 Although it should be obvious that the 3-digit numeric values of the
characters shown are octal, state this explicitly for the easily
misled.
2000-01-19 16:21:05 +00:00
Jason Evans
929273386f Add three-tier symbol naming in support of POSIX thread cancellation
points.  For library functions, the pattern is __sleep() <--
_libc_sleep() <-- sleep().  The arrows represent weak aliases.  For
system calls, the pattern is _read() <-- _libc_read() <-- read().
2000-01-12 09:23:48 +00:00
Tim Vanderhoek
b91cc296c8 Add .Xrefs to tolower.3 and toupper.3, respectively. 1999-12-28 14:10:21 +00:00
Alexey Zelkin
94da96bf18 Back up following macros by functions: ishexnumber, isideogram, isnumber,
isphonogram, isrune, isspecial. Fix ordering.

Reviewed by: bde
1999-12-17 15:12:21 +00:00
Alexey Zelkin
2835cc3b12 Correct "standard compilance" notes
Reminded by: bde
1999-12-14 10:35:09 +00:00
Andrey A. Chernov
5d1706df0d Fix dead loop if locale contains / and not all categories specified
PR:		14742
Submitted by:	peter@wahoo.com.tw
1999-11-09 11:09:16 +00:00
Alexey Zelkin
96648c2dc8 mdoc(7)'fy 1999-09-23 13:45:43 +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
Dmitrij Tejblum
03a7efc234 Reduce time of __collate_substitute() from O(strlen(s)^2) to O(strlen(s)).
Other minor optimizations. I got ~30% speedup in strcoll() for 50 char strings,
~40% speedup for 100 char strings, and unmeasurable speedup for 1M strings.

Collates are still terribly slow. To make them reasonable fast,
__collate_substitute() should be killed.
1999-09-12 19:42:38 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Nik Clayton
fbc400a67a Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

     .\"    $Id$
     .\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by:            bde
1999-07-12 20:50:10 +00:00
Joseph Koshy
c6b8c5fe4b Correct troff sequence for backslashes in manual page.
PR:		docs/12322
Submitted by:   Marc Ramirez <mrami@gbtb.com>
1999-06-21 09:37:38 +00:00
Foxfair Hu
85484fbd41 PR: 10918
Submitted by:	Yung-Jen Hung <winard@u3717a.dorm.ccu.edu.tw>
Reviewed by:	bearscorp.bbs@bbs.life.nthu.edu.tw
_BIG5_sgetrune() in libc doesn't work well, this commit will fix it.
1999-05-07 13:24:58 +00:00
Guy Helmer
1e1d43cd38 Document ishexnumber, isideogram, isnumber, isphonogram, isrune,
and isspecial.

PR:		docs/9854
1999-04-29 21:54:20 +00:00
Warner Losh
dcb0ae4ed8 More egcs warning fixes:
o use braces to avoid potentially ambiguous else
	o don't default to type int (and also remove a useless register
	  modifier).
	o Use parens around assignment values used as truth values.
	o Remove unused function.

Reviewed by: obrien and chuckr
1999-04-25 22:29:30 +00:00
John Polstra
07963c8cbf Fix a macro name typo that made a word disappear. 1999-04-03 22:47:25 +00:00
Bruce Evans
ea28904cd5 Fixed tab lossage in previous commit. 1999-02-25 11:27:52 +00:00
Andrey A. Chernov
7a129df7d0 remove ctype.c - unused and confusing 1999-02-23 15:13:51 +00:00
Andrey A. Chernov
a4beee718b fix unsigned overflow
PR: 8437
1998-10-25 05:06:42 +00:00
Warner Losh
e8420087b0 Replace memory leaking instances of realloc with non-leaking reallocf.
In some cases replace if (a == null) a = malloc(x); else a =
realloc(a, x); with simple reallocf(a, x).  Per ANSI-C, this is
guaranteed to be the same thing.

I've been running these on my system here w/o ill effects for some
time.  However, the CTM-express is at part 6 of 34 for the CAM
changes, so I've not been able to do a build world with the CAM in the
tree with these changes.  Shouldn't impact anything, but...
1998-09-16 04:17:47 +00:00
Wolfram Schneider
acd8019083 Sort cross references. 1998-08-31 16:41:09 +00:00
Poul-Henning Kamp
38a0ff129f Add missing #include of <sys.types.h> 1998-08-15 20:53:34 +00:00
Poul-Henning Kamp
7a55a3c230 I have added the support for BIG5 encoding into libc/libxpg4/mklocale.
the diff is attached below. This is done on the 3.0 source-tree.
I have test this on 2.2-stable before, but I don't have a 3.0 machine
right now.

This patch is mainly to make libc support BIG5 encoding, thus add
zh_TW.BIG5 locale to 3.0.

Submitted by:	Chen Hsiung Chan <frankch@waru.life.nthu.edu.tw>
1998-08-15 12:51:49 +00:00
Andrey A. Chernov
271632b02b Add reference to catopen(3) 1998-04-30 16:07:54 +00:00
Andrey A. Chernov
0b5e953b91 Basic support for LC_MESSAGES 1998-04-29 22:39:56 +00:00
John Birrell
0107877e04 Change MACHINE references to MACHINE_ARCH. 1998-02-20 08:23:55 +00:00
John Birrell
c61e516832 Add #ifndef __NETBSD_SYSCALLS around calls to issetugid() which
do not exist in NetBSD 1.3.
1998-01-15 09:58:08 +00:00
John Birrell
da8a9b61c7 Include string.h for memcpy function prototype. 1998-01-14 08:14:56 +00:00
Alexander Langer
e69bcfc3bc Expanded cross references. 1998-01-02 19:22:52 +00:00
Wolfram Schneider
de635b0683 The terminating character in strings is NUL', not NULL'. 1997-12-28 12:06:29 +00:00
Steve Price
0ce1971c2a Correct description of which runes are encoded as two bytes.
PR:		4555
Submitted by:	Dmitrij Tejblum <tejblum@arc.hq.cti.ru>

[0x0400 - 0xffff] [bbbbbbbb.bbbbbbbb] -> 1110bbbb, 10bbbbbb, 10bbbbbb
.Ed
.Pp
If more than a single representation of a value exists (for example,
0x00; 0xC0 0x80; 0xE0 0x80 0x80) the shortest representation is always
used (but the longer ones will be correctly decoded).
.Pp
The final three encodings provided by X-Open:
.Bd -literal
[00000000.000bbbbb.bbbbbbbb.bbbbbbbb] ->
	11110bbb, 10bbbbbb, 10bbbbbb, 10bbbbbb

[000000bb.bbbbbbbb.bbbbbbbb.bbbbbbbb] ->
	111110bb, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb

[0bbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb] ->
	1111110b, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb
.Ed
.Pp
which provides for the entire proposed ISO-10646 31 bit standard are currently
not implemented.
.Sh "SEE ALSO"
.Xr mklocale 1 ,
.Xr setlocale 3
@


1.4
log
@Don't use hardcoded *roff font change requests.  Do it
via mdoc macros instead.
@
text
@d37 1
a37 1
.Dd "June 4, 1993"
@


1.3
log
@Very minor mdoc cleanup.
@
text
@d44 2
a45 1
\fBENCODING "UTF2"\fP
@


1.2
log
@Another round of various man page cleanups.
@
text
@d65 1
a65 1
.sp
d81 1
a81 1
.sp
@


1.2.2.1
log
@YAMFC:

Commit all of the -current changes that apply to 2.2.  These fall into
several categories:

- Cosmetic/mdoc changes.  They don't really afect the output
  at all, but having them in 2.2 will make it easier to diff the man
  pages later when looking for real changes.
- Update some man pages to reflect the current 2.2 header files.
- Sort xrefs.
- A few typo fixes.
- And a few changes that actualy added text to the man page that should
  be reflected in 2.2.
- Add some missing MLINKS.

Requested by: bde
@
text
@d44 1
a44 2
.Nm ENCODING
.Qq UTF2
d65 1
a65 1
.Pp
d81 1
a81 1
.Pp
@


1.2.2.2
log
@MFC:  Just the locale fixes (small doc tweaks for the most part)
and the new strptime(3) call.  Having added something, does this
require a version bump?  Haven't we bumped once already?

There are a *LOT* of additional 3.0 changes to be merged but I'm not
entirely comfortable with some of them so I'll take the conservative
(read: cowardly :) way out and just merge this much.
@
text
@d37 1
a37 1
.Dd June 4, 1993
@


1.1
log
@Initial revision
@
text
@d41 1
a41 1
.Nm UTF2
@


1.1.1.1
log
@BSD 4.4 Lite Lib Sources
@
text
@@


1.1.1.1.6.1
log
@Phase 2 of merge - also fix things broken in phase 1.
Watch out for falling rock until phase 3 is over!

libc completely merged except for phkmalloc & rfork (don't know if David
wants that).

Some include files in sys/ had to be updated in order to bring in libc.
@
text
@d41 1
a41 1
.Nm utf2
@


1.1.1.1.6.2
log
@This 3rd mega-commit should hopefully bring us back to where we were.
I can get it to `make world' succesfully, anyway!
@
text
@d41 1
a41 1
.Nm UTF2
@
1997-11-05 04:18:42 +00:00
Bruce Evans
b966cc2394 Sorted lists. 1997-10-21 08:41:15 +00:00
Bruce Evans
2bc3b4d735 Removed the subdirectory paths from the definitions of MAN[1-9]. They
were a workaround for limitations in bsd.man.mk that were fixed about
2 years ago.
1997-10-15 16:16:41 +00:00
Andrey A. Chernov
46dba712f1 Use revived __maskrune for digittoint
Minor formatting
1997-09-27 04:34:35 +00:00
Andrey A. Chernov
3f2fd98c12 Move it under XPG4 define 1997-09-25 23:20:26 +00:00
Andrey A. Chernov
bed2de7d4c Move MSKanji under XPG4 define 1997-09-25 23:18:10 +00:00
Andrey A. Chernov
1284c1ad08 __maskrune --> __istype 1997-09-25 23:10:38 +00:00
Julian Elischer
16f76e6f06 Submitted by: Sin'ichiro MIYATANI / Phase One, Inc <siu@phaseone.co.jp>
Basic support for the Shift JIS encoding of japanese.
(and one tiny typo fixed in a comment)
1997-09-24 20:38:12 +00:00
Andrey A. Chernov
9fb4ef6227 Remove collate_range_cmp, was left for temp. backward compatibility 1997-08-03 18:04:39 +00:00
Bruce Evans
f3acd8dc3c Fixed quoting of backslash. 1997-07-13 07:28:06 +00:00
Steve Price
681e5e7a09 Show the real revision date and not the date that this
manpage is being viewed.
1997-06-23 04:03:49 +00:00
Andrey A. Chernov
cbc9cbfb58 Completely remove #ifdefed out 8859-1 extension, I found it break
POSIX, C locale definition, see LC_CTYPE pre-defined table there
1997-05-14 00:11:02 +00:00
Andrey A. Chernov
cd641c8853 #ifdef out C locale extension to 8859-1 encoding, it now stays to ASCII
back as designed in *BSD

Also it not violates current standards but

1) No other Unixes have this feature

2) It broke Kerberos5 (isprint) and God knows what else
(not all vendors will agree to treat FreeBSD as special case for support
since (1))

2) Give false localization sense (programs mimic to be 8859-1
localized) which prevents true localization.
1997-05-13 11:19:26 +00:00
John Birrell
870039320f Changed all paths to be relative to src/lib instead of src/lib/libc
so that all these makefiles can be used to build libc_r too.

Added .if ${LIB} == "c" tests to restrict man page builds to libc
to avoid needlessly building them with libc_r too.

Split libc Makefile into Makefile and Makefile.inc to allow the
libc_r Makefile to include Makefile.inc too.
1997-05-03 03:50:06 +00:00
Bruce Evans
330f606e46 Don't use literal semicolons in .Fn macro invocations. 1997-04-13 12:55:36 +00:00
Andrey A. Chernov
21b4da0751 Restore PATH_LOCALE functionality using issetugid() call now 1997-04-07 08:54:38 +00:00
Bruce Evans
09589ca82e FIxed arg types (mostly missing consts) in synopsis. 1997-03-19 00:52:58 +00:00
Peter Wemm
7e546392b5 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
Andrey A. Chernov
e799281533 Move _PathLocale to data-only file, so setrunelocale() not pick up
whole setlocale.c module now.

Should go into 2.2
1997-02-09 09:29:27 +00:00
Joerg Wunsch
cc551f25f4 Do Andrey's homework :) before merging this into 2.2:
. add idempotency #ifdef
. avoid sloppy common-style external declaration.
1997-02-08 14:04:30 +00:00
Andrey A. Chernov
939aed4fb5 Comment out PATH_LOCALE reference
Should go into 2.2
1997-02-06 09:29:02 +00:00
Andrey A. Chernov
63407d3487 Use symbolic constants instead of hardcoded digits
Add range check for setrunelocale since it can be called
directly.
Remove _startup_setlocale compatibility function

Should go into 2.2
1997-02-06 09:11:06 +00:00
Paul Traina
b6b0d266cd Fix yet another setlocale() bug.
Submitted by:	Wojtek Pilorz <wpilorz@celebris.bdk.lublin.pl>
1997-02-06 08:31:42 +00:00
Andrey A. Chernov
d81a091605 Update the comment why range checking not needed
Fix setrunelocale fail if called directly without prior setlocale
call

Should go in 2.2
1997-02-05 19:17:10 +00:00
David Greenman
5979500afc Killed getenv of PATH_LOCALE per Andrey's suggestion. It was intended
for debugging locale stuff, but was rarely if ever used...and of course
just bit a big chunk out of our collective hind-ends.
1997-02-05 09:53:25 +00:00
Andrey A. Chernov
2b3e51b901 Add yet one comment saying that range checking already done
to stop people "fixing" it by snprintf
1997-02-03 08:29:32 +00:00
Mike Pritchard
6a145130de Don't use hardcoded *roff font change requests. Do it
via mdoc macros instead.
1997-01-31 01:00:12 +00:00
Mike Pritchard
c492ccdb9a Very minor mdoc cleanup. 1997-01-31 00:25:12 +00:00
Wolfram Schneider
75141cc987 Sort cross references. 1997-01-20 23:23:22 +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
Mike Pritchard
8c9c6676cf Add a couple of additional xrefs. 1997-01-11 19:57:27 +00:00
Andrey A. Chernov
af155bdff3 Add comment that range checking is already done at upper level
Kill snprintf left in collate.c from previous backout

Should go in 2.2
1996-12-28 05:04:24 +00:00
Joerg Wunsch
42ceaa809f Back out rev 1.5: the overflow condition is already handled elsewhere. 1996-12-22 15:48:06 +00:00
Joerg Wunsch
120e62ec50 Fix yet another buffer overflow. :-(
Vulnerable: all programs that use setlocale(LC_COLLATE),
setlocale(LC_CTYPE), or setlocale(LC_ALL).  The only setuid/setgid
binary i've found for this is w(1).

Should go into 2.2.
1996-12-16 17:32:58 +00:00
Andrey A. Chernov
e2900279d2 Add rcsid[]
Since locale reading code not resistent against stack overflowing or
similar intruder attacks, don't allow PATH_LOCALE env variable action
for s-bit programs (non-standard locale path setting)
1996-11-27 22:30:44 +00:00
Andrey A. Chernov
40c0625e97 Add Id
Optimize/improve recently added locale restoration on failure
1996-11-26 08:00:17 +00:00
Andrey A. Chernov
c8f931a80e PATH_LOCALE: use this non-standard env variable first time only, i.e.
strdup() it to prevent unsetenv() or setenv() effects. Check its length to
not allow user to overflow internal locale buffer. Move PATH_LOCALE
handling code into one place.

POSIX: make better stub for LC_MONETARY & LC_NUMERIC, now it check
locale directory existance instead of refusing all non-C non-POSIX
locales. POSIX treats empty locale env variable as unset variable
while our old code treats it as "C" locale, fix it. Implement previous locale
restoring, if locale setting fails. Old code assumes success if some
of LC_ALL subset is successed even other fails, POSIX treats it as
failure with previous locale restoring, fix it.

Remove unneccessary length checking in currentlocale()
1996-11-26 02:49:53 +00:00
Andrey A. Chernov
38aa46cdf0 Rename collate_range_cmp to __collate_range_cmp for internal usage
inside libc. Add collate_range_cmp as alias to __collate_range_cmp
for temp. backward compatibility.
collate_range_cmp will be replaced with direct code for each
external program for compatibility with the rest of world
1996-10-31 04:25:14 +00:00
Andrey A. Chernov
967a5cb181 Simplify debug output
Simplify collate_range_cmp for ASCII-compatible collate we have now
1996-10-23 15:35:46 +00:00
Andrey A. Chernov
1642f84deb Save half of space in LC_COLLATE and remove unneded code.
This change is not compatible with previous variant, however proper
error code returned in both cases.
Colldef changes will follows.
1996-10-15 21:53:23 +00:00
Andrey A. Chernov
cb07d7668c Add comment explaining what function does
Cover strcoll return 0 case too
1996-09-17 19:27:06 +00:00
Bruce Evans
eaa86f9d7f Don't use __dead or __pure in user code. They were obfuscations
for gcc >= 2.5 and no-ops for gcc >= 2.6.  Converted to use __dead2
or __pure2 where it wasn't already done, except in math.h where use
of __pure was mostly wrong.
1996-09-14 03:00:32 +00:00
Mike Pritchard
7bdf80e571 Correctly use .Fn instead of .Nm to reference function names
in a bunch of man pages.

Use the correct .Bx  (BSD UNIX) or .At (AT&T UNIX) macros
instead of explicitly specifying the version in the text
in a bunch of man pages.
1996-08-22 23:31:07 +00:00
Andrey A. Chernov
9d6a993656 Add Id
Move comment up to place
1996-08-20 21:16:53 +00:00
Andrey A. Chernov
a540d32bde Add isblank attr to non-break space
Add comment describing how upper half of table made
1996-08-20 14:43:58 +00:00
Andrey A. Chernov
59460dc4ff Remove isgraph attr from non-break space 1996-08-20 14:27:26 +00:00
Andrey A. Chernov
5feb86a405 Add Id 1996-08-14 19:47:02 +00:00
Andrey A. Chernov
83d8106e1a simplify/speedup/extend 1996-08-13 13:38:35 +00:00
Andrey A. Chernov
b339a4060f Remove old version hooks 1996-08-12 19:18:47 +00:00
Andrey A. Chernov
883a3266d1 There is so many places where range comparation (using collate)
needed (much more than I think initially), so I forced to add
new user-visible non-standard function to libc.
1996-08-12 18:38:49 +00:00
Andrey A. Chernov
2eecfbac3a Add internal function __collcmp once instead of adding it statically
to many places in the libc
1996-08-12 03:40:37 +00:00
Mike Pritchard
2ce08cb20b Remove some hardcode *roff font change escape codes from
this man page to prevent half of it from coming out with underlines.

This man page needs to be gone over to fully convert it to mdoc format.

This closes PR#1440.

Submitted by:	Jens Schweikhardt <schweikhardt@rus.uni-stuttgart.de>
1996-08-06 22:42:23 +00:00
Bruce Evans
cdd84b0211 Fixed longstanding namespace convolution involving rune_t vs wchar_t.
If _ANSI_SOURCE or _POSIX_SOURCE is defined, then <ctype.h> had to
be included before <stddef.h> or <stdlib.h> to get rune_t declared.
Now rune_t is declared perfectly bogusly in all cases when <ctype.h>
is included.

This change breaks similar (but more convoluted) convolutions in the
stddef.h in gcc distributions.  Ports of gcc should avoid using the
gcc headers.
1996-05-01 00:40:10 +00:00
Bruce Evans
8a4599117b Don't include <sys/types.h> when it isn't used.
This commit covers most of the ANSI library functions. Many others only
need <sys/types.h> because they use u_xxx.
1996-04-19 18:40:25 +00:00
Andrey A. Chernov
c0ea8ed12f Fix error in wcstombs: byte count not counted
Remove unneded casts in sgetrune/sputrune
Submitted by: wcstombs fix by Mihoko Tanaka <m_tonaka@pa.yokogawa.co.jp>
1996-04-18 07:01:46 +00:00
Mike Pritchard
064f007493 Added missing section numbers to a bunch of .Xr macros, or
converted them into .Fn macros where appropriate.  Also fixed
up some minor formatting problems.
1996-03-27 20:49:07 +00:00
Andrey A. Chernov
7871e36865 Remove half-dancing solution for signed chars to help finding
POSIXly-incorrect programs.
1996-03-25 13:43:24 +00:00
Andrey A. Chernov
bf93970596 Remove half-dancing solution for signed chars to help finding
POSIXly-incorrect programs.
1996-03-25 13:35:36 +00:00
Mike Pritchard
78b0b234eb Correct a bunch of man page cross references and generally
try and silence "manck".

ncurses, rpc, and some of the gnu stuff are still a big mess, however.
1996-02-11 22:38:05 +00:00
Mike Pritchard
c4c23c4df8 Another round of various man page cleanups. 1996-02-09 17:25:57 +00:00
Peter Wemm
a5b996a7ec recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
Gary Palmer
b3d64ab72f Oops. I seem to have over-corrected with my last commit. It should be
right this time
1995-12-29 08:23:59 +00:00
Gary Palmer
d28b4295fd Correct what seem to me to be some mistakes in the references and
standards sections. Also add a missing `,' to each file.
1995-12-28 21:06:07 +00:00
Andrey A. Chernov
f9cbdf410e Move more stuff out to XPG4
Handle negative chars inside runetype/tolower/toupper
1995-11-03 08:59:02 +00:00
Andrey A. Chernov
34d08e870e Treat empty encoding as "C" encoding 1995-10-23 20:20:11 +00:00
Andrey A. Chernov
377da8e867 Optimize PathLocale handling.
Handle C/POSIX/"" properly.
Don't reset collate to C when it is unnecessary
1995-10-23 20:08:24 +00:00
Andrey A. Chernov
24c9187962 Use fake (empty) startup_setlocale for XPG4 1995-10-23 02:25:53 +00:00
Andrey A. Chernov
9d45c3af90 Reduce static binaries bloat by splitting out normally unused
setinvalidrune()
1995-10-23 02:13:05 +00:00
Andrey A. Chernov
350a3d3e48 Migrate from XPG4 to XPG3 (libxpg4 will be added soon)
Remove big part of my startup_setlocale hack.
Add missing manpage links.
1995-10-23 01:34:17 +00:00
Poul-Henning Kamp
696cbd5ff2 As above.
Oh I also put in a couple of compile-time warnings for the crypt stuff.
1995-10-22 14:38:48 +00:00
Andrey A. Chernov
32e0d22da8 Propogate default table to restricted 8859-1 template
(only control/graph/punct/print tags used)
Based on: kaleb@x.org and Bruce suggestions
1995-10-19 19:29:55 +00:00
Andrey A. Chernov
48b9e85079 Forget to close file
Submitted by: SANETO Takanori sanewo@strg.sony.co.jp
1995-08-11 08:44:31 +00:00
Andrey A. Chernov
6240d16c20 Fix cut&paste error: LC_COLLATE should be LC_TIME 1995-08-05 17:32:06 +00:00
Andrey A. Chernov
e20b74fb9e Add time locale loading 1995-08-05 17:31:17 +00:00
Garrett Wollman
c28fbb7baa Implement locale-sensitive strftime () from ADO (heavily modified
by me).  This probably loses for multibyte characters, but I have no
way of telling.  I'll let ache decide whether to add this support to
startup_setlocale.  Note that for this to make any sense at all, the
symlinks in /usr/share/locale must go.  (For the moment, this doesn't
make any difference since there are no locales supplied.)

Obtained from:	Arthur David Olson <ado@elsie.nci.nih.gov>
1995-08-04 18:43:01 +00:00
Rodney W. Grimes
6c06b4e2aa Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
Bruce Evans
980f2abdb8 Reviewed by: ache and wollman (long ago)
isctype.c:
o The tolower() and toupper() functions duplicated too much code
  and were out of date (surprise).  This didn't matter because
  it was difficult to call them.
o Change formatting to be more like that in <ctype.h> (with
  extra parentheses as in the macros).  Perhaps this file should
  be machine generated or everything should be handled like
  __tolower() so that no code is repeated.

nomacros.c:
o Instead of looking at _USE_CTYPE_INLINE_ to see what <ctype.h>
  has done, set _EXTERNALIZE_CTYPE_INLINES_ to tell <ctype.h>
  what to do, so that we don't have anything left to do.  Note
  that code is now generated even if inlines are used by default.
  This allows users to switch to non-inline versions.
1995-04-07 11:52:17 +00:00
Andrey A. Chernov
626da9c8ba Update info about LC_COLLATE implementation 1995-03-26 18:57:19 +00:00
Andrey A. Chernov
3d4c9a4bd7 Minor optimization 1995-02-18 01:42:02 +00:00
Andrey A. Chernov
926f20c973 Don't pick _warn module now 1995-02-17 16:36:12 +00:00
Andrey A. Chernov
c3d0cca4e9 Add 8-bit collate stuff
Submitted by: alex@elvisti.kiev.ua
1995-02-16 04:24:39 +00:00
Andrey A. Chernov
bac719f599 Sync with ctype.h (remove EOF handling) 1994-10-09 11:20:55 +00:00
Andrey A. Chernov
4c02aebe2f Sync with ctype.h (EOF, sign extention fixes) 1994-10-08 17:42:45 +00:00
Andrey A. Chernov
2f04ec53cc Make not-so-space-eaten locale version:
split modules to bring only neccessary functions,
eliminate sprintf, make reduced startup_locale version.
1994-09-24 15:59:33 +00:00
Garrett Wollman
2ceb2ce9ee First crack at making libc work with the new make macros. It compiles on
my machine, and a simple static (genassym) and shared (sysctl) executable
both work.  Still to be done: RPCand YP merge.
1994-08-05 01:19:12 +00:00
Rodney W. Grimes
58f0484fa2 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00