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

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Sat Oct 24 22:44:33 EDT 2009


Author: matju
Date: Sat Oct 24 22:44:33 2009
New Revision: 4376

Log:
copied symprintf() from desiredata (shortcut for sprintf+gensym)

Modified:
    trunk/gridflow.h

Modified: trunk/gridflow.h
==============================================================================
--- trunk/gridflow.h (original)
+++ trunk/gridflow.h Sat Oct 24 22:44:33 2009
@@ -908,6 +908,20 @@
     return n;
 }
 
+/* this function was copied from desiredata */
+#ifndef DESIRE
+inline t_symbol *symprintf(const char *s, ...) {
+    char *buf;
+    va_list args;
+    va_start(args,s);
+    if (vasprintf(&buf,s,args)<0) {/*rien*/}
+    va_end(args);
+    t_symbol *r = gensym(buf);
+    free(buf);
+    return r;
+}
+#endif
+
 std::ostream &operator << (std::ostream &self, const t_atom &a);
 
 // from pd/src/g_canvas.c



More information about the Gridflow-cvs mailing list