diff options
author | Brian Paul <[email protected]> | 2009-01-22 10:32:08 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-01-22 10:32:08 -0700 |
commit | 596b8fbbbf65cef227ce60216a57d4bbfd627099 (patch) | |
tree | eae1d26079ce11c162f3c86f0f566af2eb473a91 /src/mesa/main/imports.c | |
parent | d2ab930046ae91987ee4e528e13ad06f8889f200 (diff) |
mesa: added _mesa_fprintf() wrapper
Diffstat (limited to 'src/mesa/main/imports.c')
-rw-r--r-- | src/mesa/main/imports.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 5cf1a2baa46..0c2c894eef0 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -955,9 +955,22 @@ _mesa_printf( const char *fmtString, ... ) va_start( args, fmtString ); vsnprintf(s, MAXSTRING, fmtString, args); va_end( args ); - fprintf(stderr,"%s", s); + fprintf(stderr, "%s", s); } +/** Wrapper around fprintf(), using vsprintf() for the formatting. */ +void +_mesa_fprintf( FILE *f, const char *fmtString, ... ) +{ + char s[MAXSTRING]; + va_list args; + va_start( args, fmtString ); + vsnprintf(s, MAXSTRING, fmtString, args); + va_end( args ); + fprintf(f, "%s", s); +} + + /** Wrapper around vsprintf() */ int _mesa_vsprintf( char *str, const char *fmt, va_list args ) |