Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2. FUNCTION
  3.         <<iswxdigit>>---hexadecimal digit wide character test
  4.  
  5. INDEX
  6.         iswxdigit
  7.  
  8. ANSI_SYNOPSIS
  9.         #include <wctype.h>
  10.         int iswxdigit(wint_t <[c]>);
  11.  
  12. TRAD_SYNOPSIS
  13.         #include <wctype.h>
  14.         int iswxdigit(<[c]>)
  15.         wint_t <[c]>;
  16.  
  17. DESCRIPTION
  18. <<iswxdigit>> is a function which classifies wide character values that
  19. are hexadecimal digits.
  20.  
  21. RETURNS
  22. <<iswxdigit>> returns non-zero if <[c]> is a hexadecimal digit wide character.
  23.  
  24. PORTABILITY
  25. <<iswxdigit>> is C99.
  26.  
  27. No supporting OS subroutines are required.
  28. */
  29. #include <_ansi.h>
  30. #include <wctype.h>
  31.  
  32. int
  33. _DEFUN(iswxdigit,(c), wint_t c)
  34. {
  35.   return ((c >= (wint_t)'0' && c <= (wint_t)'9') ||
  36.           (c >= (wint_t)'a' && c <= (wint_t)'f') ||
  37.           (c >= (wint_t)'A' && c <= (wint_t)'F'));
  38. }
  39.  
  40.