Changes between 0.9.5a and 0.9.6 [xx XXX 2000]
+ *) Added BIO_vprintf() and BIO_vsnprintf().
+ [Richard Levitte]
+
*) Added more prefixes to parse for in the the strings written
through a logging bio, to cover all the levels that are available
through syslog. The prefixes are now:
*/
#include <stdio.h>
-#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
{
va_list args;
int ret;
+
+ va_start(args, format);
+
+ ret = BIO_vprintf(bio, format, args);
+
+ va_end(args);
+ return(ret);
+ }
+
+int BIO_vprintf (BIO *bio, const char *format, va_list args)
+ {
+ int ret;
size_t retlen;
#ifdef USE_ALLOCATING_PRINT
char *hugebuf;
MS_STATIC char hugebuf[1024*2]; /* 10k in one chunk is the limit */
#endif
- va_start(args, format);
-
#ifndef USE_ALLOCATING_PRINT
hugebuf[0]='\0';
dopr(hugebuf, sizeof(hugebuf), &retlen, format, args);
}
CRYPTO_pop_info();
#endif
- va_end(args);
return(ret);
}
int BIO_snprintf(char *buf, size_t n, const char *format, ...)
{
va_list args;
+ int ret;
+
+ va_start(args, format);
+
+ ret = BIO_vsnprintf(buf, n, format, args);
+
+ va_end(args);
+ return(ret);
+ }
+
+int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
+ {
size_t retlen;
int truncated;
- va_start(args, format);
_dopr(dopr_outch, dopr_isbig, dopr_copy,
&buf, &n, &retlen, &truncated, format, args);
if (truncated)
#ifndef NO_FP_API
# include <stdio.h>
#endif
+#include <stdarg.h>
#include <openssl/crypto.h>
long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
int BIO_printf(BIO *bio, const char *format, ...);
+int BIO_vprintf(BIO *bio, const char *format, va_list args);
int BIO_snprintf(char *buf, size_t n, const char *format, ...);
+int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args);
/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes