Changeset 63fc519 in mainline


Ignore:
Timestamp:
2011-06-18T23:24:21Z (13 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5ee9692
Parents:
6128390
Message:

Add strtold() implementation and use it for strtof() and strtod() as well.

Location:
uspace/lib/posix
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/Makefile

    r6128390 r63fc519  
    4343        stdio.c \
    4444        stdlib.c \
     45        stdlib/strtold.c \
    4546        string.c \
    4647        strings.c \
  • uspace/lib/posix/stdlib.c

    r6128390 r63fc519  
    7777
    7878/**
    79  *
     79 * Converts a string representation of a floating-point number to
     80 * its native representation. See posix_strtold().
     81 *
    8082 * @param nptr
    8183 * @param endptr
     
    8486float posix_strtof(const char *restrict nptr, char **restrict endptr)
    8587{
    86         // TODO
    87         not_implemented();
     88        return (float) posix_strtold(nptr, endptr);
    8889}
    8990
    9091/**
    91  *
     92 * Converts a string representation of a floating-point number to
     93 * its native representation. See posix_strtold().
     94 *
    9295 * @param nptr
    9396 * @param endptr
     
    9699double posix_strtod(const char *restrict nptr, char **restrict endptr)
    97100{
    98         // TODO
    99         not_implemented();
    100 }
    101 
    102 /**
    103  *
    104  * @param nptr
    105  * @param endptr
    106  * @return
    107  */
    108 long double posix_strtold(const char *restrict nptr, char **restrict endptr)
    109 {
    110         // TODO
    111         not_implemented();
     101        return (double) posix_strtold(nptr, endptr);
    112102}
    113103
Note: See TracChangeset for help on using the changeset viewer.