Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | 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.
  21.  
  22. RETURNS
  23. <<isblank>> returns non-zero if <[c]> is a blank character.
  24.  
  25. PORTABILITY
  26. <<isblank>> is C99.
  27.  
  28. No supporting OS subroutines are required.
  29. */
  30.  
  31. #include <_ansi.h>
  32. #include <ctype.h>
  33.  
  34.  
  35.  
  36. #undef isblank
  37. int
  38. _DEFUN(isblank,(c),int c)
  39. {
  40.         return ((__ctype_ptr__[c+1] & _B) || (c == '\t'));
  41. }
  42.