mescc: Mes C Library: ntoab: Use unsigned base.
This fixes 60-math, 60-math-itoa, 70-printf-simple, 70-printf. * lib/mes/ntoab.c (ntoab): Use unsigned base. * include/mes/lib.h: Update prototype.
This commit is contained in:
parent
a0560aff67
commit
b601eb64af
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -34,7 +34,7 @@ char *dtoab (double number, int base, int signed_p);
|
|||
char *itoa (int number);
|
||||
char *ltoa (long number);
|
||||
char *ltoab (long x, int base);
|
||||
char *ntoab (long number, int base, int signed_p);
|
||||
char *ntoab (long number, unsigned base, int signed_p);
|
||||
char *ultoa (unsigned long number);
|
||||
char *utoa (unsigned number);
|
||||
int eputc (int c);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -26,7 +26,7 @@
|
|||
#define XSTR(s) STR(s)
|
||||
|
||||
char *
|
||||
ntoab (long x, int base, int signed_p)
|
||||
ntoab (long x, unsigned base, int signed_p)
|
||||
{
|
||||
static char itoa_buf[20];
|
||||
char *p = itoa_buf + 11;
|
||||
|
|
Loading…
Reference in a new issue