VirtualBox

Ignore:
Timestamp:
Aug 5, 2022 12:26:04 AM (3 years ago)
Author:
vboxsync
Message:

IPRT/nocrt: Added strdup, stricmp, strtok, strcat, strncat, strnlen and strtok_r implementations. bugref:10261

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/strcat.cpp

    r96044 r96045  
    11/* $Id$ */
    22/** @file
    3  * IPRT - CRT Strings, strcpy().
     3 * IPRT - CRT Strings, strcat().
    44 */
    55
     
    3434
    3535/**
    36  * Copy a string
     36 * Append one string to another.
    3737 *
    3838 * @returns Pointer to destination string
    39  * @param   pszDst      Will contain a copy of pszSrc.
     39 * @param   pszDst      String to append @a pszSrc to.
    4040 * @param   pszSrc      Zero terminated string.
    4141 */
    42 #ifdef IPRT_NO_CRT
    43 # undef strcpy
    44 char *RT_NOCRT(strcpy)(char *pszDst, const char *pszSrc)
    45 #else
    46 char *strcpy(char *pszDst, const char *pszSrc)
    47 #endif
     42#undef strcat
     43char *RT_NOCRT(strcat)(char *pszDst, const char *pszSrc)
    4844{
    4945    char * const pszRet = pszDst;
     46    pszDst = RTStrEnd(pszDst, RTSTR_MAX);
    5047    while ((*pszDst = *pszSrc++) != '\0')
    5148        pszDst++;
     
    5350    return pszRet;
    5451}
    55 RT_ALIAS_AND_EXPORT_NOCRT_SYMBOL(strcpy);
     52RT_ALIAS_AND_EXPORT_NOCRT_SYMBOL(strcat);
    5653
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette