ec/ecp_nistz256.c: harmonize with latest indent script.
[oweals/openssl.git] / crypto / bn / bn_print.c
index bebb466d088a27c60b9440d08aee478564771d80..89320738b317f66d11b5cce920895de5f1b8b275 100644 (file)
@@ -108,7 +108,8 @@ char *BN_bn2dec(const BIGNUM *a)
        BIGNUM *t=NULL;
        BN_ULONG *bn_data=NULL,*lp;
 
-       /* get an upper bound for the length of the decimal integer
+       /*-
+        * get an upper bound for the length of the decimal integer
         * num <= (BN_num_bits(a) + 1) * log(2)
         *     <= 3 * BN_num_bits(a) * 0.1001 + log(2) + 1     (rounding error)
         *     <= BN_num_bits(a)/10 + BN_num_bits/1000 + 1 + 1 
@@ -316,7 +317,7 @@ int BN_asc2bn(BIGNUM **bn, const char *a)
        }
 
 #ifndef OPENSSL_NO_BIO
-#ifndef OPENSSL_NO_FP_API
+#ifndef OPENSSL_NO_STDIO
 int BN_print_fp(FILE *fp, const BIGNUM *a)
        {
        BIO *b;
@@ -357,3 +358,22 @@ end:
        return(ret);
        }
 #endif
+
+char *BN_options(void)
+       {
+       static int init=0;
+       static char data[16];
+
+       if (!init)
+               {
+               init++;
+#ifdef BN_LLONG
+               BIO_snprintf(data,sizeof data,"bn(%d,%d)",
+                            (int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8);
+#else
+               BIO_snprintf(data,sizeof data,"bn(%d,%d)",
+                            (int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8);
+#endif
+               }
+       return(data);
+       }