*** empty log message ***

This commit is contained in:
hyung-hwan 2007-01-27 02:55:55 +00:00
parent 8301120ed3
commit 231b4bd5d6
2 changed files with 29 additions and 11 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: jni.c,v 1.56 2007-01-26 16:15:54 bacon Exp $
* $Id: jni.c,v 1.57 2007-01-27 02:55:55 bacon Exp $
*/
#include <stdio.h>
@ -129,16 +129,7 @@ static int awk_sprintf (
va_list ap;
va_start (ap, fmt);
#if defined(_WIN32)
n = _vsntprintf (buf, len, fmt, ap);
if (n < 0 || (ase_size_t)n >= len)
{
if (len > 0) buf[len-1] = ASE_T('\0');
n = -1;
}
#else
n = ase_vsprintf (buf, len, fmt, ap);
#endif
va_end (ap);
return n;
}

View File

@ -1,5 +1,5 @@
/*
* $Id: printf.c,v 1.5 2007-01-26 16:15:54 bacon Exp $
* $Id: printf.c,v 1.6 2007-01-27 02:55:55 bacon Exp $
*/
#include <stdarg.h>
@ -16,6 +16,33 @@
#define ase_vprintf _vtprintf
#define ase_fprintf _ftprintf
#define ase_vfprintf _vftprintf
int ase_vsprintf (ase_char_t* buf, size_t size, const ase_char_t* fmt, va_list ap)
{
int n;
n = _vsntprintf (buf, size, fmt, ap);
if (n < 0 || (size_t)n >= size)
{
if (size > 0) buf[size-1] = ASE_T('\0');
n = -1;
}
return n;
}
int ase_sprintf (ase_char_t* buf, size_t size, const ase_char_t* fmt, ...)
{
int n;
va_list ap;
va_start (ap, fmt);
n = ase_vsprintf (buf, size, fmt, ap);
va_end (ap);
return n;
}
#else
#if defined(ASE_CHAR_IS_MCHAR)