**/\r
int strcmp(const char *s1, const char *s2)\r
{\r
- return (int)AsciiStriCmp( s1, s2);\r
+ return (int)AsciiStrCmp( s1, s2);\r
}\r
\r
/** The strcoll function compares the string pointed to by s1 to the string\r
return (int)AsciiStrnCmp( s1, s2, n);\r
}\r
\r
-/** The strxfrm function transforms the string pointed to by s2 and places the\r
- resulting string into the array pointed to by s1. The transformation is\r
+/** The strxfrm function transforms the string pointed to by Src and places the\r
+ resulting string into the array pointed to by Dest. The transformation is\r
such that if the strcmp function is applied to two transformed strings, it\r
returns a value greater than, equal to, or less than zero, corresponding to\r
the result of the strcoll function applied to the same two original\r
- strings. No more than n characters are placed into the resulting array\r
- pointed to by s1, including the terminating null character. If n is zero,\r
- s1 is permitted to be a null pointer. If copying takes place between\r
+ strings. No more than Len characters are placed into the resulting array\r
+ pointed to by Dest, including the terminating null character. If Len is zero,\r
+ Dest is permitted to be a null pointer. If copying takes place between\r
objects that overlap, the behavior is undefined.\r
\r
@return The strxfrm function returns the length of the transformed string\r
(not including the terminating null character). If the value\r
- returned is n or more, the contents of the array pointed to by s1\r
+ returned is Len or more, the contents of the array pointed to by Dest\r
are indeterminate.\r
**/\r
-size_t strxfrm(char * __restrict s1, const char * __restrict s2, size_t n)\r
+size_t strxfrm(char * __restrict Dest, const char * __restrict Src, size_t Len)\r
{\r
size_t srclen, copysize;\r
\r
/*\r
* Since locales are unimplemented, this is just a copy.\r
*/\r
- srclen = strlen(s2);\r
- if (n != 0) {\r
- copysize = srclen < n ? srclen : n - 1;\r
- (void)memcpy(s1, s2, copysize);\r
- s1[copysize] = 0;\r
+ srclen = strlen(Src);\r
+ if (Len != 0) {\r
+ copysize = srclen < Len ? srclen : Len - 1;\r
+ (void)memcpy(Dest, Src, copysize);\r
+ Dest[copysize] = 0;\r
}\r
return (srclen);\r
}\r
int\r
strcasecmp(const char *s1, const char *s2)\r
{\r
- const unsigned char *us1 = (const unsigned char *)s1,\r
- *us2 = (const unsigned char *)s2;\r
- int Difference;\r
-\r
- while ( 0 == ( Difference = tolower(*us1) - tolower(*us2))) {\r
- if (*us1 == 0) {\r
- return (0);\r
- }\r
- us1 += 1;\r
- us2 += 1;\r
- }\r
- return Difference;\r
+ return (int)AsciiStriCmp( s1, s2);\r
}\r
-\r