[Mesa-dev] [PATCH 03/11] mesa: add _mesa_vsnprintf() function

nobled nobled at dreamwidth.org
Mon May 2 16:00:10 PDT 2011


This lets code outside of imports.c use vsnprintf's functionality.
---
 src/mesa/main/imports.c |    7 +++++++
 src/mesa/main/imports.h |    3 +++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index f262b25..f971338 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -783,6 +783,13 @@ _mesa_str_checksum(const char *str)
 /*@}*/


+/** Needed due to #ifdef's, above. */
+int
+_mesa_vsnprintf(char *str, size_t size, const char *fmt, va_list args)
+{
+   return vsnprintf( str, size, fmt, args);
+}
+
 /** Wrapper around vsnprintf() */
 int
 _mesa_snprintf( char *str, size_t size, const char *fmt, ... )
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index ce7baab..604fbcb 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -593,6 +593,9 @@ _mesa_str_checksum(const char *str);
 extern int
 _mesa_snprintf( char *str, size_t size, const char *fmt, ... )
PRINTFLIKE(3, 4);

+extern int
+_mesa_vsnprintf(char *str, size_t size, const char *fmt, va_list arg);
+
 struct gl_context;

 extern void
-- 
1.7.0.4
-------------- next part --------------
From f9c6a8a60dc476959a99d2207b691630e582ff9d Mon Sep 17 00:00:00 2001
From: nobled <nobled at dreamwidth.org>
Date: Sun, 1 May 2011 12:47:31 +0000
Subject: [PATCH 2/5] mesa: add _mesa_vsnprintf() function

This lets code outside of imports.c use vsnprintf's functionality.
---
 src/mesa/main/imports.c |    7 +++++++
 src/mesa/main/imports.h |    3 +++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index f262b25..f971338 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -783,6 +783,13 @@ _mesa_str_checksum(const char *str)
 /*@}*/
 
 
+/** Needed due to #ifdef's, above. */
+int
+_mesa_vsnprintf(char *str, size_t size, const char *fmt, va_list args)
+{
+   return vsnprintf( str, size, fmt, args);
+}
+
 /** Wrapper around vsnprintf() */
 int
 _mesa_snprintf( char *str, size_t size, const char *fmt, ... )
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index ce7baab..604fbcb 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -593,6 +593,9 @@ _mesa_str_checksum(const char *str);
 extern int
 _mesa_snprintf( char *str, size_t size, const char *fmt, ... ) PRINTFLIKE(3, 4);
 
+extern int
+_mesa_vsnprintf(char *str, size_t size, const char *fmt, va_list arg);
+
 struct gl_context;
 
 extern void
-- 
1.7.0.4


More information about the mesa-dev mailing list