VirtualBox

Changeset 25005 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Nov 26, 2009 2:42:59 PM (15 years ago)
Author:
vboxsync
Message:

IPRT: Optimized version of RTStrVersionCompare (thanks to Knut!), made it behave like strcmp().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/string.h

    r24894 r25005  
    10631063 * will be skipped, so "12.foo006" becomes "12.6".
    10641064 *
    1065  * @returns iprt status code.
    1066  *          Warnings are used to indicate convertion problems.
    1067  * @retval  VWRN_NUMBER_TOO_BIG
    1068  * @retval  VWRN_TRAILING_CHARS
    1069  * @retval  VWRN_TRAILING_SPACES
    1070  * @retval  VINF_SUCCESS
    1071  * @retval  VERR_NO_MEMORY
    1072  * @retval  VERR_NO_DIGITS
     1065 * @returns integer value indicating the relationship between the versions:
     1066 * @retval  0, if both versions are equal.
     1067 * @retval  1, if pszVer1 is greater.
     1068 * @retval  2, if pszVer2 is greater.
    10731069 *
    10741070 * @param   pszVer1     First version string to compare.
    1075  * @param   pszVer2     First version string to compare.
    1076  * @param   pui8Res     Pointer uint8_t value where to store the comparison result:
    1077  *                      0 if equal, 1 if pszVer1 is greater, 2 if pszVer2 is greater.
    1078  */
    1079 RTDECL(int) RTStrVersionCompare(const char *pszVer1, const char *pszVer2, uint8_t *pui8Res);
     1071 * @param   pszVer2     Second version string to compare first version with.
     1072 */
     1073RTDECL(int) RTStrVersionCompare(const char *pszVer1, const char *pszVer2);
    10801074
    10811075/**
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