VirtualBox

Ignore:
Timestamp:
Jul 20, 2022 7:40:31 PM (3 years ago)
Author:
vboxsync
Message:

nocrt/string.h,strpbrk.cpp: Added missing strpbrk proto and synced up the implementation with it in NOCRT mode. Added a few other prototypes to make our code and windows SDK headers happy, will implement functions as needed. bugref:10261

File:
1 edited

Legend:

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

    r93115 r95767  
    3737 * @returns
    3838 */
    39 #ifdef _MSC_VER
     39#ifdef IPRT_NO_CRT
     40char *strpbrk(const char *pszStr, const char *pszBreakChars)
     41#elif defined(_MSC_VER)
    4042# if _MSC_VER >= 1400
    41 _CRTIMP __checkReturn _CONST_RETURN char *  __cdecl strpbrk(__in_z const char *pszStr, __in_z const char *pszChars)
     43_CRTIMP __checkReturn _CONST_RETURN char *  __cdecl strpbrk(__in_z const char *pszStr, __in_z const char *pszBreakChars)
    4244# else
    43 _CRTIMP char * __cdecl strpbrk(const char *pszStr, const char *pszChars)
     45_CRTIMP char * __cdecl strpbrk(const char *pszStr, const char *pszBreakChars)
    4446# endif
    4547#elif defined(__WATCOMC__)
    46 _WCRTLINK char *std::strpbrk(const char *pszStr, const char *pszChars)
     48_WCRTLINK char *std::strpbrk(const char *pszStr, const char *pszBreakChars)
    4749#else
    48 char *strpbrk(const char *pszStr, const char *pszChars)
     50char *strpbrk(const char *pszStr, const char *pszBreakChars)
    4951# if defined(__THROW) && !defined(RT_OS_WINDOWS) && !defined(RT_OS_OS2)
    5052    __THROW
     
    5557    while ((chCur = *pszStr++) != '\0')
    5658    {
    57         int ch;
    58         const char *psz = pszChars;
    59         while ((ch = *psz++) != '\0')
    60             if (ch == chCur)
     59        int chBreak;
     60        const char *psz = pszBreakChars;
     61        while ((chBreak = *psz++) != '\0')
     62            if (chBreak == chCur)
    6163                return (char *)(pszStr - 1);
    6264
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