VirtualBox

Changeset 102174 in vbox for trunk/src/libs


Ignore:
Timestamp:
Nov 21, 2023 8:19:57 AM (15 months ago)
Author:
vboxsync
Message:

libs/xpcom: Remove more unused code, bugref:10545

Location:
trunk/src/libs/xpcom18a4
Files:
4 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/Makefile.kmk

    r102051 r102174  
    486486        nsprpub/lib/libc/src/strdup.c \
    487487        nsprpub/lib/libc/src/strcmp.c \
    488         nsprpub/lib/libc/src/strccmp.c \
    489         nsprpub/lib/libc/src/strchr.c \
    490         nsprpub/lib/libc/src/strpbrk.c \
    491         nsprpub/lib/libc/src/strstr.c \
    492         nsprpub/lib/libc/src/strcstr.c
     488        nsprpub/lib/libc/src/strccmp.c
    493489
    494490ifeq ($(filter-out darwin freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # unixish
  • trunk/src/libs/xpcom18a4/nsprpub/lib/libc/include/plstr.h

    r101764 r102174  
    7272#define PL_strncpy VBoxNsplPL_strncpy
    7373#define PL_strncpyz VBoxNsplPL_strncpyz
    74 #define PL_strrchr VBoxNsplPL_strrchr
    7574#define PL_strcaserstr VBoxNsplPL_strcaserstr
    7675#define PL_strcasestr VBoxNsplPL_strcasestr
    7776#define PL_strndup VBoxNsplPL_strndup
    7877#define PL_strnlen VBoxNsplPL_strnlen
    79 #define PL_strnstr VBoxNsplPL_strnstr
    80 #define PL_strpbrk VBoxNsplPL_strpbrk
    81 #define PL_strrstr VBoxNsplPL_strrstr
    8278#endif /* VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
    8379
     
    227223PL_strncasecmp(const char *a, const char *b, PRUint32 max);
    228224
    229 /*
    230  * PL_strrchr
    231  *
    232  * Returns a pointer to the last instance of the specified character in the
    233  * provided string.  It returns null if the character is not found, or if the
    234  * provided string is null.  The character may be the null character.
    235  */
    236 
    237 PR_EXTERN(char *)
    238 PL_strrchr(const char *s, char c);
    239 
    240 /*
    241  * NOTE: Looking for strcasechr, strcaserchr, strncasechr, or strncaserchr?
    242  * Use strpbrk, strprbrk, strnpbrk or strnprbrk.
    243  */
    244 
    245 /*
    246  * PL_strpbrk
    247  *
    248  * Returns a pointer to the first instance in the first string of any character
    249  * (not including the terminating null character) of the second string.  It returns
    250  * null if either string is null.
    251  */
    252 
    253 PR_EXTERN(char *)
    254 PL_strpbrk(const char *s, const char *list);
    255 
    256 /*
    257  * PL_strrstr
    258  *
    259  * Returns a pointer to the last instance of the little string within the big one.
    260  * It returns null if either string is null.
    261  */
    262 
    263 PR_EXTERN(char *)
    264 PL_strrstr(const char *big, const char *little);
    265 
    266 /*
    267  * PL_strnstr
    268  *
    269  * Returns a pointer to the first instance of the little string within the first
    270  * n characters of the big one.  It returns null if either string is null.  It
    271  * returns null if the length of the little string is greater than n.
    272  */
    273 
    274 PR_EXTERN(char *)
    275 PL_strnstr(const char *big, const char *little, PRUint32 n);
    276 
    277 /*
    278  * PL_strcasestr
    279  *
    280  * Returns a pointer to the first instance of the little string within the big one,
    281  * ignoring case.  It returns null if either string is null.
    282  */
    283 
    284 PR_EXTERN(char *)
    285 PL_strcasestr(const char *big, const char *little);
    286 
    287 /*
    288  * Things not (yet?) included: strspn/strcspn, strsep.
    289  * memchr, memcmp, memcpy, memccpy, index, rindex, bcmp, bcopy, bzero.
    290  * Any and all i18n/l10n stuff.
    291  */
    292 
    293225PR_END_EXTERN_C
    294226
  • trunk/src/libs/xpcom18a4/vboxdeps.cpp

    r101928 r102174  
    1616{
    1717    (uintptr_t)PL_strncpy,
    18     (uintptr_t)PL_strrchr,
    1918    (uintptr_t)PL_strncpyz,
    2019    (uintptr_t)PL_HashString,
  • trunk/src/libs/xpcom18a4/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp

    r101962 r102174  
    18391839}
    18401840
     1841#ifdef VBOX
     1842/*
     1843 * From nsprpub, only caller below.
     1844 *
     1845 * @todo r=aeichner Implement an IPRT equivalent and replace.
     1846 */
     1847static char *PL_strnstr(const char *big, const char *little, PRUint32 max)
     1848{
     1849    size_t ll;
     1850
     1851    if( ((const char *)0 == big) || ((const char *)0 == little) ) return (char *)0;
     1852    if( ((char)0 == *big) || ((char)0 == *little) ) return (char *)0;
     1853
     1854    ll = strlen(little);
     1855    if( ll > (size_t)max ) return (char *)0;
     1856    max -= (PRUint32)ll;
     1857    max++;
     1858
     1859    for( ; max && *big; big++, max-- )
     1860        if( *little == *big )
     1861            if( 0 == strncmp(big, little, ll) )
     1862                return (char *)big;
     1863
     1864    return (char *)0;
     1865}
     1866#endif
     1867
    18411868struct ArrayAndPrefix
    18421869{
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