1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) 1995-2008 Index Data
3 * See the file LICENSE for details.
7 * \brief Implements CCL string compare utilities
15 static int ccli_toupper (int c)
20 int (*ccl_toupper)(int c) = NULL;
22 int ccl_stricmp (const char *s1, const char *s2)
25 ccl_toupper = ccli_toupper;
29 c1 = (*ccl_toupper)(*s1);
30 c2 = (*ccl_toupper)(*s2);
36 return (*ccl_toupper)(*s1) - (*ccl_toupper)(*s2);
39 int ccl_memicmp (const char *s1, const char *s2, size_t n)
42 ccl_toupper = ccli_toupper;
47 c1 = (*ccl_toupper)(*s1);
48 c2 = (*ccl_toupper)(*s2);
49 if (n <= 1 || c1 != c2)
60 * indent-tabs-mode: nil
62 * vim: shiftwidth=4 tabstop=8 expandtab