Logo Search packages:      
Sourcecode: ucspi-tcp version File versions  Download package

case_diffs.c

#include "case.h"

int case_diffs(register char *s,register char *t)
{
  register unsigned char x;
  register unsigned char y;

  for (;;) {
    x = *s++ - 'A';
    if (x <= 'Z' - 'A') x += 'a'; else x += 'A';
    y = *t++ - 'A';
    if (y <= 'Z' - 'A') y += 'a'; else y += 'A';
    if (x != y) break;
    if (!x) break;
  }
  return ((int)(unsigned int) x) - ((int)(unsigned int) y);
}

Generated by  Doxygen 1.6.0   Back to index