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-01-05 10:22:57 +01:00
parent b8e8de3d12
commit 8d7de98307
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
4 changed files with 10 additions and 13 deletions

View File

@ -31,7 +31,7 @@
// m4
#include <stdlib/abort.c>
#include <stdlib/atol.c>
#include <stub/atof.c>
#include <stdlib/atof.c>
#include <string/bcmp.c>
#include <string/bcopy.c>
#include <string/bzero.c>

View File

@ -48,7 +48,7 @@
// m4
#include <stdlib/abort.c>
#include <stub/atof.c>
#include <stdlib/atof.c>
#include <string/bcmp.c>
#include <string/bcopy.c>
#include <string/bzero.c>

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -20,12 +20,9 @@
#include <libmes.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 <libmes.h>
int
atoi (char const *s)
atoi (char const *string)
{
char const *p = s;
char const *p = string;
return abtol (&p, 0);
}