diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2002-12-30 04:32:19 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2002-12-30 04:32:19 +0000 |
commit | 62530f3fc55d3dc1c12bcd3b88f0922c15cd82e5 (patch) | |
tree | a57fc5a54ed78f189f074724396f81330faf9a3b /externals/grill/flext/source/flout.cpp | |
parent | 562dcc336797951b2a8707413aa44177484c9f2a (diff) |
""
svn path=/trunk/; revision=310
Diffstat (limited to 'externals/grill/flext/source/flout.cpp')
-rw-r--r-- | externals/grill/flext/source/flout.cpp | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/externals/grill/flext/source/flout.cpp b/externals/grill/flext/source/flout.cpp index e8341e9e..2ad12597 100644 --- a/externals/grill/flext/source/flout.cpp +++ b/externals/grill/flext/source/flout.cpp @@ -14,7 +14,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "flext.h" #include "flinternal.h" - +#include <string.h> #ifndef FLEXT_THREADS void flext_base::ToOutBang(outlet *o) const { CRITON(); outlet_bang((t_outlet *)o); CRITOFF(); } @@ -50,6 +50,22 @@ bool flext_base::InitInlets() xlet::type *list = new xlet::type[incnt]; int i; for(xi = inlist,i = 0; xi; xi = xi->nxt,++i) list[i] = xi->tp; + +#if FLEXT_SYS == FLEXT_SYS_MAX + // copy inlet descriptions + indesc = new char *[incnt]; + for(xi = inlist,i = 0; xi; xi = xi->nxt,++i) { + int l = xi->desc?strlen(xi->desc):0; + if(l) { + indesc[i] = new char[l+1]; + memcpy(indesc[i],xi->desc,l); + indesc[i][l] = 0; + } + else + indesc[i] = NULL; + } +#endif + delete inlist; inlist = NULL; inlets = new px_object *[incnt]; @@ -174,7 +190,7 @@ bool flext_base::InitInlets() } } - incnt = cnt; +// incnt = cnt; if(insigs) // dsp_setup(thisHdr(),insigs); // signal inlets @@ -216,6 +232,22 @@ bool flext_base::InitOutlets() xlet::type *list = new xlet::type[outcnt]; int i; for(xi = outlist,i = 0; xi; xi = xi->nxt,++i) list[i] = xi->tp; + +#if FLEXT_SYS == FLEXT_SYS_MAX + // copy outlet descriptions + outdesc = new char *[outcnt]; + for(xi = outlist,i = 0; xi; xi = xi->nxt,++i) { + int l = xi->desc?strlen(xi->desc):0; + if(l) { + outdesc[i] = new char[l+1]; + memcpy(outdesc[i],xi->desc,l); + outdesc[i][l] = 0; + } + else + outdesc[i] = NULL; + } +#endif + delete outlist; outlist = NULL; outlets = new outlet *[outcnt]; @@ -256,7 +288,7 @@ bool flext_base::InitOutlets() #endif } } - + delete[] list; } |