[Gridflow-cvs] [svn] commit: r6116 - in /trunk/src: classes_gui.cxx grid.cxx gridflow.cxx gridflow.hxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Sun Aug 15 13:33:28 EDT 2010


Author: matju
Date: Sun Aug 15 13:33:27 2010
New Revision: 6116

Log:
don't use TO; remove FObject 0 help; move ostream<<t_symbol* to the hxx

Modified:
    trunk/src/classes_gui.cxx
    trunk/src/grid.cxx
    trunk/src/gridflow.cxx
    trunk/src/gridflow.hxx

Modified: trunk/src/classes_gui.cxx
==============================================================================
--- trunk/src/classes_gui.cxx (original)
+++ trunk/src/classes_gui.cxx Sun Aug 15 13:33:27 2010
@@ -128,8 +128,6 @@
 
 //****************************************************************
 
-ostream &operator << (ostream &self, t_symbol *s) {self << s->s_name; return self;}
-
 \class Display : GUI_FObject {
 	int y,x;
 	ostringstream text;
@@ -151,9 +149,9 @@
 		pd_typedmess(gp,gensym("grid"),argc,argv);
 		changed();
 	}
-	\decl 0 very_long_name_that_nobody_uses (...) {
+	\decl 0 very_long_name_that_nobody_uses (...) { // for magic use by [#print]
 		if (text.str().length()) text << "\n";
-		for (int i=0; i<argc; i++) text << char(TO(int32,argv[i]));
+		for (int i=0; i<argc; i++) text << char(int32(argv[i]));
 	}
  	void show() { /* or hide */
 		ostringstream quoted;

Modified: trunk/src/grid.cxx
==============================================================================
--- trunk/src/grid.cxx (original)
+++ trunk/src/grid.cxx Sun Aug 15 13:33:27 2010
@@ -47,7 +47,7 @@
 		if (a[i] == s_sharp) {
 			int32 v[i];
 			if (i!=0 && a[i-1].a_type==A_SYMBOL) nt=NumberTypeE_find(a[--i]);
-			for (int j=0; j<i; j++) v[j] = TO(int32,a[j]);
+			for (int j=0; j<i; j++) v[j] = (int32)a[j];
 			init(Dim(i,v),nt);
 			CHECK_ALIGN(data,nt);
 			if (a[i] != s_sharp) i++;

Modified: trunk/src/gridflow.cxx
==============================================================================
--- trunk/src/gridflow.cxx (original)
+++ trunk/src/gridflow.cxx Sun Aug 15 13:33:27 2010
@@ -850,15 +850,6 @@
 		if (!m) RAISE("missing ___get");
 		t_atom2 a[1] = {s}; m(this,1,a);
 	}
-}
-\def 0 help () {
-	FClass *fc = fclasses_pd[pd_class(bself)];
-	post("attributes (");
-	foreach(attr,fc->attrs) post("    %s %s;",attr->second->type.data(),attr->second->name->s_name);
-	post(")");
-	post("methods (");
-	foreach(meth,fc->methods) post("    %d %s",meth->first.first,meth->first.second->s_name);
-	post(")");
 }
 \classinfo {}
 \end class

Modified: trunk/src/gridflow.hxx
==============================================================================
--- trunk/src/gridflow.hxx (original)
+++ trunk/src/gridflow.hxx Sun Aug 15 13:33:27 2010
@@ -854,7 +854,6 @@
 		outlet_list(out[outlet],&s_list,argc,foo);
 	}
 	\decl 0 get (t_symbol *s=0);
-	\decl 0 help ();
 };
 \end class
 
@@ -959,7 +958,8 @@
     return r;
 }
 
-ostream &operator << (ostream &self, const t_atom &a);
+              ostream &operator << (ostream &self, const t_atom &a);
+static inline ostream &operator << (ostream &self, t_symbol *s) {self << s->s_name; return self;}
 
 // from pd/src/g_canvas.c
 struct _canvasenvironment {



More information about the Gridflow-cvs mailing list