Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gdtoa Sprinkle some more const in.
details: https://anonhg.NetBSD.org/src/rev/053553073b86
branches: trunk
changeset: 964417:053553073b86
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Aug 01 02:27:43 2019 +0000
description:
Sprinkle some more const in.
diffstat:
lib/libc/gdtoa/g_Qfmt.c | 4 ++--
lib/libc/gdtoa/g_dfmt.c | 4 ++--
lib/libc/gdtoa/g_ffmt.c | 4 ++--
lib/libc/gdtoa/g_xLfmt.c | 4 ++--
lib/libc/gdtoa/g_xfmt.c | 4 ++--
lib/libc/gdtoa/gdtoa.c | 6 +++---
lib/libc/gdtoa/gdtoa.h | 4 ++--
lib/libc/gdtoa/gdtoaimp.h | 4 ++--
lib/libc/gdtoa/ldtoa.c | 6 +++---
lib/libc/gdtoa/strtoIQ.c | 4 ++--
lib/libc/gdtoa/strtoId.c | 4 ++--
lib/libc/gdtoa/strtoIdd.c | 6 +++---
lib/libc/gdtoa/strtoIf.c | 4 ++--
lib/libc/gdtoa/strtoIg.c | 6 +++---
lib/libc/gdtoa/strtoIx.c | 4 ++--
lib/libc/gdtoa/strtoIxL.c | 4 ++--
lib/libc/gdtoa/strtod.c | 6 +++---
lib/libc/gdtoa/strtodI.c | 4 ++--
lib/libc/gdtoa/strtopd.c | 4 ++--
lib/libc/gdtoa/strtopdd.c | 6 +++---
lib/libc/gdtoa/strtopf.c | 4 ++--
lib/libc/gdtoa/strtorQ.c | 7 ++++---
22 files changed, 52 insertions(+), 51 deletions(-)
diffs (truncated from 430 to 300 lines):
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/g_Qfmt.c
--- a/lib/libc/gdtoa/g_Qfmt.c Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/g_Qfmt.c Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: g_Qfmt.c,v 1.4 2011/03/20 23:15:35 christos Exp $ */
+/* $NetBSD: g_Qfmt.c,v 1.5 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -58,7 +58,7 @@
g_Qfmt(char *buf, void *V, int ndig, size_t bufsize)
#endif
{
- static FPI fpi0 = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, 0 };
+ static CONST FPI fpi0 = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, 0 };
char *b, *s, *se;
ULong bits[4], *L, sign;
int decpt, ex, i, mode;
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/g_dfmt.c
--- a/lib/libc/gdtoa/g_dfmt.c Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/g_dfmt.c Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: g_dfmt.c,v 1.3 2011/03/20 23:15:35 christos Exp $ */
+/* $NetBSD: g_dfmt.c,v 1.4 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -40,7 +40,7 @@
g_dfmt(char *buf, double *d, int ndig, size_t bufsize)
#endif
{
- static FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, 0 };
+ static CONST FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, 0 };
char *b, *s, *se;
ULong bits[2], *L, sign;
int decpt, ex, i, mode;
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/g_ffmt.c
--- a/lib/libc/gdtoa/g_ffmt.c Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/g_ffmt.c Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: g_ffmt.c,v 1.3 2011/03/20 23:15:35 christos Exp $ */
+/* $NetBSD: g_ffmt.c,v 1.4 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -40,7 +40,7 @@
g_ffmt(char *buf, float *f, int ndig, size_t bufsize)
#endif
{
- static FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, 0 };
+ static CONST FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, 0 };
char *b, *s, *se;
ULong bits[1], *L, sign;
int decpt, ex, i, mode;
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/g_xLfmt.c
--- a/lib/libc/gdtoa/g_xLfmt.c Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/g_xLfmt.c Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: g_xLfmt.c,v 1.4 2011/03/20 23:15:35 christos Exp $ */
+/* $NetBSD: g_xLfmt.c,v 1.5 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -56,7 +56,7 @@
g_xLfmt(char *buf, void *V, int ndig, size_t bufsize)
#endif
{
- static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 };
+ static CONST FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 };
char *b, *s, *se;
ULong bits[2], *L, sign;
int decpt, ex, i, mode;
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/g_xfmt.c
--- a/lib/libc/gdtoa/g_xfmt.c Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/g_xfmt.c Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: g_xfmt.c,v 1.4 2011/03/20 23:15:35 christos Exp $ */
+/* $NetBSD: g_xfmt.c,v 1.5 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -60,7 +60,7 @@
g_xfmt(char *buf, void *V, int ndig, size_t bufsize)
#endif
{
- static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 };
+ static CONST FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 };
char *b, *s, *se;
ULong bits[2], sign;
UShort *L;
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/gdtoa.c
--- a/lib/libc/gdtoa/gdtoa.c Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/gdtoa.c Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gdtoa.c,v 1.6 2012/03/13 21:13:33 christos Exp $ */
+/* $NetBSD: gdtoa.c,v 1.7 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -118,10 +118,10 @@
gdtoa
#ifdef KR_headers
(fpi, be, bits, kindp, mode, ndigits, decpt, rve)
- FPI *fpi; int be; ULong *bits;
+ CONST FPI *fpi; int be; ULong *bits;
int *kindp, mode, ndigits, *decpt; char **rve;
#else
- (FPI *fpi, int be, ULong *bits, int *kindp, int mode, int ndigits, int *decpt, char **rve)
+ (CONST FPI *fpi, int be, ULong *bits, int *kindp, int mode, int ndigits, int *decpt, char **rve)
#endif
{
/* Arguments ndigits and decpt are similar to the second and third
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/gdtoa.h
--- a/lib/libc/gdtoa/gdtoa.h Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/gdtoa.h Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gdtoa.h,v 1.10 2013/04/18 21:54:10 joerg Exp $ */
+/* $NetBSD: gdtoa.h,v 1.11 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -133,7 +133,7 @@
extern char* hldtoa ANSI((long double e, const char *xdigs, int ndigits,
int *decpt, int *sign, char **rve));
-extern char* gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp,
+extern char* gdtoa ANSI((CONST FPI *fpi, int be, ULong *bits, int *kindp,
int mode, int ndigits, int *decpt, char **rve));
extern void freedtoa ANSI((char*));
extern float strtof ANSI((CONST char *, char **));
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/gdtoaimp.h
--- a/lib/libc/gdtoa/gdtoaimp.h Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/gdtoaimp.h Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gdtoaimp.h,v 1.15 2019/08/01 02:06:31 riastradh Exp $ */
+/* $NetBSD: gdtoaimp.h,v 1.16 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -624,7 +624,7 @@
extern Bigint *s2b ANSI((CONST char*, int, int, ULong, size_t));
extern Bigint *set_ones ANSI((Bigint*, int));
extern char *strcp ANSI((char*, const char*));
- extern int strtoIg ANSI((CONST char*, char**, FPI*, Long*, Bigint**, int*));
+ extern int strtoIg ANSI((CONST char*, char**, CONST FPI*, Long*, Bigint**, int*));
extern double strtod ANSI((const char *s00, char **se));
extern Bigint *sum ANSI((Bigint*, Bigint*));
extern int trailz ANSI((CONST Bigint*));
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/ldtoa.c
--- a/lib/libc/gdtoa/ldtoa.c Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/ldtoa.c Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ldtoa.c,v 1.5 2016/03/13 19:44:58 christos Exp $ */
+/* $NetBSD: ldtoa.c,v 1.6 2019/08/01 02:27:43 riastradh Exp $ */
/*-
* Copyright (c) 2003 David Schultz <das%FreeBSD.ORG@localhost>
@@ -30,7 +30,7 @@
#if 0
__FBSDID("$FreeBSD: src/lib/libc/gdtoa/_ldtoa.c,v 1.2 2004/01/18 07:53:49 das Exp $");
#else
-__RCSID("$NetBSD: ldtoa.c,v 1.5 2016/03/13 19:44:58 christos Exp $");
+__RCSID("$NetBSD: ldtoa.c,v 1.6 2019/08/01 02:27:43 riastradh Exp $");
#endif
#include <float.h>
@@ -54,7 +54,7 @@
ldtoa(long double *ld, int mode, int ndigits, int *decpt, int *sign, char **rve)
{
#ifdef EXT_EXPBITS
- static FPI fpi = {
+ static CONST FPI fpi = {
LDBL_MANT_DIG, /* nbits */
LDBL_MIN_EXP - LDBL_MANT_DIG, /* emin */
LDBL_MAX_EXP - LDBL_MANT_DIG, /* emax */
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/strtoIQ.c
--- a/lib/libc/gdtoa/strtoIQ.c Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/strtoIQ.c Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: strtoIQ.c,v 1.2 2008/03/21 23:13:48 christos Exp $ */
+/* $NetBSD: strtoIQ.c,v 1.3 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -40,7 +40,7 @@
strtoIQ(CONST char *s, char **sp, void *a, void *b)
#endif
{
- static FPI fpi = { 113, 1-16383-113+1, 32766-16383-113+1, 1, SI };
+ static CONST FPI fpi = { 113, 1-16383-113+1, 32766-16383-113+1, 1, SI };
Long exp[2];
Bigint *B[2];
int k, rv[2];
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/strtoId.c
--- a/lib/libc/gdtoa/strtoId.c Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/strtoId.c Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: strtoId.c,v 1.2 2008/03/21 23:13:48 christos Exp $ */
+/* $NetBSD: strtoId.c,v 1.3 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -40,7 +40,7 @@
strtoId(CONST char *s, char **sp, double *f0, double *f1)
#endif
{
- static FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI };
+ static CONST FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI };
Long exp[2];
Bigint *B[2];
int k, rv[2];
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/strtoIdd.c
--- a/lib/libc/gdtoa/strtoIdd.c Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/strtoIdd.c Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: strtoIdd.c,v 1.2 2008/03/21 23:13:48 christos Exp $ */
+/* $NetBSD: strtoIdd.c,v 1.3 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -41,9 +41,9 @@
#endif
{
#ifdef Sudden_Underflow
- static FPI fpi = { 106, 1-1023, 2046-1023-106+1, 1, 1 };
+ static CONST FPI fpi = { 106, 1-1023, 2046-1023-106+1, 1, 1 };
#else
- static FPI fpi = { 106, 1-1023-53+1, 2046-1023-106+1, 1, 0 };
+ static CONST FPI fpi = { 106, 1-1023-53+1, 2046-1023-106+1, 1, 0 };
#endif
Long exp[2];
Bigint *B[2];
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/strtoIf.c
--- a/lib/libc/gdtoa/strtoIf.c Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/strtoIf.c Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: strtoIf.c,v 1.2 2008/03/21 23:13:48 christos Exp $ */
+/* $NetBSD: strtoIf.c,v 1.3 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -40,7 +40,7 @@
strtoIf(CONST char *s, char **sp, float *f0, float *f1)
#endif
{
- static FPI fpi = { 24, 1-127-24+1, 254-127-24+1, 1, SI };
+ static CONST FPI fpi = { 24, 1-127-24+1, 254-127-24+1, 1, SI };
Long exp[2];
Bigint *B[2];
int k, rv[2];
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/strtoIg.c
--- a/lib/libc/gdtoa/strtoIg.c Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/strtoIg.c Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: strtoIg.c,v 1.3 2011/03/20 23:15:35 christos Exp $ */
+/* $NetBSD: strtoIg.c,v 1.4 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -35,9 +35,9 @@
int
#ifdef KR_headers
-strtoIg(s00, se, fpi, exp, B, rvp) CONST char *s00; char **se; FPI *fpi; Long *exp; Bigint **B; int *rvp;
+strtoIg(s00, se, fpi, exp, B, rvp) CONST char *s00; char **se; CONST FPI *fpi; Long *exp; Bigint **B; int *rvp;
#else
-strtoIg(CONST char *s00, char **se, FPI *fpi, Long *exp, Bigint **B, int *rvp)
+strtoIg(CONST char *s00, char **se, CONST FPI *fpi, Long *exp, Bigint **B, int *rvp)
#endif
{
Bigint *b, *b1;
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/strtoIx.c
--- a/lib/libc/gdtoa/strtoIx.c Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/strtoIx.c Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: strtoIx.c,v 1.2 2008/03/21 23:13:48 christos Exp $ */
+/* $NetBSD: strtoIx.c,v 1.3 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -40,7 +40,7 @@
strtoIx(CONST char *s, char **sp, void *a, void *b)
#endif
{
- static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI };
+ static CONST FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI };
Long exp[2];
Bigint *B[2];
int k, rv[2];
diff -r 814d87125748 -r 053553073b86 lib/libc/gdtoa/strtoIxL.c
--- a/lib/libc/gdtoa/strtoIxL.c Thu Aug 01 02:06:31 2019 +0000
+++ b/lib/libc/gdtoa/strtoIxL.c Thu Aug 01 02:27:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: strtoIxL.c,v 1.2 2008/03/21 23:13:48 christos Exp $ */
+/* $NetBSD: strtoIxL.c,v 1.3 2019/08/01 02:27:43 riastradh Exp $ */
/****************************************************************
@@ -40,7 +40,7 @@
strtoIxL(CONST char *s, char **sp, void *a, void *b)
Home |
Main Index |
Thread Index |
Old Index