Changeset c8dc9ac in mainline for uspace/lib/c/generic/str.c
- Timestamp:
- 2016-10-11T08:20:59Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 48eb2fc2
- Parents:
- 6eda732 (diff), 523b17a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/str.c
r6eda732 rc8dc9ac 1157 1157 memmove(str, &str[pos], str_sz - pos); 1158 1158 pos = str_sz - pos; 1159 str[ str_sz -pos] = '\0';1159 str[pos] = '\0'; 1160 1160 } 1161 1161 } … … 1250 1250 } 1251 1251 1252 /** Convert string to a number. 1252 /** Convert string to a number. 1253 1253 * Core of strtol and strtoul functions. 1254 1254 * … … 1296 1296 str += 2; 1297 1297 } 1298 } 1298 } 1299 1299 } 1300 1300 … … 1335 1335 *endptr = (char *) str; 1336 1336 1337 if (nptr == str) { 1337 if (nptr == str) { 1338 1338 /*FIXME: errno = EINVAL*/ 1339 1339 return 0; … … 1366 1366 if ((sgn) && (number == (unsigned long) (LONG_MAX) + 1)) { 1367 1367 /* FIXME: set 0 to errno */ 1368 return number; 1368 return number; 1369 1369 } 1370 1370 /* FIXME: set ERANGE to errno */ 1371 return (sgn ? LONG_MIN : LONG_MAX); 1371 return (sgn ? LONG_MIN : LONG_MAX); 1372 1372 } 1373 1373
Note:
See TracChangeset
for help on using the changeset viewer.