Changeset 2c6a3e7e in rtems


Ignore:
Timestamp:
Dec 1, 2009, 10:16:10 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
10098f9
Parents:
57544fb
Message:

2009-12-01 Joel Sherrill <joel.sherrill@…>

  • libmisc/stringto/stringto.h, libmisc/stringto/stringto_template.h: Tidy up as part of adding new test.
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r57544fb r2c6a3e7e  
     12009-12-01      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * libmisc/stringto/stringto.h, libmisc/stringto/stringto_template.h:
     4        Tidy up as part of adding new test.
     5
    162009-12-01      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • cpukit/libmisc/stringto/stringto.h

    r57544fb r2c6a3e7e  
    7979
    8080/**
     81 *  @brief Convert String to Unsigned Int (with validation)
     82 *
     83 *  This method converts a string to an unsigned int with range validation.
     84 *
     85 *  @param[in] s is the string to convert
     86 *  @param[in] n points to the variable to place the converted output in
     87 *  @param[in] endptr is used to keep track of the position in the string
     88 *  @param[in] base is the expected base of the number
     89 *
     90 *  @return This method returns RTEMS_SUCCESSFUL on successful conversion
     91 *          and *n is filled in.  Otherwise, the status indicates the
     92 *          source of the error.
     93 */
     94rtems_status_code rtems_string_to_unsigned_int(
     95  const char    *s,
     96  unsigned int  *n,
     97  char         **endptr,
     98  int            base
     99);
     100
     101/**
    81102 *  @brief Convert String to Long (with validation)
    82103 *
  • cpukit/libmisc/stringto/stringto_template.h

    r57544fb r2c6a3e7e  
    105105    return RTEMS_NOT_DEFINED;
    106106
     107  /*
     108   * In theory, we should check this but newlib never returns anything
     109   * but range errors.  So this is unreachable code based upon the newlib
     110   * implementation of strXXX methods as of 1 December 2009. --joel
     111   */
     112  #if 0
    107113  /* there was a conversion error */
    108114  if ( (result == ZERO) && errno )
    109115    return RTEMS_INVALID_NUMBER;
     116  #endif
    110117
    111118  #ifdef STRING_TO_MAX
Note: See TracChangeset for help on using the changeset viewer.