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:
Jan (janneke) Nieuwenhuizen 2020-12-13 22:15:12 +01:00
parent a0560aff67
commit b601eb64af
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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;