1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) 1995-2011 Index Data
3 * See the file LICENSE for details.
7 * \brief Implements CCL string compare utilities
12 #include <yaz/yaz-iconv.h>
18 static int ccli_toupper (int c)
21 return yaz_toupper(c);
26 int (*ccl_toupper)(int c) = NULL;
28 int ccl_stricmp (const char *s1, const char *s2)
31 ccl_toupper = ccli_toupper;
35 c1 = (*ccl_toupper)(*s1);
36 c2 = (*ccl_toupper)(*s2);
42 return (*ccl_toupper)(*s1) - (*ccl_toupper)(*s2);
45 int ccl_memicmp (const char *s1, const char *s2, size_t n)
48 ccl_toupper = ccli_toupper;
53 c1 = (*ccl_toupper)(*s1);
54 c2 = (*ccl_toupper)(*s2);
55 if (n <= 1 || c1 != c2)
66 * c-file-style: "Stroustrup"
67 * indent-tabs-mode: nil
69 * vim: shiftwidth=4 tabstop=8 expandtab