mescc: Mes C Library: Support GNU Awk: Implement atof.

* lib/stdlib/atoi.c: Update.
* lib/stdlib/atof.c: Rename from stub/atof.c; Implement.
* lib/libc+gnu.c: Update include.
* lib/libg.c: Update include.
This commit is contained in:
Jan Nieuwenhuizen 2019-07-03 11:22:57 +02:00
parent f3154aabe4
commit 8d45c6484f
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
3 changed files with 8 additions and 10 deletions

View file

@ -249,6 +249,7 @@ lib/stdlib/abort.c
lib/stdlib/abs.c
lib/stdlib/alloca.c
lib/stdlib/atexit.c
lib/stdlib/atof.c
lib/stdlib/atol.c
lib/stdlib/mbstowcs.c
lib/string/bcmp.c

View file

@ -20,12 +20,9 @@
#include <mes/lib.h>
int
atof (int x)
double
atof (char const *string)
{
static int stub = 0;
if (__mes_debug () && !stub)
eputs ("atof stub\n");
stub = 1;
return 0;
char const *p = string;
return abtod (&p, 0);
}

View file

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -21,8 +21,8 @@
#include <mes/lib.h>
int
atoi (char const *s)
atoi (char const *string)
{
char const *p = s;
char const *p = string;
return abtol (&p, 0);
}