From 6c8224e4bd3969499ee62f73848bcafba4a870d5 Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Mon, 13 Jun 2005 11:22:02 +0000 Subject: [PATCH] added PHYSFSX_printf --- ChangeLog | 2 +- include/physfsx.h | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0552162c..e6c1c67f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/include/physfsx.h b/include/physfsx.h index 8af3bd77..b946c8d6 100644 --- a/include/physfsx.h +++ b/include/physfsx.h @@ -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 #endif #include +#include #include @@ -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 -- 2.39.2