Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

19 lines
434 B

  1. #include "case.h"
  2. int case_diffb(register const char *s,register unsigned long len,register const char *t)
  3. {
  4. register unsigned char x;
  5. register unsigned char y;
  6. while (len > 0) {
  7. --len;
  8. x = *s++ - 'A';
  9. if (x <= 'Z' - 'A') x += 'a'; else x += 'A';
  10. y = *t++ - 'A';
  11. if (y <= 'Z' - 'A') y += 'a'; else y += 'A';
  12. if (x != y)
  13. return ((int)(unsigned int) x) - ((int)(unsigned int) y);
  14. }
  15. return 0;
  16. }