mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Don't user __tolower directly for tolower implementation. Use inline function which tests for the range first. Make _tolower equivalent to old tolower macros. Likewise for toupper.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992, 1997, 1999 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -39,11 +39,11 @@ func (isxdigit, _ISxdigit)
|
||||
int
|
||||
tolower (int c)
|
||||
{
|
||||
return __tolower (c);
|
||||
return __c >= -128 && __c < 256 ? __tolower (__c) : __c;
|
||||
}
|
||||
|
||||
int
|
||||
toupper (int c)
|
||||
{
|
||||
return __toupper (c);
|
||||
return __c >= -128 && __c < 256 ? __toupper (__c) : __c;
|
||||
}
|
||||
|
Reference in New Issue
Block a user