| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Add a few $FreeBSD$
|
|
|
|
| |
to generate 3bytes longer opcode.
|
|
|
|
| |
(_c < 0 || _c >= 128) to (_c & ~0x7F)
|
|
|
|
|
| |
hardcode 128 here instead, since default locale never define anything
above 127 char.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
functions, allowing it to generate better code for the <ctype.h> and
<wctype.h> functions. For example, it can now keep _CurrentRuneLocale
in a register across calls to these functions, and can delete calls to
___runetype() if the result is already known or not used.
|
| |
|
|
|
|
|
|
| |
which has been repo-copied from ctype.h. This will allow us to remove
namespace pollution from <wctype.h> and to make wcwidth() an inline function
without introducing more pollution.
|
|
|
|
| |
bring back the inline functions for the !__BSD_VISIBLE case.
|
|
|
|
|
|
| |
with ``__'' to avoid polluting the namespace. This doesn't change the
documented rune interface at all, but breaks applications that accessed
_RuneLocale directly.
|
|
|
|
|
| |
PR: 63371
Submitted by: Stefan Farfeleder
|
|
|
|
|
| |
optimizations when a standard has been requested, except when the
inline optimizations are also specifically requested.
|
|
|
|
|
|
|
|
|
|
|
|
| |
visibility primitives.
o Implement _tolower() and _toupper() POSIX.1-2001 (XSI) macros in
<ctype.h>.
o Reduce pollution in <runetype.h> by removing typedefs and using
implementation namespaced types.
o Add a typedef in <rune.h> to compensate for <runetype.h> losing its
typedefs.
Reviewed by: bde
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
called <machine/_types.h>.
o <machine/ansi.h> will continue to live so it can define MD clock
macros, which are only MD because of gratuitous differences between
architectures.
o Change all headers to make use of this. This mainly involves
changing:
#ifdef _BSD_FOO_T_
typedef _BSD_FOO_T_ foo_t;
#undef _BSD_FOO_T_
#endif
to:
#ifndef _FOO_T_DECLARED
typedef __foo_t foo_t;
#define _FOO_T_DECLARED
#endif
Concept by: bde
Reviewed by: jake, obrien
|
| |
|
| |
|
|
|
|
|
|
|
| |
Submitted by: clkao@clkao.org
Reviewed by: keichii
Obtained from: NetBSD
MFC after: 1 month
|
|
|
|
|
|
| |
# This appears to not break X11, but I'm having problems compiling the
# glide part of the server with or without this patch, so I can't tell
# for sure.
|
|
|
|
|
|
|
|
| |
compile issues. std::isspace(' ') was expanding to std::(!!_maskrune...)
which would cause a C++ compile error. Making __istype() an inline
causes the expansion to be std::__istype() instead, which is valid.
Reviewed by: jkh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
isphonogram, isrune, isspecial. Fix ordering.
Reviewed by: bde
|
| |
|
|
|
|
|
|
| |
2) Revive __maskrune, just return mask now
3) Express __istype via !!__maskrune
4) Use __maskrune in digittoint
|
|
|
|
|
| |
instead just remove '!!' to make digittoint() work and re-arrange
things a little
|
|
|
|
|
| |
Redesign to allow digittoint work for runes too
__maskrune removed, __istype become a macro, __runeflags added
|
|
|
|
| |
that this is right, but the old reference defaintely was not.
|
|
|
|
|
| |
Basic support for the Shift JIS encoding of japanese.
(and one tiny typo fixed in a comment)
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Remove EOF hack, now it is recognized per ANSI/POSIX
Add upper bounds check
Handle all negative chars inside locale functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix numerous ANSI conformance bugs and other nits.
ctype.h:
o There were no prototypes behind the macros (conformance bug).
o isascii() didn't have enough parentheses (plain bug).
o tolower() and toupper were always static inline (conformance
bug? You could undef them and take their address, but this
gave different addresses in different modules. You couldn't
undef them and declare them (correctly) again). <stdio.h>'s
treatment of putc() shows one way to handle this problem,
but it only works because the putc() macro is allowed to
reevaluate its args. I used a hack controlled by
_EXTERNALIZE_CTYPE_INLINES_ to get <ctype.h> to generate the
code (the previous hack involving _ANSI_LIBRARY_ goes away).
This has the advantage that the core of the functions is only
written down once and the disadvantage that another layer of
functions is required. The extra layer goes away if inline
functions are used, leaving only the problem of understanding
why there are functions named toupper(), __toupper and
___toupper() as well as a macro named toupper.
o Nothing seems to define _USE_CTYPE_LIBRARY_. Eliminate it
o Let the user set _USE_CTYPE_INLINE_ and _DONT_USE_CTYPE_INLINE_
for full control over inlining.
o The args for the inline functions didn't have enough
underscores (conformance bug).
o The formatting and ordering was inconsistent (style bug).
o TODO: fix conformance bugs brought by including <runetype.h>.
|
|
|
|
| |
Obtained from: 1.x
|
|
|
|
|
| |
to 4.4 way to not allow EOF in ctype and now all signed chars
(including '\377' which becomes EOF) converted to (unsigned char) properly.
|
|
|
|
|
| |
Cast all ints < 0 to (unsigned char) to fix common problem
with sign extention on signed char.
|
|
|