[Gridflow-cvs] [svn] commit: r6036 - in /trunk: Makefile src/classes2.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Wed Aug 11 21:17:59 EDT 2010


Author: matju
Date: Wed Aug 11 21:17:58 2010
New Revision: 6036

Log:
add c++ [inv+] and remove all Makefile hacks to get [inv+] and [inv*] working "nice"

Modified:
    trunk/Makefile
    trunk/src/classes2.cxx

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Wed Aug 11 21:17:58 2010
@@ -114,11 +114,6 @@
 	rgb_to_greyscale greyscale_to_rgb rgb_to_yuv yuv_to_rgb rotate in out
 
 ALIASES += deprecated/@fade.pd deprecated/@!.pd doc/flow_classes/@complex_sq-help.pd
-ALIASES += doc/flow_classes/inv+-help.pd  abstractions/inv+.pd
-ifeq ($(OS),nt)
-else
-ALIASES += doc/flow_classes/inv\*-help.pd abstractions/inv\*.pd
-endif
 
 aliases:: $(ALIASES)
 
@@ -131,18 +126,6 @@
 doc/flow_classes/@complex_sq-help.pd: doc/flow_classes/0x40complex_sq-help.pd
 	cp doc/flow_classes/0x40complex_sq-help.pd doc/flow_classes/@complex_sq-help.pd
 
-doc/flow_classes/inv+-help.pd: doc/flow_classes/inv0x2b-help.pd
-	cp doc/flow_classes/inv0x2b-help.pd doc/flow_classes/inv+-help.pd
-
-doc/flow_classes/inv\*-help.pd: doc/flow_classes/inv0x2a-help.pd
-	cp doc/flow_classes/inv0x2a-help.pd doc/flow_classes/inv\*-help.pd
-
-abstractions/inv+.pd: abstractions/inv0x2b.pd
-	cp abstractions/inv0x2b.pd abstractions/inv+.pd
-
-abstractions/inv\*.pd: abstractions/inv0x2a.pd
-	cp abstractions/inv0x2a.pd abstractions/inv\*.pd
-
 clean::
 	@-$(RM) gridflow.pd_linux *.o */*.o *.so
 	rm -f $(OBJS2) $(OBJS) src/*.fcs format/*.fcs $(patsubst %,deprecated/@%.pd,$(DEPRECATED))

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Wed Aug 11 21:17:58 2010
@@ -1232,10 +1232,7 @@
 
 string join (int argc, t_atom *argv, string sep, string term) {
 	std::ostringstream os;
-	for (int i=0; i<argc; i++) {
-		os << argv[i];
-		os << (i==argc-1 ? term : sep);
-	}
+	for (int i=0; i<argc; i++) os << argv[i] << (i==argc-1 ? term : sep);
 	return os.str();
 }
 
@@ -1279,15 +1276,22 @@
 \end class {install("gf/wrap",1,1);}
 
 /* hack because hexloader is a myth */
+\class InvPlus : FObject {
+	float b;
+	\constructor (float b=1) {this->b=b;}
+	\decl 0 float (float a)          {           outlet_float(outlets[0],b-a);}
+	\decl 0 list  (float a, float b) {this->b=b; outlet_float(outlets[0],b-a);}
+	\decl 1 float (float b) {this->b=b;}
+	\decl 1 list  (float b) {this->b=b;}};
+\end class {install("inv+",2,1); class_sethelpsymbol(fclass->bfclass,gensym("inv0x2b"));}
 \class InvTimes : FObject {
 	float b;
 	\constructor (float b=1) {this->b=b;}
 	\decl 0 float (float a)          {           outlet_float(outlets[0],b/a);}
 	\decl 0 list  (float a, float b) {this->b=b; outlet_float(outlets[0],b/a);}
 	\decl 1 float (float b) {this->b=b;}
-	\decl 1 list  (float b) {this->b=b;}
-};
-\end class {install("inv*",2,1);}
+	\decl 1 list  (float b) {this->b=b;}};
+\end class {install("inv*",2,1); class_sethelpsymbol(fclass->bfclass,gensym("inv0x2a"));}
 
 \class GridFlowClass : FObject {
 	\constructor () {}



More information about the Gridflow-cvs mailing list