[Gridflow-cvs] [svn] commit: r4038 - /trunk/gridflow.h

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Thu Jul 17 11:42:51 EDT 2008


Author: matju
Date: Thu Jul 17 11:42:51 2008
New Revision: 4038

Log:
oprintf and voprintf shall return a value just like all the other *printf functions

Modified:
    trunk/gridflow.h

Modified: trunk/gridflow.h
==============================================================================
--- trunk/gridflow.h (original)
+++ trunk/gridflow.h Thu Jul 17 11:42:51 2008
@@ -909,17 +909,19 @@
 
 /* both oprintf are copied from desiredata */
 
-static inline void voprintf(std::ostream &buf, const char *s, va_list args) {
+static inline int voprintf(std::ostream &buf, const char *s, va_list args) {
     char *b;
-    vasprintf(&b,s,args);
+    int n = vasprintf(&b,s,args);
     buf << b;
     free(b);
+    return n;
 }
-static inline void oprintf(std::ostream &buf, const char *s, ...) {
+static inline int oprintf(std::ostream &buf, const char *s, ...) {
     va_list args;
     va_start(args,s);
-    voprintf(buf,s,args);
+    int n = voprintf(buf,s,args);
     va_end(args);
+    return n;
 }
 
 std::ostream &operator << (std::ostream &self, t_atom &a);



More information about the Gridflow-cvs mailing list