libopensc: export the wrapper for the internal log function dedicated to minidriver
http://www.opensc-project.org/pipermail/opensc-commits/2011-May/011049.html git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5430 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
8e75d971cb
commit
1176c59370
|
@ -42,6 +42,8 @@
|
|||
|
||||
#include "internal.h"
|
||||
|
||||
static void sc_do_log_va(sc_context_t *ctx, int level, const char *file, int line, const char *func, const char *format, va_list args);
|
||||
|
||||
void sc_do_log(sc_context_t *ctx, int level, const char *file, int line, const char *func, const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
@ -51,7 +53,12 @@ void sc_do_log(sc_context_t *ctx, int level, const char *file, int line, const c
|
|||
va_end(ap);
|
||||
}
|
||||
|
||||
void sc_do_log_va(sc_context_t *ctx, int level, const char *file, int line, const char *func, const char *format, va_list args)
|
||||
void sc_do_log_noframe(sc_context_t *ctx, int level, const char *format, va_list args)
|
||||
{
|
||||
sc_do_log_va(ctx, level, NULL, 0, NULL, format, args);
|
||||
}
|
||||
|
||||
static void sc_do_log_va(sc_context_t *ctx, int level, const char *file, int line, const char *func, const char *format, va_list args)
|
||||
{
|
||||
char buf[1836], *p;
|
||||
int r;
|
||||
|
|
|
@ -54,8 +54,7 @@ enum {
|
|||
|
||||
void sc_do_log(struct sc_context *ctx, int level, const char *file, int line, const char *func,
|
||||
const char *format, ...);
|
||||
void sc_do_log_va(struct sc_context *ctx, int level, const char *file, int line, const char *func,
|
||||
const char *format, va_list args);
|
||||
void sc_do_log_noframe(sc_context_t *ctx, int level, const char *format, va_list args);
|
||||
void _sc_debug(struct sc_context *ctx, int level, const char *format, ...);
|
||||
void _sc_log(struct sc_context *ctx, const char *format, ...);
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ static void logprintf(PCARD_DATA pCardData, int level, const char* format, ...)
|
|||
if(vs != NULL && vs->ctx != NULL)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
sc_do_log_va(vs->ctx, level, NULL, 0, NULL, format, arg);
|
||||
sc_do_log_noframe(vs->ctx, level, format, arg);
|
||||
#else
|
||||
/* FIXME: trouble in vsprintf with %S arg under
|
||||
mingw32
|
||||
|
@ -2128,3 +2128,4 @@ BOOL APIENTRY DllMain( HMODULE hModule,
|
|||
#pragma managed(pop)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue