#define uninorm_is_composing(nf) \
((* (const unsigned int *) (nf) >> 1) & 1)
+/* Return the decomposing variant of a normalization form.
+ This maps NFC,NFD -> NFD and NFKC,NFKD -> NFKD. */
+extern uninorm_t uninorm_decomposing_form (uninorm_t nf);
+
/* Return the specified normalization form of a string. */
extern uint8_t *
--- /dev/null
+/* Decomposing variant of a normalization form.
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "uninorm.h"
+
+#include "normalize-internal.h"
+
+uninorm_t
+uninorm_decomposing_form (uninorm_t nf)
+{
+ return nf->decomposing_variant;
+}
/* Function that combines two Unicode characters, a starter and another
character. */
ucs4_t (*composer) (ucs4_t uc1, ucs4_t uc2);
+ /* Decomposing variant. */
+ const struct unicode_normalization_form *decomposing_variant;
};
--- /dev/null
+Description:
+Decomposing variant of a normalization form.
+
+Files:
+lib/uninorm/decomposing-form.c
+lib/uninorm/normalize-internal.h
+
+Depends-on:
+uninorm/base
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += uninorm/decomposing-form.c
+
+Include:
+"uninorm.h"
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
+