diff --git a/ase/awk/sa.c b/ase/awk/sa.c index b77d319d..bdb3066d 100644 --- a/ase/awk/sa.c +++ b/ase/awk/sa.c @@ -1,5 +1,5 @@ /* - * $Id: sa.c,v 1.3 2006-01-20 16:28:57 bacon Exp $ + * $Id: sa.c,v 1.4 2006-01-20 16:31:58 bacon Exp $ */ #include @@ -30,37 +30,11 @@ int xp_printf (const xp_char_t* fmt, ...) return n; } -int xp_fprintf (XP_FILE* file, const xp_char_t* fmt, ...) -{ - int n; - xp_va_list ap; - - xp_va_start (ap, fmt); - n = xp_vfprintf (file, fmt, ap); - xp_va_end (ap); - return n; -} - int xp_vprintf (const xp_char_t* fmt, xp_va_list ap) { return xp_vfprintf (xp_stdout, fmt, ap); } -int xp_vfprintf (XP_FILE *stream, const xp_char_t* fmt, xp_va_list ap) -{ - int n; - xp_char_t* nf = __adjust_format (fmt); - if (nf == XP_NULL) return -1; - -#ifdef XP_CHAR_IS_MCHAR - n = vfprintf (stream, nf, ap); -#else - n = vfwprintf (stream, nf, ap); -#endif - xp_free (nf); - return n; -} - int xp_sprintf (xp_char_t* buf, xp_size_t size, const xp_char_t* fmt, ...) { int n; diff --git a/ase/awk/sa.h b/ase/awk/sa.h index ab5b1163..e91c3bcc 100644 --- a/ase/awk/sa.h +++ b/ase/awk/sa.h @@ -1,5 +1,5 @@ /* - * $Id: sa.h,v 1.4 2006-01-20 16:28:57 bacon Exp $ + * $Id: sa.h,v 1.5 2006-01-20 16:31:58 bacon Exp $ */ #ifndef _XP_AWK_SA_H_ @@ -12,6 +12,7 @@ #include #include #include +#include #include #define xp_malloc malloc @@ -28,6 +29,11 @@ #define xp_strcmp wcscmp #define xp_strlen wcslen +#define xp_va_start(pvar,param) va_start(pvar,param) +#define xp_va_list va_list +#define xp_va_end(pvar) va_end(pvar) +#define xp_va_arg(pvar,type) va_arg(pvar,type) + #define xp_main main #define XP_CHAR(c) L##c @@ -75,10 +81,8 @@ extern "C" { xp_char_t* xp_strdup (const xp_char_t* str); int xp_printf (const xp_char_t* fmt, ...); -int xp_fprintf (XP_FILE* file, const xp_char_t* fmt, ...); int xp_vprintf (const xp_char_t* fmt, xp_va_list ap); -int xp_vfprintf (XP_FILE *stream, const xp_char_t* fmt, xp_va_list ap); -int xp_sprint* buf, xp_size_t size, const xp_char_t* fmt, ...); +int xp_sprint (xp_char_t* buf, xp_size_t size, const xp_char_t* fmt, ...); int xp_vsprintf ( xp_char_t* buf, xp_size_t size, const xp_char_t* fmt, xp_va_list ap);