X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fjfs%2Fjfs_unicode.h;h=af6ccd2220ef567b6ec2fd4946d1c16101aedf11;hb=9e1bf581d67d87a1d7fc0ea500729e3a03643a26;hp=69e25ebe87ac94cb222955b272cc5430ddc13a0f;hpb=8d40237c730b8be87c1b80a5d96b9c603fefa829;p=linux-2.6.git diff --git a/fs/jfs/jfs_unicode.h b/fs/jfs/jfs_unicode.h index 69e25ebe8..af6ccd222 100644 --- a/fs/jfs/jfs_unicode.h +++ b/fs/jfs/jfs_unicode.h @@ -31,7 +31,7 @@ typedef struct { extern signed char UniUpperTable[512]; extern UNICASERANGE UniUpperRange[]; extern int get_UCSname(struct component_name *, struct dentry *); -extern int jfs_strfromUCS_le(char *, const __le16 *, int, struct nls_table *); +extern int jfs_strfromUCS_le(char *, const wchar_t *, int, struct nls_table *); #define free_UCSname(COMP) kfree((COMP)->name) @@ -51,10 +51,10 @@ static inline wchar_t *UniStrcpy(wchar_t * ucs1, const wchar_t * ucs2) /* * UniStrncpy: Copy length limited string with pad */ -static inline __le16 *UniStrncpy_le(__le16 * ucs1, const __le16 * ucs2, +static inline wchar_t *UniStrncpy(wchar_t * ucs1, const wchar_t * ucs2, size_t n) { - __le16 *anchor = ucs1; + wchar_t *anchor = ucs1; while (n-- && *ucs2) /* Copy the strings */ *ucs1++ = *ucs2++; @@ -68,7 +68,7 @@ static inline __le16 *UniStrncpy_le(__le16 * ucs1, const __le16 * ucs2, /* * UniStrncmp_le: Compare length limited string - native to little-endian */ -static inline int UniStrncmp_le(const wchar_t * ucs1, const __le16 * ucs2, +static inline int UniStrncmp_le(const wchar_t * ucs1, const wchar_t * ucs2, size_t n) { if (!n) @@ -81,27 +81,10 @@ static inline int UniStrncmp_le(const wchar_t * ucs1, const __le16 * ucs2, } /* - * UniStrncpy_to_le: Copy length limited string with pad to little-endian - */ -static inline __le16 *UniStrncpy_to_le(__le16 * ucs1, const wchar_t * ucs2, - size_t n) -{ - __le16 *anchor = ucs1; - - while (n-- && *ucs2) /* Copy the strings */ - *ucs1++ = cpu_to_le16(*ucs2++); - - n++; - while (n--) /* Pad with nulls */ - *ucs1++ = 0; - return anchor; -} - -/* - * UniStrncpy_from_le: Copy length limited string with pad from little-endian + * UniStrncpy_le: Copy length limited string with pad to little-endian */ -static inline wchar_t *UniStrncpy_from_le(wchar_t * ucs1, const __le16 * ucs2, - size_t n) +static inline wchar_t *UniStrncpy_le(wchar_t * ucs1, const wchar_t * ucs2, + size_t n) { wchar_t *anchor = ucs1; @@ -114,6 +97,7 @@ static inline wchar_t *UniStrncpy_from_le(wchar_t * ucs1, const __le16 * ucs2, return anchor; } + /* * UniToupper: Convert a unicode character to upper case */