X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmatchstr.c;h=101e777b75b81327469a778684799878ef760e7b;hb=ce46d8646a527a8364d3aa152822b3680a7321bd;hp=e2a1da3579ad5552623cc2dbc0d45b3bccf3b3cb;hpb=8e9d2cec97def1cd8b89b1fe427f1a232661ec6f;p=yaz-moved-to-github.git diff --git a/src/matchstr.c b/src/matchstr.c index e2a1da3..101e777 100644 --- a/src/matchstr.c +++ b/src/matchstr.c @@ -1,11 +1,11 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2008 Index Data + * Copyright (C) 1995-2013 Index Data * See the file LICENSE for details. */ /** * \file matchstr.c - * \brief Implements loose string matching + * \brief a couple of string utilities */ #if HAVE_CONFIG_H @@ -14,9 +14,9 @@ #include #include -#include #include -#include +#include +#include int yaz_matchstr(const char *s1, const char *s2) { @@ -35,10 +35,10 @@ int yaz_matchstr(const char *s1, const char *s2) break; if (c2 != '.') { - if (isupper(c1)) - c1 = tolower(c1); - if (isupper(c2)) - c2 = tolower(c2); + if (yaz_isupper(c1)) + c1 = yaz_tolower(c1); + if (yaz_isupper(c2)) + c2 = yaz_tolower(c2); if (c1 != c2) break; } @@ -74,6 +74,7 @@ int yaz_memcmp(const void *a, const void *b, size_t len_a, size_t len_b) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab