Skip to content

Commit fbc59d6

Browse files
Christoph Hellwigkrisman-at-collabora
authored andcommitted
unicode: move utf8cursor to utf8-selftest.c
Only used by the tests, so no need to keep it in the core. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
1 parent 9012d79 commit fbc59d6

File tree

3 files changed

+6
-18
lines changed

3 files changed

+6
-18
lines changed

fs/unicode/utf8-norm.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -456,22 +456,6 @@ int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data,
456456
}
457457
EXPORT_SYMBOL(utf8ncursor);
458458

459-
/*
460-
* Set up an utf8cursor for use by utf8byte().
461-
*
462-
* u8c : pointer to cursor.
463-
* data : const struct utf8data to use for normalization.
464-
* s : NUL-terminated string.
465-
*
466-
* Returns -1 on error, 0 on success.
467-
*/
468-
int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data,
469-
const char *s)
470-
{
471-
return utf8ncursor(u8c, data, s, (unsigned int)-1);
472-
}
473-
EXPORT_SYMBOL(utf8cursor);
474-
475459
/*
476460
* Get one byte from the normalized form of the string described by u8c.
477461
*

fs/unicode/utf8-selftest.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ static ssize_t utf8len(const struct utf8data *data, const char *s)
165165
return utf8nlen(data, s, (size_t)-1);
166166
}
167167

168+
static int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data,
169+
const char *s)
170+
{
171+
return utf8ncursor(u8c, data, s, (unsigned int)-1);
172+
}
173+
168174
static void check_utf8_nfdi(void)
169175
{
170176
int i;

fs/unicode/utf8n.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ struct utf8cursor {
6565
* Returns 0 on success.
6666
* Returns -1 on failure.
6767
*/
68-
extern int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data,
69-
const char *s);
7068
extern int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data,
7169
const char *s, size_t len);
7270

0 commit comments

Comments
 (0)