VirtualBox

Ignore:
Timestamp:
May 11, 2023 9:37:59 PM (21 months ago)
Author:
vboxsync
Message:

IPRT: Make doxygen 1.9.6 happy. Mostly removing duplicate docs (iprt is documented in the header files). bugref:10442

File:
1 edited

Legend:

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

    r98103 r99758  
    275275
    276276
    277 /**
    278  * Checks if a year is a leap year or not.
    279  *
    280  * @returns true if it's a leap year.
    281  * @returns false if it's a common year.
    282  * @param   i32Year     The year in question.
    283  */
    284277RTDECL(bool) RTTimeIsLeapYear(int32_t i32Year)
    285278{
     
    289282
    290283
    291 /**
    292  * Explodes a time spec (UTC).
    293  *
    294  * @returns pTime.
    295  * @param   pTime       Where to store the exploded time.
    296  * @param   pTimeSpec   The time spec to exploded.
    297  */
    298284RTDECL(PRTTIME) RTTimeExplode(PRTTIME pTime, PCRTTIMESPEC pTimeSpec)
    299285{
     
    401387
    402388
    403 /**
    404  * Implodes exploded time to a time spec (UTC).
    405  *
    406  * @returns pTime on success.
    407  * @returns NULL if the pTime data is invalid.
    408  * @param   pTimeSpec   Where to store the imploded UTC time.
    409  *                      If pTime specifies a time which outside the range, maximum or
    410  *                      minimum values will be returned.
    411  * @param   pTime       Pointer to the exploded time to implode.
    412  *                      The fields u8Month, u8WeekDay and u8MonthDay are not used,
    413  *                      and all the other fields are expected to be within their
    414  *                      bounds. Use RTTimeNormalize() or RTTimeLocalNormalize() to
    415  *                      calculate u16YearDay and normalize the ranges of the fields.
    416  */
    417389RTDECL(PRTTIMESPEC) RTTimeImplode(PRTTIMESPEC pTimeSpec, PCRTTIME pTime)
    418390{
     
    679651
    680652
    681 /**
    682  * Normalizes the fields of a time structure.
    683  *
    684  * It is possible to calculate year-day from month/day and vice
    685  * versa. If you adjust any of these, make sure to zero the
    686  * other so you make it clear which of the fields to use. If
    687  * it's ambiguous, the year-day field is used (and you get
    688  * assertions in debug builds).
    689  *
    690  * All the time fields and the year-day or month/day fields will
    691  * be adjusted for overflows. (Since all fields are unsigned, there
    692  * is no underflows.) It is possible to exploit this for simple
    693  * date math, though the recommended way of doing that to implode
    694  * the time into a timespec and do the math on that.
    695  *
    696  * @returns pTime on success.
    697  * @returns NULL if the data is invalid.
    698  *
    699  * @param   pTime       The time structure to normalize.
    700  *
    701  * @remarks This function doesn't work with local time, only with UTC time.
    702  */
    703653RTDECL(PRTTIME) RTTimeNormalize(PRTTIME pTime)
    704654{
     
    719669
    720670
    721 /**
    722  * Normalizes the fields of a time structure, assuming local time.
    723  *
    724  * It is possible to calculate year-day from month/day and vice
    725  * versa. If you adjust any of these, make sure to zero the
    726  * other so you make it clear which of the fields to use. If
    727  * it's ambiguous, the year-day field is used (and you get
    728  * assertions in debug builds).
    729  *
    730  * All the time fields and the year-day or month/day fields will
    731  * be adjusted for overflows. (Since all fields are unsigned, there
    732  * is no underflows.) It is possible to exploit this for simple
    733  * date math, though the recommended way of doing that to implode
    734  * the time into a timespec and do the math on that.
    735  *
    736  * @returns pTime on success.
    737  * @returns NULL if the data is invalid.
    738  *
    739  * @param   pTime       The time structure to normalize.
    740  *
    741  * @remarks This function doesn't work with UTC time, only with local time.
    742  */
    743671RTDECL(PRTTIME) RTTimeLocalNormalize(PRTTIME pTime)
    744672{
     
    758686
    759687
    760 /**
    761  * Converts a time spec to a ISO date string.
    762  *
    763  * @returns psz on success.
    764  * @returns NULL on buffer underflow.
    765  * @param   pTime       The time. Caller should've normalized this.
    766  * @param   psz         Where to store the string.
    767  * @param   cb          The size of the buffer.
    768  */
    769688RTDECL(char *) RTTimeToString(PCRTTIME pTime, char *psz, size_t cb)
    770689{
     
    810729
    811730
    812 /**
    813  * Converts a time spec to a ISO date string, extended version.
    814  *
    815  * @returns Output string length on success (positive), VERR_BUFFER_OVERFLOW
    816  *          (negative) or VERR_OUT_OF_RANGE (negative) on failure.
    817  * @param   pTime           The time. Caller should've normalized this.
    818  * @param   psz             Where to store the string.
    819  * @param   cb              The size of the buffer.
    820  * @param   cFractionDigits Number of digits in the fraction.  Max is 9.
    821  */
    822731RTDECL(ssize_t) RTTimeToStringEx(PCRTTIME pTime, char *psz, size_t cb, unsigned cFractionDigits)
    823732{
     
    878787
    879788
    880 /**
    881  * Converts a time spec to a ISO date string.
    882  *
    883  * @returns psz on success.
    884  * @returns NULL on buffer underflow.
    885  * @param   pTime       The time spec.
    886  * @param   psz         Where to store the string.
    887  * @param   cb          The size of the buffer.
    888  */
    889789RTDECL(char *) RTTimeSpecToString(PCRTTIMESPEC pTime, char *psz, size_t cb)
    890790{
     
    896796
    897797
    898 /**
    899  * Attempts to convert an ISO date string to a time structure.
    900  *
    901  * We're a little forgiving with zero padding, unspecified parts, and leading
    902  * and trailing spaces.
    903  *
    904  * @retval  pTime on success,
    905  * @retval  NULL on failure.
    906  * @param   pTime       Where to store the time on success.
    907  * @param   pszString   The ISO date string to convert.
    908  */
    909798RTDECL(PRTTIME) RTTimeFromString(PRTTIME pTime, const char *pszString)
    910799{
     
    1072961
    1073962
    1074 /**
    1075  * Attempts to convert an ISO date string to a time structure.
    1076  *
    1077  * We're a little forgiving with zero padding, unspecified parts, and leading
    1078  * and trailing spaces.
    1079  *
    1080  * @retval  pTime on success,
    1081  * @retval  NULL on failure.
    1082  * @param   pTime       The time spec.
    1083  * @param   pszString   The ISO date string to convert.
    1084  */
    1085963RTDECL(PRTTIMESPEC) RTTimeSpecFromString(PRTTIMESPEC pTime, const char *pszString)
    1086964{
     
    1093971
    1094972
    1095 /**
    1096  * Formats the given time on a RTC-2822 compliant format.
    1097  *
    1098  * @returns Output string length on success (positive), VERR_BUFFER_OVERFLOW
    1099  *          (negative) on failure.
    1100  * @param   pTime       The time. Caller should've normalized this.
    1101  * @param   psz         Where to store the string.
    1102  * @param   cb          The size of the buffer.
    1103  */
    1104973RTDECL(ssize_t) RTTimeToRfc2822(PRTTIME pTime, char *psz, size_t cb, uint32_t fFlags)
    1105974{
     
    11611030
    11621031
    1163 /**
    1164  * Attempts to convert an RFC-2822 date string to a time structure.
    1165  *
    1166  * We're a little forgiving with zero padding, unspecified parts, and leading
    1167  * and trailing spaces.
    1168  *
    1169  * @retval  pTime on success,
    1170  * @retval  NULL on failure.
    1171  * @param   pTime       Where to store the time on success.
    1172  * @param   pszString   The ISO date string to convert.
    1173  */
    11741032RTDECL(PRTTIME) RTTimeFromRfc2822(PRTTIME pTime, const char *pszString)
    11751033{
     
    15521410
    15531411
    1554 /**
    1555  * Converts a time structure to UTC, relying on UTC offset information if it contains local time.
    1556  *
    1557  * @returns pTime on success.
    1558  * @returns NULL if the data is invalid.
    1559  * @param   pTime       The time structure to convert.
    1560  */
    15611412RTDECL(PRTTIME) RTTimeConvertToZulu(PRTTIME pTime)
    15621413{
     
    15721423
    15731424
    1574 /**
    1575  * Compares two normalized time structures.
    1576  *
    1577  * @retval  0 if equal.
    1578  * @retval  -1 if @a pLeft is earlier than @a pRight.
    1579  * @retval  1 if @a pRight is earlier than @a pLeft.
    1580  *
    1581  * @param   pLeft       The left side time.  NULL is accepted.
    1582  * @param   pRight      The right side time.  NULL is accepted.
    1583  *
    1584  * @note    A NULL time is considered smaller than anything else.  If both are
    1585  *          NULL, they are considered equal.
    1586  */
    15871425RTDECL(int) RTTimeCompare(PCRTTIME pLeft, PCRTTIME pRight)
    15881426{
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