From: Bruno Haible Date: Tue, 10 Mar 2009 01:39:07 +0000 (+0100) Subject: New module 'unicase/ulc-casecoll'. X-Git-Tag: v0.1~6099 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=bf10104d9c663eb3267c13e3a32c7f92134474bf;p=gnulib.git New module 'unicase/ulc-casecoll'. --- diff --git a/ChangeLog b/ChangeLog index f4d426413..f0da38a8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-03-08 Bruno Haible + New module 'unicase/ulc-casecoll'. + * lib/unicase.h (ulc_casecoll): New declaration. + * lib/unicase/ulc-casecoll.c: New file. + * modules/unicase/ulc-casecoll: New file. + New module 'unicase/ulc-casexfrm'. * lib/unicase.h (ulc_casexfrm): New declaration. * lib/unicase/ulc-casexfrm.c: New file. diff --git a/lib/unicase.h b/lib/unicase.h index ca3ab32e4..bfb0c1808 100644 --- a/lib/unicase.h +++ b/lib/unicase.h @@ -207,6 +207,10 @@ extern int u32_casecoll (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2, const char *iso639_language, uninorm_t nf, int *resultp); +extern int + ulc_casecoll (const char *s1, size_t n1, + const char *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); /* Set *RESULTP to true if mapping NFD(S) to upper case is a no-op, or to false diff --git a/lib/unicase/ulc-casecoll.c b/lib/unicase/ulc-casecoll.c new file mode 100644 index 000000000..9730b6dcc --- /dev/null +++ b/lib/unicase/ulc-casecoll.c @@ -0,0 +1,31 @@ +/* Locale dependent, case and normalization insensitive comparison of strings. + Copyright (C) 2009 Free Software Foundation, Inc. + Written by Bruno Haible , 2009. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include "unicase.h" + +#include +#include + +#include "memcmp2.h" + +#define FUNC ulc_casecoll +#define UNIT char +#define U_CASEXFRM ulc_casexfrm +#include "u-casecoll.h" diff --git a/modules/unicase/ulc-casecoll b/modules/unicase/ulc-casecoll new file mode 100644 index 000000000..7762cef5e --- /dev/null +++ b/modules/unicase/ulc-casecoll @@ -0,0 +1,26 @@ +Description: +Locale dependent, case and normalization insensitive comparison of strings. + +Files: +lib/unicase/ulc-casecoll.c +lib/unicase/u-casecoll.h + +Depends-on: +unicase/base +unicase/ulc-casexfrm +memcmp2 + +configure.ac: + +Makefile.am: +lib_SOURCES += unicase/ulc-casecoll.c + +Include: +"unicase.h" + +License: +LGPL + +Maintainer: +Bruno Haible +