[PD-cvs] externals/miXed/shared/common port.c,1.11,1.12
Krzysztof Czaja
krzyszcz at users.sourceforge.net
Fri Apr 23 13:25:55 CEST 2004
Update of /cvsroot/pure-data/externals/miXed/shared/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15191/shared/common
Modified Files:
port.c
Log Message:
Index: port.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/shared/common/port.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** port.c 21 Apr 2004 14:47:34 -0000 1.11
--- port.c 23 Apr 2004 11:25:53 -0000 1.12
***************
*** 90,93 ****
--- 90,94 ----
static t_symbol *portps_coll;
static t_symbol *portps_funbuff;
+ static t_symbol *portps_prob;
static t_symbol *portps_picture;
***************
*** 510,513 ****
--- 511,520 ----
}
+ static int imaction_N1_prob(t_port *x, char *arg)
+ {
+ import_emstart(x, portps_prob, &s_, 0);
+ return (PORT_NEXT);
+ }
+
static int imaction_N1_picture(t_port *x, char *arg)
{
***************
*** 584,587 ****
--- 591,604 ----
}
+ static int imaction_P6_prob(t_port *x, char *arg)
+ {
+ binbuf_addv(x->x_outbb, "ssffs;",
+ gensym("#X"), gensym("obj"),
+ port_getx(x, 2), port_gety(x, 3), portps_prob);
+ import_emflush(x, portps_prob, &s_);
+ x->x_nobj++;
+ return (PORT_NEXT);
+ }
+
/* LATER use hammer replacements */
static int imaction_P6_pack(t_port *x, char *arg)
***************
*** 756,760 ****
static int imaction_T1_int(t_port *x, char *arg)
{
! import_emcopy(x, portps_coll);
return (PORT_NEXT);
}
--- 773,782 ----
static int imaction_T1_int(t_port *x, char *arg)
{
! if (x->x_emstate == portps_coll)
! import_emcopy(x, portps_coll);
! else if (x->x_emstate == portps_prob)
! import_emcopy(x, portps_prob);
! else
! import_unexpected(x);
return (PORT_NEXT);
}
***************
*** 768,781 ****
static int imaction_T1_set(t_port *x, char *arg)
{
! /* FIXME funbuff */
! if (import_emcopy(x, portps_vtable))
{
! int count = port_getint(x, 2);
! if (count != x->x_emcount)
! loud_warning(0, "import",
! "[%d] bad vtable chunk index %d (%d already taken)",
! x->x_messcount, count, x->x_emcount);
! x->x_emcount += x->x_inatoms - 3;
}
return (PORT_NEXT);
}
--- 790,821 ----
static int imaction_T1_set(t_port *x, char *arg)
{
! if (x->x_emstate == portps_vtable)
{
! if (import_emcopy(x, portps_vtable))
! {
! int count = port_getint(x, 2);
! if (count != x->x_emcount)
! loud_warning(0, "import",
! "[%d] bad vtable chunk index %d (%d already taken)",
! x->x_messcount, count, x->x_emcount);
! x->x_emcount += x->x_inatoms - 3;
! }
}
+ else if (x->x_emstate == portps_funbuff)
+ import_emcopy(x, portps_funbuff);
+ else
+ import_unexpected(x);
+ return (PORT_NEXT);
+ }
+
+ static int imaction_T1_reset(t_port *x, char *arg)
+ {
+ import_emcopy(x, portps_prob);
+ return (PORT_NEXT);
+ }
+
+ static int imaction_T1_embed(t_port *x, char *arg)
+ {
+ import_emcopy(x, portps_prob);
return (PORT_NEXT);
}
***************
*** 862,865 ****
--- 902,906 ----
{ "coll", imaction_N1_coll, 0, 0, 0 },
{ "funbuff", imaction_N1_funbuff, 0, 0, 0 },
+ { "prob", imaction_N1_prob, 0, 0, 0 },
{ "picture", imaction_N1_picture, 0, 0, 0 }
};
***************
*** 872,876 ****
{ "table", imaction_P6_table, 0, 0, 0 },
{ "coll", imaction_P6_coll, 0, 0, 0 },
! { "funbuff", imaction_P6_funbuff, 0, 0, 0 }
};
static t_portnode imnode_newobj = { imslots_newobj,
--- 913,918 ----
{ "table", imaction_P6_table, 0, 0, 0 },
{ "coll", imaction_P6_coll, 0, 0, 0 },
! { "funbuff", imaction_P6_funbuff, 0, 0, 0 },
! { "prob", imaction_P6_prob, 0, 0, 0 }
};
static t_portnode imnode_newobj = { imslots_newobj,
***************
*** 964,968 ****
{ "int", imaction_T1_int, 0, 0, 0 },
{ "flags", imaction_T1_flags, 0, 0, 0 },
! { "set", imaction_T1_set, 0, 0, 0 }
};
static t_portnode imnode__T = { imslots__T, PORT_NSLOTS(imslots__T), 1 };
--- 1006,1012 ----
{ "int", imaction_T1_int, 0, 0, 0 },
{ "flags", imaction_T1_flags, 0, 0, 0 },
! { "set", imaction_T1_set, 0, 0, 0 },
! { "reset", imaction_T1_reset, 0, 0, 0 },
! { "embed", imaction_T1_embed, 0, 0, 0 }
};
static t_portnode imnode__T = { imslots__T, PORT_NSLOTS(imslots__T), 1 };
***************
*** 1293,1296 ****
--- 1337,1341 ----
portps_coll = gensym("coll");
portps_funbuff = gensym("funbuff");
+ portps_prob = gensym("prob");
portps_picture = gensym("picture");
More information about the Pd-cvs
mailing list