Subversion Repositories Kolibri OS

Rev

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

  1.  
  2. #include "ctype.h"
  3.  
  4. int toupper(int c)
  5. {
  6.  
  7. if ( (c >= 97) && (c <= 122) )
  8.         return c-32 ;
  9.  
  10. if ( (c >= 160) && (c <= 175) )
  11.         return c-32 ;
  12.  
  13. if ( (c >= 224) && (c <= 239) )
  14.         return c-80 ;
  15.  
  16. if ( (c == 241) || (c == 243) || (c == 245) || (c == 247) )
  17.         return c-1;
  18.  
  19. return c;
  20. }
  21.  
  22. int tolower(int c)
  23. {
  24.  
  25. if ( (c >= 65) && (c <= 90) )
  26.         return c+32 ;
  27.  
  28. if ( (c >= 128) && (c <= 143) )
  29.         return c+32 ;
  30.  
  31. if ( (c >= 144) && (c <= 159) )
  32.         return c+80 ;
  33.  
  34. if ( (c == 240) || (c == 242) || (c == 244) || (c == 246) )
  35.         return c+1;
  36.  
  37. return c;
  38. }
  39.  
  40.