{
if (value)
{
- CsrStrCpy(((char *) &buffer[*offset]), value);
+ strcpy(((char *) &buffer[*offset]), value);
*offset += CsrStrLen(value) + 1;
}
else
*******************************************************************************/
u8 *CsrUtf8StrTruncate(u8 *target, size_t count);
-/*******************************************************************************
-
- NAME
- CsrUtf8StrCpy
-
- DESCRIPTION
- Copies the null terminated UTF-8 string pointed at by source into the
- memory pointed at by target, including the terminating null character.
-
- To avoid overflows, the size of the memory pointed at by target shall be
- long enough to contain the same UTF-8 string as source (including the
- terminating null character), and should not overlap in memory with
- source.
-
- PARAMETERS
- target - Pointer to the target memory where the content is to be copied.
- source - UTF-8 string to be copied.
-
- RETURNS
- Returns target
-
-*******************************************************************************/
-u8 *CsrUtf8StrCpy(u8 *target, const u8 *source);
-
/*******************************************************************************
NAME
return (u32) length;
}
-u8 *CsrUtf8StrCpy(u8 *target, const u8 *source)
-{
- return (u8 *) CsrStrCpy((char *) target, (const char *) source);
-}
-
u8 *CsrUtf8StrTruncate(u8 *target, size_t count)
{
size_t lastByte = count - 1;
#endif
#ifndef CSR_USE_STDC_LIB
-char *CsrStrCpy(char *dest, const char *src)
-{
- return strcpy(dest, src);
-}
-
char *CsrStrNCpy(char *dest, const char *src, size_t count)
{
return strncpy(dest, src, count);
/*------------------------------------------------------------------*/
#ifdef CSR_USE_STDC_LIB
#define CsrMemCpy memcpy
-#define CsrStrCpy strcpy
#define CsrStrNCpy strncpy
#define CsrStrCmp(s1, s2) ((s32) strcmp((s1), (s2)))
#define CsrStrNCmp(s1, s2, n) ((s32) strncmp((s1), (s2), (n)))
#define CsrStrLen strlen
#else /* !CSR_USE_STDC_LIB */
void *CsrMemCpy(void *dest, const void *src, size_t count);
-char *CsrStrCpy(char *dest, const char *src);
char *CsrStrNCpy(char *dest, const char *src, size_t count);
s32 CsrStrCmp(const char *string1, const char *string2);
s32 CsrStrNCmp(const char *string1, const char *string2, size_t count);