[Gridflow-cvs] [svn] commit: r4151 - /trunk/base/flow_objects.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Mar 27 13:49:26 EDT 2009


Author: matju
Date: Fri Mar 27 13:49:26 2009
New Revision: 4151

Log:
[#import]: in per_message mode, a "bang" or "list" (of length 0) will output a 1-D grid of size 0, instead of nothing. this fixes the bug just found in [hpgl_op].

Modified:
    trunk/base/flow_objects.c

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Fri Mar 27 13:49:26 2009
@@ -130,7 +130,7 @@
 	}
 };
 
-GRID_INLET(0) {} GRID_FLOW { process(n,data); } GRID_END
+GRID_INLET(0) {} GRID_FLOW {process(n,data);} GRID_END
 GRID_INPUT(1,dim_grid) {
 	P<Dim> d = dim_grid->to_dim();
 	if (!d->prod()) RAISE("target grid size must not be zero");
@@ -156,7 +156,9 @@
 \def 0 list(...) {//first two lines are there until grins become strictly initialized.
 	if (in.size()<=0) in.resize(1);
 	if (!in[0]) in[0]=new GridInlet((FObject *)this,stromgol);
-	in[0]->from_list(argc,argv,cast);}
+	in[0]->from_list(argc,argv,cast);
+	if (!argc && !dim) out = new GridOutlet(this,0,new Dim(0),cast);
+}
 \def 1 per_message() {dim=0; dim_grid=0;}
 
 \def 0 reset() {int32 foo[1]={0}; if (out) while (out->dim) out->send(1,foo);}



More information about the Gridflow-cvs mailing list