Subversion Repositories Kolibri OS

Rev

Rev 4874 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1.  
  2. /*
  3. FUNCTION
  4.         <<isblank>>---blank character predicate
  5.  
  6. INDEX
  7.         isblank
  8.  
  9. ANSI_SYNOPSIS
  10.         #include <ctype.h>
  11.         int isblank(int <[c]>);
  12.  
  13. TRAD_SYNOPSIS
  14.         #include <ctype.h>
  15.         int isblank(<[c]>);
  16.  
  17. DESCRIPTION
  18. <<isblank>> is a function which classifies ASCII integer values by table
  19. lookup.  It is a predicate returning non-zero for blank characters, and 0
  20. for other characters.  It is defined only if <[c]> is representable as an
  21. unsigned char or if <[c]> is EOF.
  22.  
  23. RETURNS
  24. <<isblank>> returns non-zero if <[c]> is a blank character.
  25.  
  26. PORTABILITY
  27. <<isblank>> is C99.
  28.  
  29. No supporting OS subroutines are required.
  30. */
  31.  
  32. #include <_ansi.h>
  33. #include <ctype.h>
  34.  
  35.  
  36.  
  37. #undef isblank
  38. int
  39. _DEFUN(isblank,(c),int c)
  40. {
  41.         return ((__ctype_ptr__[c+1] & _B) || (c == '\t'));
  42. }
  43.