OLD | NEW |
1 /* crypto/bio/b_print.c */ | 1 /* crypto/bio/b_print.c */ |
2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
8 * | 8 * |
9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 * o Ralf S. Engelschall <rse@engelschall.com> (1999, for Pth) | 108 * o Ralf S. Engelschall <rse@engelschall.com> (1999, for Pth) |
109 * o ... (for OpenSSL) | 109 * o ... (for OpenSSL) |
110 */ | 110 */ |
111 | 111 |
112 #ifdef HAVE_LONG_DOUBLE | 112 #ifdef HAVE_LONG_DOUBLE |
113 #define LDOUBLE long double | 113 #define LDOUBLE long double |
114 #else | 114 #else |
115 #define LDOUBLE double | 115 #define LDOUBLE double |
116 #endif | 116 #endif |
117 | 117 |
118 #if HAVE_LONG_LONG | 118 #ifdef HAVE_LONG_LONG |
119 # if defined(OPENSSL_SYS_WIN32) && !defined(__GNUC__) | 119 # if defined(_WIN32) && !defined(__GNUC__) |
120 # define LLONG __int64 | 120 # define LLONG __int64 |
121 # else | 121 # else |
122 # define LLONG long long | 122 # define LLONG long long |
123 # endif | 123 # endif |
124 #else | 124 #else |
125 #define LLONG long | 125 #define LLONG long |
126 #endif | 126 #endif |
127 | 127 |
128 static void fmtstr (char **, char **, size_t *, size_t *, | 128 static void fmtstr (char **, char **, size_t *, size_t *, |
129 const char *, int, int, int); | 129 const char *, int, int, int); |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 | 833 |
834 if (truncated) | 834 if (truncated) |
835 /* In case of truncation, return -1 like traditional snprintf. | 835 /* In case of truncation, return -1 like traditional snprintf. |
836 * (Current drafts for ISO/IEC 9899 say snprintf should return | 836 * (Current drafts for ISO/IEC 9899 say snprintf should return |
837 * the number of characters that would have been written, | 837 * the number of characters that would have been written, |
838 * had the buffer been large enough.) */ | 838 * had the buffer been large enough.) */ |
839 return -1; | 839 return -1; |
840 else | 840 else |
841 return (retlen <= INT_MAX) ? (int)retlen : -1; | 841 return (retlen <= INT_MAX) ? (int)retlen : -1; |
842 } | 842 } |
OLD | NEW |