11#include  "tommath_private.h" 
22#include  <string.h> 
3- #ifdef  BN_MP_TODECIMAL_FAST_C 
3+ #ifdef  BN_S_MP_TODECIMAL_FAST_C 
44/* LibTomMath, multiple-precision integer library -- Tom St Denis */ 
55/* SPDX-License-Identifier: Unlicense */ 
66
77/* store a bignum as a decimal ASCII string */ 
8- mp_err  mp_todecimal_fast_rec (mp_int  * number , mp_int  * nL , mp_int  * shiftL , mp_int  * mL , int  precalc_array_index , int  left ,
9-  char  * * result )
8+ mp_err  s_mp_todecimal_fast_rec (const  mp_int  * number , mp_int  * nL , mp_int  * shiftL , mp_int  * mL , int  precalc_array_index ,
9+  int  left ,
10+  char  * * result )
1011{
1112 mp_int  q , nLq , r ;
1213 mp_err  err ;
@@ -47,14 +48,14 @@ mp_err mp_todecimal_fast_rec(mp_int *number, mp_int *nL, mp_int *shiftL, mp_int
4748
4849 -- precalc_array_index ;
4950 if  (left  &&  mp_iszero (& q )) {
50-  if  ((err  =  mp_todecimal_fast_rec (& r , nL , shiftL , mL , precalc_array_index , 1 , result )) !=  MP_OKAY ) {
51+  if  ((err  =  s_mp_todecimal_fast_rec (& r , nL , shiftL , mL , precalc_array_index , 1 , result )) !=  MP_OKAY ) {
5152 goto LBL_ERR ;
5253 }
5354 } else  {
54-  if  ((err  =  mp_todecimal_fast_rec (& q , nL , shiftL , mL , precalc_array_index , left , result )) !=  MP_OKAY ) {
55+  if  ((err  =  s_mp_todecimal_fast_rec (& q , nL , shiftL , mL , precalc_array_index , left , result )) !=  MP_OKAY ) {
5556 goto LBL_ERR ;
5657 }
57-  if  ((err  =  mp_todecimal_fast_rec (& r , nL , shiftL , mL , precalc_array_index , 0 , result )) !=  MP_OKAY ) {
58+  if  ((err  =  s_mp_todecimal_fast_rec (& r , nL , shiftL , mL , precalc_array_index , 0 , result )) !=  MP_OKAY ) {
5859 goto LBL_ERR ;
5960 }
6061 }
@@ -66,7 +67,7 @@ mp_err mp_todecimal_fast_rec(mp_int *number, mp_int *nL, mp_int *shiftL, mp_int
6667 return  err ;
6768}
6869
69- mp_err  mp_todecimal_fast ( mp_int  * number , char  * result )
70+ mp_err  s_mp_todecimal_fast ( const   mp_int  * number , char  * result )
7071{
7172 mp_int  n , shift , M , M2 , M22 , M4 , M44 ;
7273 mp_int  nL [20 ], shiftL [20 ], mL [20 ];
@@ -187,7 +188,7 @@ mp_err mp_todecimal_fast(mp_int *number, char *result)
187188 precalc_array_index ++ ;
188189 }
189190
190-  if  ((err  =  mp_todecimal_fast_rec (number , nL , shiftL , mL , precalc_array_index  -  1 , 1 , result_addr )) !=  MP_OKAY ) {
191+  if  ((err  =  s_mp_todecimal_fast_rec (number , nL , shiftL , mL , precalc_array_index  -  1 , 1 , result_addr )) !=  MP_OKAY ) {
191192 goto LBL_ERR ;
192193 }
193194
0 commit comments