Subversion Repositories Kolibri OS

Rev

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

  1.  
  2. /*
  3. FUNCTION
  4. <<islower>>---lowercase character predicate
  5.  
  6. INDEX
  7. islower
  8.  
  9. ANSI_SYNOPSIS
  10. #include <ctype.h>
  11. int islower(int <[c]>);
  12.  
  13. TRAD_SYNOPSIS
  14. #include <ctype.h>
  15. int islower(<[c]>);
  16.  
  17. DESCRIPTION
  18. <<islower>> is a macro which classifies ASCII integer values by table
  19. lookup.  It is a predicate returning non-zero for minuscules
  20. (lowercase alphabetic characters), and 0 for other characters.
  21. It is defined only if <[c]> is representable as an unsigned char or if
  22. <[c]> is EOF.
  23.  
  24. You can use a compiled subroutine instead of the macro definition by
  25. undefining the macro using `<<#undef islower>>'.
  26.  
  27. RETURNS
  28. <<islower>> returns non-zero if <[c]> is a lowercase letter (<<a>>--<<z>>).
  29.  
  30. PORTABILITY
  31. <<islower>> is ANSI C.
  32.  
  33. No supporting OS subroutines are required.
  34. */
  35. #include <_ansi.h>
  36. #include <ctype.h>
  37.  
  38. #undef islower
  39. int
  40. _DEFUN(islower,(c),int c)
  41. {
  42.         return ((__ctype_ptr__[c+1] & (_U|_L)) == _L);
  43. }
  44.  
  45.