Skip to content
Snippets Groups Projects
Commit 7e9c9012 authored by deuce's avatar deuce
Browse files

DLLexportationism.

parent 8e6d1ce1
Branches
Tags
No related merge requests found
...@@ -55,12 +55,12 @@ ...@@ -55,12 +55,12 @@
/* Maximum length of a format specifier including the % */ /* Maximum length of a format specifier including the % */
#define MAX_FORMAT_LEN 256 #define MAX_FORMAT_LEN 256
void xp_asprintf_free(char *format) void DLLCALL xp_asprintf_free(char *format)
{ {
free(format); free(format);
} }
int xp_printf_get_type(const char *format) int DLLCALL xp_printf_get_type(const char *format)
{ {
const char *p; const char *p;
int modifier=0; int modifier=0;
...@@ -287,7 +287,7 @@ int xp_printf_get_type(const char *format) ...@@ -287,7 +287,7 @@ int xp_printf_get_type(const char *format)
* that the type passed to sprintf() is the type passed to * that the type passed to sprintf() is the type passed to
* xp_asprintf_next(). * xp_asprintf_next().
*/ */
char *xp_asprintf_next(char *format, int type, ...) char* DLLCALL xp_asprintf_next(char *format, int type, ...)
{ {
va_list vars; va_list vars;
char *p; char *p;
...@@ -1255,7 +1255,7 @@ char *xp_asprintf_next(char *format, int type, ...) ...@@ -1255,7 +1255,7 @@ char *xp_asprintf_next(char *format, int type, ...)
return(format); return(format);
} }
char *xp_asprintf_start(const char *format) char* DLLCALL xp_asprintf_start(const char *format)
{ {
char *ret; char *ret;
char *p; char *p;
...@@ -1286,7 +1286,7 @@ char *xp_asprintf_start(const char *format) ...@@ -1286,7 +1286,7 @@ char *xp_asprintf_start(const char *format)
return(ret); return(ret);
} }
char *xp_asprintf_end(char *format, size_t *lenret) char* DLLCALL xp_asprintf_end(char *format, size_t *lenret)
{ {
char *p; char *p;
size_t len; size_t len;
...@@ -1306,7 +1306,7 @@ char *xp_asprintf_end(char *format, size_t *lenret) ...@@ -1306,7 +1306,7 @@ char *xp_asprintf_end(char *format, size_t *lenret)
return(format); return(format);
} }
char *xp_vasprintf(const char *format, va_list va) char* DLLCALL xp_vasprintf(const char *format, va_list va)
{ {
char *working; char *working;
char *next; char *next;
...@@ -1373,7 +1373,7 @@ char *xp_vasprintf(const char *format, va_list va) ...@@ -1373,7 +1373,7 @@ char *xp_vasprintf(const char *format, va_list va)
return(next); return(next);
} }
char *xp_asprintf(const char *format, ...) char* DLLCALL xp_asprintf(const char *format, ...)
{ {
char *ret; char *ret;
va_list va; va_list va;
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#define _XPPRINTF_H_ #define _XPPRINTF_H_
#include <stdarg.h> #include <stdarg.h>
#include "wrapdll.h"
/* Supported printf argument types */ /* Supported printf argument types */
#define XP_PRINTF_TYPE_AUTO 0 #define XP_PRINTF_TYPE_AUTO 0
...@@ -71,13 +72,13 @@ ...@@ -71,13 +72,13 @@
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif
void xp_asprintf_free(char *format); DLLEXPORT void DLLCALL xp_asprintf_free(char *format);
char *xp_asprintf_start(const char *format); DLLEXPORT char* DLLCALL xp_asprintf_start(const char *format);
char *xp_asprintf_next(char *format, int type, ...); DLLEXPORT char* DLLCALL xp_asprintf_next(char *format, int type, ...);
char *xp_asprintf_end(char *format, size_t *endlen); DLLEXPORT char* DLLCALL xp_asprintf_end(char *format, size_t *endlen);
char *xp_asprintf(const char *format, ...); DLLEXPORT char* DLLCALL xp_asprintf(const char *format, ...);
char *xp_vasprintf(const char *format, va_list va); DLLEXPORT char* DLLCALL xp_vasprintf(const char *format, va_list va);
int xp_printf_get_type(const char *format); DLLEXPORT int DLLCALL xp_printf_get_type(const char *format);
#if defined(__cplusplus) #if defined(__cplusplus)
} }
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment