X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=fs%2Fcifs%2Fcifs_unicode.h;h=14eb9a2395d3cc3c4020e08c01d8b3b5dbc9faa0;hb=670f94573104b4a25525d3fcdcd6496c678df172;hp=39e5b970325f6a14428eef357e98da44808356d1;hpb=989e4d6cbc69191c41ddf4b1c492457410376b43;p=linux-2.6-omap-h63xx.git diff --git a/fs/cifs/cifs_unicode.h b/fs/cifs/cifs_unicode.h index 39e5b970325..14eb9a2395d 100644 --- a/fs/cifs/cifs_unicode.h +++ b/fs/cifs/cifs_unicode.h @@ -5,20 +5,20 @@ * Convert a unicode character to upper or lower case using * compressed tables. * - * Copyright (c) International Business Machines Corp., 2000,2005555555555555555555555555555555555555555555555555555555 + * Copyright (c) International Business Machines Corp., 2000,2007 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 2 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 General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @@ -70,7 +70,7 @@ int cifs_strtoUCS(__le16 *, const char *, int, const struct nls_table *); * Address of the first string */ static inline wchar_t * -UniStrcat(wchar_t * ucs1, const wchar_t * ucs2) +UniStrcat(wchar_t *ucs1, const wchar_t *ucs2) { wchar_t *anchor = ucs1; /* save a pointer to start of ucs1 */ @@ -88,7 +88,7 @@ UniStrcat(wchar_t * ucs1, const wchar_t * ucs2) * or NULL if the character is not in the string */ static inline wchar_t * -UniStrchr(const wchar_t * ucs, wchar_t uc) +UniStrchr(const wchar_t *ucs, wchar_t uc) { while ((*ucs != uc) && *ucs) ucs++; @@ -107,7 +107,7 @@ UniStrchr(const wchar_t * ucs, wchar_t uc) * > 0: First string is greater than second */ static inline int -UniStrcmp(const wchar_t * ucs1, const wchar_t * ucs2) +UniStrcmp(const wchar_t *ucs1, const wchar_t *ucs2) { while ((*ucs1 == *ucs2) && *ucs1) { ucs1++; @@ -120,7 +120,7 @@ UniStrcmp(const wchar_t * ucs1, const wchar_t * ucs2) * UniStrcpy: Copy a string */ static inline wchar_t * -UniStrcpy(wchar_t * ucs1, const wchar_t * ucs2) +UniStrcpy(wchar_t *ucs1, const wchar_t *ucs2) { wchar_t *anchor = ucs1; /* save the start of result string */ @@ -132,7 +132,7 @@ UniStrcpy(wchar_t * ucs1, const wchar_t * ucs2) * UniStrlen: Return the length of a string (in 16 bit Unicode chars not bytes) */ static inline size_t -UniStrlen(const wchar_t * ucs1) +UniStrlen(const wchar_t *ucs1) { int i = 0; @@ -142,10 +142,11 @@ UniStrlen(const wchar_t * ucs1) } /* - * UniStrnlen: Return the length (in 16 bit Unicode chars not bytes) of a string (length limited) + * UniStrnlen: Return the length (in 16 bit Unicode chars not bytes) of a + * string (length limited) */ static inline size_t -UniStrnlen(const wchar_t * ucs1, int maxlen) +UniStrnlen(const wchar_t *ucs1, int maxlen) { int i = 0; @@ -161,7 +162,7 @@ UniStrnlen(const wchar_t * ucs1, int maxlen) * UniStrncat: Concatenate length limited string */ static inline wchar_t * -UniStrncat(wchar_t * ucs1, const wchar_t * ucs2, size_t n) +UniStrncat(wchar_t *ucs1, const wchar_t *ucs2, size_t n) { wchar_t *anchor = ucs1; /* save pointer to string 1 */ @@ -179,7 +180,7 @@ UniStrncat(wchar_t * ucs1, const wchar_t * ucs2, size_t n) * UniStrncmp: Compare length limited string */ static inline int -UniStrncmp(const wchar_t * ucs1, const wchar_t * ucs2, size_t n) +UniStrncmp(const wchar_t *ucs1, const wchar_t *ucs2, size_t n) { if (!n) return 0; /* Null strings are equal */ @@ -194,7 +195,7 @@ UniStrncmp(const wchar_t * ucs1, const wchar_t * ucs2, size_t n) * UniStrncmp_le: Compare length limited string - native to little-endian */ static inline int -UniStrncmp_le(const wchar_t * ucs1, const wchar_t * ucs2, size_t n) +UniStrncmp_le(const wchar_t *ucs1, const wchar_t *ucs2, size_t n) { if (!n) return 0; /* Null strings are equal */ @@ -209,7 +210,7 @@ UniStrncmp_le(const wchar_t * ucs1, const wchar_t * ucs2, size_t n) * UniStrncpy: Copy length limited string with pad */ static inline wchar_t * -UniStrncpy(wchar_t * ucs1, const wchar_t * ucs2, size_t n) +UniStrncpy(wchar_t *ucs1, const wchar_t *ucs2, size_t n) { wchar_t *anchor = ucs1; @@ -226,7 +227,7 @@ UniStrncpy(wchar_t * ucs1, const wchar_t * ucs2, size_t n) * UniStrncpy_le: Copy length limited string with pad to little-endian */ static inline wchar_t * -UniStrncpy_le(wchar_t * ucs1, const wchar_t * ucs2, size_t n) +UniStrncpy_le(wchar_t *ucs1, const wchar_t *ucs2, size_t n) { wchar_t *anchor = ucs1; @@ -247,13 +248,14 @@ UniStrncpy_le(wchar_t * ucs1, const wchar_t * ucs2, size_t n) * NULL if no matching string is found */ static inline wchar_t * -UniStrstr(const wchar_t * ucs1, const wchar_t * ucs2) +UniStrstr(const wchar_t *ucs1, const wchar_t *ucs2) { const wchar_t *anchor1 = ucs1; const wchar_t *anchor2 = ucs2; while (*ucs1) { - if (*ucs1 == *ucs2) { /* Partial match found */ + if (*ucs1 == *ucs2) { + /* Partial match found */ ucs1++; ucs2++; } else { @@ -278,7 +280,8 @@ UniToupper(register wchar_t uc) { register const struct UniCaseRange *rp; - if (uc < sizeof (CifsUniUpperTable)) { /* Latin characters */ + if (uc < sizeof(CifsUniUpperTable)) { + /* Latin characters */ return uc + CifsUniUpperTable[uc]; /* Use base tables */ } else { rp = CifsUniUpperRange; /* Use range tables */ @@ -297,7 +300,7 @@ UniToupper(register wchar_t uc) * UniStrupr: Upper case a unicode string */ static inline wchar_t * -UniStrupr(register wchar_t * upin) +UniStrupr(register wchar_t *upin) { register wchar_t *up; @@ -319,7 +322,8 @@ UniTolower(wchar_t uc) { register struct UniCaseRange *rp; - if (uc < sizeof (UniLowerTable)) { /* Latin characters */ + if (uc < sizeof(UniLowerTable)) { + /* Latin characters */ return uc + UniLowerTable[uc]; /* Use base tables */ } else { rp = UniLowerRange; /* Use range tables */ @@ -338,7 +342,7 @@ UniTolower(wchar_t uc) * UniStrlwr: Lower case a unicode string */ static inline wchar_t * -UniStrlwr(register wchar_t * upin) +UniStrlwr(register wchar_t *upin) { register wchar_t *up;