···11-/*22- * linux/arch/alpha/lib/strcasecmp.c33- */44-55-#include <linux/string.h>66-77-88-/* We handle nothing here except the C locale. Since this is used in99- only one place, on strings known to contain only 7 bit ASCII, this1010- is ok. */1111-1212-int strcasecmp(const char *a, const char *b)1313-{1414- int ca, cb;1515-1616- do {1717- ca = *a++ & 0xff;1818- cb = *b++ & 0xff;1919- if (ca >= 'A' && ca <= 'Z')2020- ca += 'a' - 'A';2121- if (cb >= 'A' && cb <= 'Z')2222- cb += 'a' - 'A';2323- } while (ca == cb && ca != '\0');2424-2525- return ca - cb;2626-}
···11-/*22- * linux/arch/alpha/lib/strcasecmp.c33- */44-55-#include <linux/string.h>66-77-88-/* We handle nothing here except the C locale. Since this is used in99- only one place, on strings known to contain only 7 bit ASCII, this1010- is ok. */1111-1212-int strcasecmp(const char *a, const char *b)1313-{1414- int ca, cb;1515-1616- do {1717- ca = *a++ & 0xff;1818- cb = *b++ & 0xff;1919- if (ca >= 'A' && ca <= 'Z')2020- ca += 'a' - 'A';2121- if (cb >= 'A' && cb <= 'Z')2222- cb += 'a' - 'A';2323- } while (ca == cb && ca != '\0');2424-2525- return ca - cb;2626-}
···11-/*22- * linux/arch/xtensa/lib/strcasecmp.c33- *44- * This file is subject to the terms and conditions of the GNU General55- * Public License. See the file "COPYING" in the main directory of66- * this archive for more details.77- *88- * Copyright (C) 2002 Tensilica Inc.99- */1010-1111-#include <linux/string.h>1212-1313-1414-/* We handle nothing here except the C locale. Since this is used in1515- only one place, on strings known to contain only 7 bit ASCII, this1616- is ok. */1717-1818-int strcasecmp(const char *a, const char *b)1919-{2020- int ca, cb;2121-2222- do {2323- ca = *a++ & 0xff;2424- cb = *b++ & 0xff;2525- if (ca >= 'A' && ca <= 'Z')2626- ca += 'a' - 'A';2727- if (cb >= 'A' && cb <= 'Z')2828- cb += 'a' - 'A';2929- } while (ca == cb && ca != '\0');3030-3131- return ca - cb;3232-}