diff options
author | José Fonseca <[email protected]> | 2009-01-07 12:02:06 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-01-07 09:00:05 -0700 |
commit | b3c7f7466c068a5eaeb5adf981b6f776560bb6c9 (patch) | |
tree | 4362e58b4af5200299101e187fba585186fbd8c7 /src/mesa/main/imports.c | |
parent | 510ed7f51e0a198029835e4d88a1364179c2745c (diff) |
mesa: Add _mesa_snprintf.
On Windows snprintf is renamed as _snprintf.
(cherry picked from commit f8f9a1b620d31d1a59855fd502caed325d4a324f)
Diffstat (limited to 'src/mesa/main/imports.c')
-rw-r--r-- | src/mesa/main/imports.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 13cb84ca4bf..5cf1a2baa46 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -934,6 +934,18 @@ _mesa_sprintf( char *str, const char *fmt, ... ) return r; } +/** Wrapper around vsnprintf() */ +int +_mesa_snprintf( char *str, size_t size, const char *fmt, ... ) +{ + int r; + va_list args; + va_start( args, fmt ); + r = vsnprintf( str, size, fmt, args ); + va_end( args ); + return r; +} + /** Wrapper around printf(), using vsprintf() for the formatting. */ void _mesa_printf( const char *fmtString, ... ) |