Commit Graph

5 Commits

Author SHA1 Message Date
Lephenixnoir 3a9a60db78
stdlib: formatting on the strto* functions
* Name the private function __strto_{int,fp} (with leading double
  underscores) to avoid name conflicts
* Fix comments of the wrong style
* Fix missing leading double underscores in stdlib_p.h
2021-05-24 10:07:48 +02:00
Lephenixnoir f5cca84ae8
stdlib: add and test strtod, strtof and atof (DONE)
This uses a generic function strto_fp similar to strto_int that is used
for strtol and its derivatives.
2021-05-21 23:56:35 +02:00
Lephenixnoir bc53e756a8
stdlib: fix saturation in strtol, strtoul, strtoll, strtoull 2021-05-20 15:38:37 +02:00
Lephenixnoir 06f975f75c
stdlib: add a test strtol, strtoul, strtoll (DONE)
The presumed bug where the value computed without the sign overflows
even though the negative result can be represented is not actually a
problem, because this only happens with signed results and the temporary
value is computed as unsigned (thus with extra range).
2021-05-20 11:03:19 +02:00
Lephenixnoir 5042236392
stdlib: reword strtoull into a generic strto_int
This new function will support strtol, strtoul, and strtoll as well.
2021-05-20 09:23:06 +02:00