Menu

Commit [r277]  Maximize  Restore  History

- Modified the locale-aware isalnum(), isalpha(), iscntrl(),

isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(),
isupper(), isxdigit(), tolower() and toupper() functions
to clamp the input parameter to the "unsigned char" range before
it is submitted to the respective locale.library function. This
should be in sync with what the specs demand, which state that
if the input parameter is neither EOF nor in the range of an
"unsigned char" variable, then the results are undefined.

- ungetc() now returns the input character, clamped to an unsigned
char value, upon success. Previously, if the input parameter was
negative and not EOF, the result was identical to the input, which
could have had negative side-effects.

obarthel 2005-05-29

changed /trunk/library/changes
changed /trunk/library/ctype_headers.h
changed /trunk/library/ctype_isalnum.c
changed /trunk/library/ctype_isalpha.c
changed /trunk/library/ctype_iscntrl.c
changed /trunk/library/ctype_isdigit.c
changed /trunk/library/ctype_isgraph.c
changed /trunk/library/ctype_islower.c
changed /trunk/library/ctype_isprint.c
changed /trunk/library/ctype_ispunct.c
changed /trunk/library/ctype_isspace.c
changed /trunk/library/ctype_isupper.c
changed /trunk/library/ctype_isxdigit.c
changed /trunk/library/ctype_tolower.c
changed /trunk/library/ctype_toupper.c
changed /trunk/library/stdio_fputc.c
changed /trunk/library/stdio_ungetc.c
/trunk/library/changes Diff Switch to side-by-side view
Loading...
/trunk/library/ctype_headers.h Diff Switch to side-by-side view
Loading...
/trunk/library/ctype_isalnum.c Diff Switch to side-by-side view
Loading...
/trunk/library/ctype_isalpha.c Diff Switch to side-by-side view
Loading...
/trunk/library/ctype_iscntrl.c Diff Switch to side-by-side view
Loading...
/trunk/library/ctype_isdigit.c Diff Switch to side-by-side view
Loading...
/trunk/library/ctype_isgraph.c Diff Switch to side-by-side view
Loading...
/trunk/library/ctype_islower.c Diff Switch to side-by-side view
Loading...
/trunk/library/ctype_isprint.c Diff Switch to side-by-side view
Loading...
/trunk/library/ctype_ispunct.c Diff Switch to side-by-side view
Loading...
/trunk/library/ctype_isspace.c Diff Switch to side-by-side view
Loading...
/trunk/library/ctype_isupper.c Diff Switch to side-by-side view
Loading...
/trunk/library/ctype_isxdigit.c Diff Switch to side-by-side view
Loading...
/trunk/library/ctype_tolower.c Diff Switch to side-by-side view
Loading...
/trunk/library/ctype_toupper.c Diff Switch to side-by-side view
Loading...
/trunk/library/stdio_fputc.c Diff Switch to side-by-side view
Loading...
/trunk/library/stdio_ungetc.c Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.