mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-28 11:57:28 +00:00
Remove EOF handling after Bruce explanation. This step returns
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.
This commit is contained in:
parent
7afcaa86db
commit
09b133a008
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3456
@ -103,16 +103,9 @@ __END_DECLS
|
||||
#endif
|
||||
|
||||
#if defined(_USE_CTYPE_INLINE_)
|
||||
|
||||
#ifndef EOF
|
||||
#define EOF (-1)
|
||||
#endif
|
||||
|
||||
static __inline int
|
||||
__istype(_BSD_RUNE_T_ c, unsigned long f)
|
||||
{
|
||||
if (c == EOF)
|
||||
return 0;
|
||||
if (c < 0)
|
||||
c = (unsigned char) c;
|
||||
return((((c & _CRMASK) ? ___runetype(c) :
|
||||
@ -122,8 +115,6 @@ __istype(_BSD_RUNE_T_ c, unsigned long f)
|
||||
static __inline int
|
||||
__isctype(_BSD_RUNE_T_ c, unsigned long f)
|
||||
{
|
||||
if (c == EOF)
|
||||
return 0;
|
||||
if (c < 0)
|
||||
c = (unsigned char) c;
|
||||
return((((c & _CRMASK) ? 0 :
|
||||
@ -135,8 +126,6 @@ __isctype(_BSD_RUNE_T_ c, unsigned long f)
|
||||
static __inline _BSD_RUNE_T_
|
||||
toupper(_BSD_RUNE_T_ c)
|
||||
{
|
||||
if (c == EOF)
|
||||
return EOF;
|
||||
if (c < 0)
|
||||
c = (unsigned char) c;
|
||||
return((c & _CRMASK) ?
|
||||
@ -146,8 +135,6 @@ toupper(_BSD_RUNE_T_ c)
|
||||
static __inline _BSD_RUNE_T_
|
||||
tolower(_BSD_RUNE_T_ c)
|
||||
{
|
||||
if (c == EOF)
|
||||
return EOF;
|
||||
if (c < 0)
|
||||
c = (unsigned char) c;
|
||||
return((c & _CRMASK) ?
|
||||
|
@ -103,16 +103,9 @@ __END_DECLS
|
||||
#endif
|
||||
|
||||
#if defined(_USE_CTYPE_INLINE_)
|
||||
|
||||
#ifndef EOF
|
||||
#define EOF (-1)
|
||||
#endif
|
||||
|
||||
static __inline int
|
||||
__istype(_BSD_RUNE_T_ c, unsigned long f)
|
||||
{
|
||||
if (c == EOF)
|
||||
return 0;
|
||||
if (c < 0)
|
||||
c = (unsigned char) c;
|
||||
return((((c & _CRMASK) ? ___runetype(c) :
|
||||
@ -122,8 +115,6 @@ __istype(_BSD_RUNE_T_ c, unsigned long f)
|
||||
static __inline int
|
||||
__isctype(_BSD_RUNE_T_ c, unsigned long f)
|
||||
{
|
||||
if (c == EOF)
|
||||
return 0;
|
||||
if (c < 0)
|
||||
c = (unsigned char) c;
|
||||
return((((c & _CRMASK) ? 0 :
|
||||
@ -135,8 +126,6 @@ __isctype(_BSD_RUNE_T_ c, unsigned long f)
|
||||
static __inline _BSD_RUNE_T_
|
||||
toupper(_BSD_RUNE_T_ c)
|
||||
{
|
||||
if (c == EOF)
|
||||
return EOF;
|
||||
if (c < 0)
|
||||
c = (unsigned char) c;
|
||||
return((c & _CRMASK) ?
|
||||
@ -146,8 +135,6 @@ toupper(_BSD_RUNE_T_ c)
|
||||
static __inline _BSD_RUNE_T_
|
||||
tolower(_BSD_RUNE_T_ c)
|
||||
{
|
||||
if (c == EOF)
|
||||
return EOF;
|
||||
if (c < 0)
|
||||
c = (unsigned char) c;
|
||||
return((c & _CRMASK) ?
|
||||
|
Loading…
Reference in New Issue
Block a user