Changeset 48751ab in rtems for cpukit/libmisc/stringto/stringto.h
- Timestamp:
- Jul 23, 2009, 2:32:34 PM (12 years ago)
- Branches:
- 4.10, 4.11, 5, master
- Children:
- 7611ed8e
- Parents:
- 73dfaf8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libmisc/stringto/stringto.h
r73dfaf8 r48751ab 13 13 #define __STRING_TO_A_TYPE_h__ 14 14 15 #include <rtems.h> 16 17 /** 18 * @brief Convert String to Pointer (with validation) 19 * 20 * This method converts a string to a pointer (void *) with 21 * basic numeric validation. 22 * 23 * @param[in] s is the string to convert 24 * @param[in] n points to the variable to place the converted output in 25 * @param[in] endptr is used to keep track of the position in the string 26 * 27 * @return This method returns RTEMS_SUCCESSFUL on successful conversion 28 * and *n is filled in. Otherwise, the status indicates the 29 * source of the error. 30 */ 31 rtems_status_code rtems_string_to_pointer( 32 const char *s, 33 void **n, 34 char **endptr 35 ); 36 15 37 /** 16 38 * @brief Convert String to Unsigned Character (with validation) … … 24 46 * @param[in] base is the expected base of the number 25 47 * 26 * @return This method returns true on successful conversion and *n is 27 * filled in. 28 */ 29 bool rtems_string_to_unsigned_char( 48 * @return This method returns RTEMS_SUCCESSFUL on successful conversion 49 * and *n is filled in. Otherwise, the status indicates the 50 * source of the error. 51 */ 52 rtems_status_code rtems_string_to_unsigned_char( 30 53 const char *s, 31 54 unsigned char *n, … … 44 67 * @param[in] base is the expected base of the number 45 68 * 46 * @return This method returns true on successful conversion and *n is 47 * filled in. 48 */ 49 bool rtems_string_to_int( 69 * @return This method returns RTEMS_SUCCESSFUL on successful conversion 70 * and *n is filled in. Otherwise, the status indicates the 71 * source of the error. 72 */ 73 rtems_status_code rtems_string_to_int( 50 74 const char *s, 51 75 int *n, … … 65 89 * @param[in] base is the expected base of the number 66 90 * 67 * @return This method returns true on successful conversion and *n is 68 * filled in. 69 */ 70 bool rtems_string_to_long( 91 * @return This method returns RTEMS_SUCCESSFUL on successful conversion 92 * and *n is filled in. Otherwise, the status indicates the 93 * source of the error. 94 */ 95 rtems_status_code rtems_string_to_long( 71 96 const char *s, 72 97 long *n, … … 86 111 * @param[in] base is the expected base of the number 87 112 * 88 * @return This method returns true on successful conversion and *n is 89 * filled in. 90 */ 91 bool rtems_string_to_unsigned_long( 113 * @return This method returns RTEMS_SUCCESSFUL on successful conversion 114 * and *n is filled in. Otherwise, the status indicates the 115 * source of the error. 116 */ 117 rtems_status_code rtems_string_to_unsigned_long( 92 118 const char *s, 93 119 unsigned long *n, … … 107 133 * @param[in] base is the expected base of the number 108 134 * 109 * @return This method returns true on successful conversion and *n is 110 * filled in. 111 */ 112 bool rtems_string_to_long_long( 135 * @return This method returns RTEMS_SUCCESSFUL on successful conversion 136 * and *n is filled in. Otherwise, the status indicates the 137 * source of the error. 138 */ 139 rtems_status_code rtems_string_to_long_long( 113 140 const char *s, 114 141 long long *n, … … 128 155 * @param[in] base is the expected base of the number 129 156 * 130 * @return This method returns true on successful conversion and *n is 131 * filled in. 132 */ 133 bool rtems_string_to_unsigned_long_long( 157 * @return This method returns RTEMS_SUCCESSFUL on successful conversion 158 * and *n is filled in. Otherwise, the status indicates the 159 * source of the error. 160 */ 161 rtems_status_code rtems_string_to_unsigned_long_long( 134 162 const char *s, 135 163 unsigned long long *n, … … 147 175 * @param[in] endptr is used to keep track of the position in the string 148 176 * 149 * @return This method returns true on successful conversion and *n is 150 * filled in. 151 */ 152 bool rtems_string_to_float( 177 * @return This method returns RTEMS_SUCCESSFUL on successful conversion 178 * and *n is filled in. Otherwise, the status indicates the 179 * source of the error. 180 */ 181 rtems_status_code rtems_string_to_float( 153 182 const char *s, 154 183 float *n, … … 165 194 * @param[in] endptr is used to keep track of the position in the string 166 195 * 167 * @return This method returns true on successful conversion and *n is 168 * filled in. 169 */ 170 bool rtems_string_to_double( 196 * @return This method returns RTEMS_SUCCESSFUL on successful conversion 197 * and *n is filled in. Otherwise, the status indicates the 198 * source of the error. 199 */ 200 rtems_status_code rtems_string_to_double( 171 201 const char *s, 172 202 double *n,
Note: See TracChangeset
for help on using the changeset viewer.