Commit fbc59d65 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Gabriel Krisman Bertazi

unicode: move utf8cursor to utf8-selftest.c

Only used by the tests, so no need to keep it in the core.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarGabriel Krisman Bertazi <krisman@collabora.com>
parent 9012d79c
...@@ -456,22 +456,6 @@ int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data, ...@@ -456,22 +456,6 @@ int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data,
} }
EXPORT_SYMBOL(utf8ncursor); EXPORT_SYMBOL(utf8ncursor);
/*
* Set up an utf8cursor for use by utf8byte().
*
* u8c : pointer to cursor.
* data : const struct utf8data to use for normalization.
* s : NUL-terminated string.
*
* Returns -1 on error, 0 on success.
*/
int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data,
const char *s)
{
return utf8ncursor(u8c, data, s, (unsigned int)-1);
}
EXPORT_SYMBOL(utf8cursor);
/* /*
* Get one byte from the normalized form of the string described by u8c. * Get one byte from the normalized form of the string described by u8c.
* *
......
...@@ -165,6 +165,12 @@ static ssize_t utf8len(const struct utf8data *data, const char *s) ...@@ -165,6 +165,12 @@ static ssize_t utf8len(const struct utf8data *data, const char *s)
return utf8nlen(data, s, (size_t)-1); return utf8nlen(data, s, (size_t)-1);
} }
static int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data,
const char *s)
{
return utf8ncursor(u8c, data, s, (unsigned int)-1);
}
static void check_utf8_nfdi(void) static void check_utf8_nfdi(void)
{ {
int i; int i;
......
...@@ -65,8 +65,6 @@ struct utf8cursor { ...@@ -65,8 +65,6 @@ struct utf8cursor {
* Returns 0 on success. * Returns 0 on success.
* Returns -1 on failure. * Returns -1 on failure.
*/ */
extern int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data,
const char *s);
extern int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data, extern int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data,
const char *s, size_t len); const char *s, size_t len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment