added PHYSFSX_printf

This commit is contained in:
Chris Taylor 2005-06-13 11:22:02 +00:00
parent 45496ef6c6
commit 6c8224e4bd
2 changed files with 14 additions and 2 deletions

View file

@ -6,7 +6,7 @@
132)
* include/physfsx.h: added PHYSFSX_writeVector,
PHYSFSX_writeAngleVec and PHYSFSX_writeMatrix
PHYSFSX_writeAngleVec, PHYSFSX_writeMatrix and PHYSFSX_printf
2005-04-05 Bradley Bell <btb@icculus.org>

View file

@ -1,4 +1,4 @@
/* $Id: physfsx.h,v 1.10 2005-06-13 09:36:45 chris Exp $ */
/* $Id: physfsx.h,v 1.11 2005-06-13 11:22:02 chris Exp $ */
/*
*
@ -18,6 +18,7 @@
#include <sys/mount.h>
#endif
#include <string.h>
#include <stdarg.h>
#include <physfs.h>
@ -78,6 +79,17 @@ static inline int PHYSFSX_putc(PHYSFS_file *file, int c)
return (int)c;
}
static inline int PHYSFSX_printf(PHYSFS_file *file, char *format, ...)
{
char buffer[1024];
va_list args;
va_start(args, format);
vsprintf(buffer, format, args);
return PHYSFSX_puts(file, buffer);
}
#define PHYSFSX_writeFix PHYSFS_writeSLE32
#define PHYSFSX_writeFixAng PHYSFS_writeSLE16