added PHYSFSX_printf
This commit is contained in:
parent
45496ef6c6
commit
6c8224e4bd
|
@ -6,7 +6,7 @@
|
||||||
132)
|
132)
|
||||||
|
|
||||||
* include/physfsx.h: added PHYSFSX_writeVector,
|
* 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>
|
2005-04-05 Bradley Bell <btb@icculus.org>
|
||||||
|
|
||||||
|
|
|
@ -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>
|
#include <sys/mount.h>
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include <physfs.h>
|
#include <physfs.h>
|
||||||
|
|
||||||
|
@ -78,6 +79,17 @@ static inline int PHYSFSX_putc(PHYSFS_file *file, int c)
|
||||||
return (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_writeFix PHYSFS_writeSLE32
|
||||||
#define PHYSFSX_writeFixAng PHYSFS_writeSLE16
|
#define PHYSFSX_writeFixAng PHYSFS_writeSLE16
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue