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
18 static int ccli_toupper (int c)
23 int (*ccl_toupper)(int c) = NULL;
25 int ccl_stricmp (const char *s1, const char *s2)
28 ccl_toupper = ccli_toupper;
32 c1 = (*ccl_toupper)(*s1);
33 c2 = (*ccl_toupper)(*s2);
39 return (*ccl_toupper)(*s1) - (*ccl_toupper)(*s2);
42 int ccl_memicmp (const char *s1, const char *s2, size_t n)
45 ccl_toupper = ccli_toupper;
50 c1 = (*ccl_toupper)(*s1);
51 c2 = (*ccl_toupper)(*s2);
52 if (n <= 1 || c1 != c2)
63 * c-file-style: "Stroustrup"
64 * indent-tabs-mode: nil
66 * vim: shiftwidth=4 tabstop=8 expandtab