1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- 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.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14958 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-05-29 09:56:09 +00:00
parent fb4dae84aa
commit 2ced1d3293
17 changed files with 125 additions and 35 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: ctype_headers.h,v 1.4 2005-03-30 19:37:26 obarthel Exp $
* $Id: ctype_headers.h,v 1.5 2005-05-29 09:56:09 obarthel Exp $
*
* :ts=4
*
@ -60,6 +60,7 @@
#include <locale.h>
#include <assert.h>
#include <limits.h>
#include <ctype.h>
/****************************************************************************/