Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21389
Modified Files: Tag: branch-v0-40-extended g_text.c m_atom.c m_binbuf.c m_class.c m_imp.h m_obj.c m_pd.c m_pd.h x_interface.c Log Message: removed old version of string patch and applied new version that renames the type to 'blob'
Index: m_class.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_class.c,v retrieving revision 1.7.6.1 retrieving revision 1.7.6.2 diff -C2 -d -r1.7.6.1 -r1.7.6.2 *** m_class.c 4 Nov 2007 18:00:20 -0000 1.7.6.1 --- m_class.c 25 Nov 2007 03:31:05 -0000 1.7.6.2 *************** *** 21,25 **** static t_symbol *class_loadsym; /* name under which an extern is invoked */ static void pd_defaultfloat(t_pd *x, t_float f); ! static void pd_defaultstring(t_pd *x, t_string *st); /* MP20061226 string type */ static void pd_defaultlist(t_pd *x, t_symbol *s, int argc, t_atom *argv); t_pd pd_objectmaker; /* factory for creating "object" boxes */ --- 21,25 ---- static t_symbol *class_loadsym; /* name under which an extern is invoked */ static void pd_defaultfloat(t_pd *x, t_float f); ! static void pd_defaultblob(t_pd *x, t_blob *st); /* MP20061226 blob type */ static void pd_defaultlist(t_pd *x, t_symbol *s, int argc, t_atom *argv); t_pd pd_objectmaker; /* factory for creating "object" boxes */ *************** *** 40,46 **** }
! static void pd_defaultstring(t_pd *x, t_string *st) /* MP 20061226 string type */ { /* for now just reject it, later convert to symbol/float/list */ ! pd_error(x, "%s: no method for string so far...", (*x)->c_name->s_name); }
--- 40,46 ---- }
! static void pd_defaultblob(t_pd *x, t_blob *st) /* MP 20061226 blob type */ { /* for now just reject it, later convert to symbol/float/list */ ! pd_error(x, "%s: no method for blob so far...", (*x)->c_name->s_name); }
*************** *** 212,216 **** c->c_floatmethod = pd_defaultfloat; c->c_symbolmethod = pd_defaultsymbol; ! c->c_stringmethod = pd_defaultstring; /* MP 20061226 string type */ c->c_listmethod = pd_defaultlist; c->c_anymethod = pd_defaultanything; --- 212,216 ---- c->c_floatmethod = pd_defaultfloat; c->c_symbolmethod = pd_defaultsymbol; ! c->c_blobmethod = pd_defaultblob; /* MP 20061226 blob type */ c->c_listmethod = pd_defaultlist; c->c_anymethod = pd_defaultanything; *************** *** 296,304 **** class_addsymbol(c, fn); } ! else if (sel == &s_string) /* MP 20070106 string type */ { post("class_addmethod: %p", fn); ! if (argtype != A_STRING || va_arg(ap, t_atomtype)) goto phooey; ! class_addstring(c, fn); } else if (sel == &s_list) --- 296,304 ---- class_addsymbol(c, fn); } ! else if (sel == &s_blob) /* MP 20070106 blob type */ { post("class_addmethod: %p", fn); ! if (argtype != A_BLOB || va_arg(ap, t_atomtype)) goto phooey; ! class_addblob(c, fn); } else if (sel == &s_list) *************** *** 360,366 **** }
! void class_addstring(t_class *c, t_method fn) /* MP 20061226 string type */ { ! c->c_stringmethod = (t_stringmethod)fn; }
--- 360,366 ---- }
! void class_addblob(t_class *c, t_method fn) /* MP 20061226 blob type */ { ! c->c_blobmethod = (t_blobmethod)fn; }
*************** *** 587,594 **** t_symbol s_y = {"y", 0, 0}; t_symbol s_ = {"", 0, 0}; ! t_symbol s_string = {"string", 0, 0}; /* MP 20061223 string type */
static t_symbol *symlist[] = { &s_pointer, &s_float, &s_symbol, &s_bang, ! &s_list, &s_anything, &s_signal, &s__N, &s__X, &s_x, &s_y, &s_, &s_string}; /* MP 20061223 added s_string */
void mess_init(void) --- 587,594 ---- t_symbol s_y = {"y", 0, 0}; t_symbol s_ = {"", 0, 0}; ! t_symbol s_blob = {"blob", 0, 0}; /* MP 20061223 blob type */
static t_symbol *symlist[] = { &s_pointer, &s_float, &s_symbol, &s_bang, ! &s_list, &s_anything, &s_signal, &s__N, &s__X, &s_x, &s_y, &s_, &s_blob}; /* MP 20061223 added s_blob */
void mess_init(void) *************** *** 678,685 **** return; } ! if (s == &s_string) /* MP 20061226 string type */ { /*post("pd_typedmess argc = %d\n", argc);*//* MP 20061226 debug */ ! if (argc == 1) (*c->c_stringmethod)(x, argv->a_w.w_string); else goto badarg; return; --- 678,685 ---- return; } ! if (s == &s_blob) /* MP 20061226 blob type */ { /*post("pd_typedmess argc = %d\n", argc);*//* MP 20061226 debug */ ! if (argc == 1) (*c->c_blobmethod)(x, argv->a_w.w_blob); else goto badarg; return; *************** *** 729,739 **** dp++; break; ! case A_STRING:/* MP 20070106 string type */ ! /*post("pd_typedmess A_STRING");*/ if (!argc) goto badarg; ! if (argv->a_type == A_STRING) { ! /*post("argv->a_type == A_STRING, argc = %d, narg= %d", argc, narg);*/ ! *ap = (t_int)(argv->a_w.w_string); } argc--; --- 729,739 ---- dp++; break; ! case A_BLOB:/* MP 20070106 blob type */ ! /*post("pd_typedmess A_BLOB");*/ if (!argc) goto badarg; ! if (argv->a_type == A_BLOB) { ! /*post("argv->a_type == A_BLOB, argc = %d, narg= %d", argc, narg);*/ ! *ap = (t_int)(argv->a_w.w_blob); } argc--; *************** *** 817,823 **** case 's': SETSYMBOL(at, va_arg(ap, t_symbol *)); break; case 't': ! SETSTRING(at, va_arg(ap, t_string *)); ! /*post("pd_vmess: arg[0].a_w.w_string = %p", arg[0].a_w.w_string);*/ ! break; /* MP 20061226 string type */ case 'i': SETFLOAT(at, va_arg(ap, t_int)); break; case 'p': SETPOINTER(at, va_arg(ap, t_gpointer *)); break; --- 817,823 ---- case 's': SETSYMBOL(at, va_arg(ap, t_symbol *)); break; case 't': ! SETBLOB(at, va_arg(ap, t_blob *)); ! /*post("pd_vmess: arg[0].a_w.w_blob = %p", arg[0].a_w.w_blob);*/ ! break; /* MP 20061226 blob type */ case 'i': SETFLOAT(at, va_arg(ap, t_int)); break; case 'p': SETPOINTER(at, va_arg(ap, t_gpointer *)); break;
Index: g_text.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_text.c,v retrieving revision 1.15.6.4 retrieving revision 1.15.6.5 diff -C2 -d -r1.15.6.4 -r1.15.6.5 *** g_text.c 10 Nov 2007 19:42:33 -0000 1.15.6.4 --- g_text.c 25 Nov 2007 03:31:05 -0000 1.15.6.5 *************** *** 280,286 **** }
! static void messresponder_string(t_messresponder *x, t_string *st) ! { /* MP 20070107 string type */ ! outlet_string(x->mr_outlet, st); }
--- 280,286 ---- }
! static void messresponder_blob(t_messresponder *x, t_blob *st) ! { /* MP 20070107 blob type */ ! outlet_blob(x->mr_outlet, st); }
*************** *** 316,323 **** }
! static void message_string(t_message *x, t_string *st) { t_atom at; ! SETSTRING(&at, st); binbuf_eval(x->m_text.te_binbuf, &x->m_messresponder.mr_pd, 1, &at); } --- 316,323 ---- }
! static void message_blob(t_message *x, t_blob *st) { t_atom at; ! SETBLOB(&at, st); binbuf_eval(x->m_text.te_binbuf, &x->m_messresponder.mr_pd, 1, &at); } *************** *** 1389,1393 **** class_addfloat(message_class, message_float); class_addsymbol(message_class, message_symbol); ! class_addstring(message_class, message_string); class_addlist(message_class, message_list); class_addanything(message_class, message_list); --- 1389,1393 ---- class_addfloat(message_class, message_float); class_addsymbol(message_class, message_symbol); ! class_addblob(message_class, message_blob); class_addlist(message_class, message_list); class_addanything(message_class, message_list);
Index: m_atom.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_atom.c,v retrieving revision 1.4.6.1 retrieving revision 1.4.6.2 diff -C2 -d -r1.4.6.1 -r1.4.6.2 *** m_atom.c 4 Nov 2007 18:00:20 -0000 1.4.6.1 --- m_atom.c 25 Nov 2007 03:31:05 -0000 1.4.6.2 *************** *** 29,37 **** }
! t_string *atom_getstring(t_atom *a) /* MP 20070108 */ { ! static unsigned char c = 0;/* a default string to avoid null pointers. This should be somewhere else...? */ ! static t_string st = {1L, &c}; ! if (a->a_type == A_STRING) return (a->a_w.w_string); else return (&st); } --- 29,37 ---- }
! t_blob *atom_getblob(t_atom *a) /* MP 20070108 */ { ! static unsigned char c = 0;/* a default blob to avoid null pointers. This should be somewhere else...? */ ! static t_blob st = {1L, &c}; ! if (a->a_type == A_BLOB) return (a->a_w.w_blob); else return (&st); }
Index: m_binbuf.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_binbuf.c,v retrieving revision 1.13.6.1 retrieving revision 1.13.6.2 diff -C2 -d -r1.13.6.1 -r1.13.6.2 *** m_binbuf.c 4 Nov 2007 18:00:20 -0000 1.13.6.1 --- m_binbuf.c 25 Nov 2007 03:31:05 -0000 1.13.6.2 *************** *** 673,678 **** typedmess(target, stackwas->a_w.w_symbol, nargs-1, stackwas+1); break; ! case A_STRING: /* MP 20070106 string type */ ! if (nargs == 1) pd_string(target, stackwas->a_w.w_string); else pd_list(target, 0, nargs, stackwas); break; --- 673,678 ---- typedmess(target, stackwas->a_w.w_symbol, nargs-1, stackwas+1); break; ! case A_BLOB: /* MP 20070106 blob type */ ! if (nargs == 1) pd_blob(target, stackwas->a_w.w_blob); else pd_list(target, 0, nargs, stackwas); break;
Index: m_obj.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_obj.c,v retrieving revision 1.4.10.1 retrieving revision 1.4.10.2 diff -C2 -d -r1.4.10.1 -r1.4.10.2 *** m_obj.c 4 Nov 2007 18:00:20 -0000 1.4.10.1 --- m_obj.c 25 Nov 2007 03:31:05 -0000 1.4.10.2 *************** *** 16,20 **** t_float *iu_floatslot; t_symbol **iu_symslot; ! t_string **iu_stringslot; /* MP 20061226 string type */ t_sample iu_floatsignalvalue; }; --- 16,20 ---- t_float *iu_floatslot; t_symbol **iu_symslot; ! t_blob **iu_blobslot; /* MP 20061226 blob type */ t_sample iu_floatsignalvalue; }; *************** *** 34,41 **** #define i_floatslot i_un.iu_floatslot #define i_symslot i_un.iu_symslot ! #define i_stringslot i_un.iu_stringslot /* MP 20061226 string type */
static t_class *inlet_class, *pointerinlet_class, *floatinlet_class, ! *symbolinlet_class, *stringinlet_class; /* MP 20061226 added stringinlet_class */
#define ISINLET(pd) ((*(pd) == inlet_class) || \ --- 34,41 ---- #define i_floatslot i_un.iu_floatslot #define i_symslot i_un.iu_symslot ! #define i_blobslot i_un.iu_blobslot /* MP 20061226 blob type */
static t_class *inlet_class, *pointerinlet_class, *floatinlet_class, ! *symbolinlet_class, *blobinlet_class; /* MP 20061226 added blobinlet_class */
#define ISINLET(pd) ((*(pd) == inlet_class) || \ *************** *** 114,134 **** }
! static void inlet_string(t_inlet *x, t_string *st) /* MP20061226 string type */ { ! /*post("inlet_string (%p): st %p", &inlet_string, st);*/ ! if (x->i_symfrom == &s_string) { ! /*post("inlet_string calling pd_vmess");*/ pd_vmess(x->i_dest, x->i_symto, "t", st); } else if (!x->i_symfrom) { ! /*post("inlet_string calling pd_string");*/ ! pd_string(x->i_dest, st); } else { ! /*post("inlet_string calling inlet_wrong");*/ ! inlet_wrong(x, &s_string); } } --- 114,134 ---- }
! static void inlet_blob(t_inlet *x, t_blob *st) /* MP20061226 blob type */ { ! /*post("inlet_blob (%p): st %p", &inlet_blob, st);*/ ! if (x->i_symfrom == &s_blob) { ! /*post("inlet_blob calling pd_vmess");*/ pd_vmess(x->i_dest, x->i_symto, "t", st); } else if (!x->i_symfrom) { ! /*post("inlet_blob calling pd_blob");*/ ! pd_blob(x->i_dest, st); } else { ! /*post("inlet_blob calling inlet_wrong");*/ ! inlet_wrong(x, &s_blob); } } *************** *** 215,225 **** }
! t_inlet *stringinlet_new(t_object *owner, t_string **stp) /* MP 20061226 string type */ { ! t_inlet *x = (t_inlet *)pd_new(stringinlet_class), *y, *y2; x->i_owner = owner; x->i_dest = 0; ! x->i_symfrom = &s_string; ! x->i_stringslot = stp; x->i_next = 0; if (y = owner->ob_inlet) --- 215,225 ---- }
! t_inlet *blobinlet_new(t_object *owner, t_blob **stp) /* MP 20061226 blob type */ { ! t_inlet *x = (t_inlet *)pd_new(blobinlet_class), *y, *y2; x->i_owner = owner; x->i_dest = 0; ! x->i_symfrom = &s_blob; ! x->i_blobslot = stp; x->i_next = 0; if (y = owner->ob_inlet) *************** *** 284,288 **** class_addfloat(inlet_class, inlet_float); class_addsymbol(inlet_class, inlet_symbol); ! class_addstring(inlet_class, inlet_string); /* MP 20061226 string type */ class_addlist(inlet_class, inlet_list); class_addanything(inlet_class, inlet_anything); --- 284,288 ---- class_addfloat(inlet_class, inlet_float); class_addsymbol(inlet_class, inlet_symbol); ! class_addblob(inlet_class, inlet_blob); /* MP 20061226 blob type */ class_addlist(inlet_class, inlet_list); class_addanything(inlet_class, inlet_anything); *************** *** 407,413 **** }
! void outlet_string(t_outlet *x, t_string *st) /* MP 20061226 string type */ { ! /*post("outlet_string %p %lu", st, st->s_length);*/ t_outconnect *oc; if(++stackcount >= STACKITER) --- 407,413 ---- }
! void outlet_blob(t_outlet *x, t_blob *st) /* MP 20061226 blob type */ { ! /*post("outlet_blob %p %lu", st, st->s_length);*/ t_outconnect *oc; if(++stackcount >= STACKITER) *************** *** 415,419 **** else for (oc = x->o_connections; oc; oc = oc->oc_next) ! pd_string(oc->oc_to, st); --stackcount; } --- 415,419 ---- else for (oc = x->o_connections; oc; oc = oc->oc_next) ! pd_blob(oc->oc_to, st); --stackcount; }
Index: m_imp.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_imp.h,v retrieving revision 1.4.10.1 retrieving revision 1.4.10.2 diff -C2 -d -r1.4.10.1 -r1.4.10.2 *** m_imp.h 4 Nov 2007 18:00:20 -0000 1.4.10.1 --- m_imp.h 25 Nov 2007 03:31:05 -0000 1.4.10.2 *************** *** 26,30 **** typedef void (*t_floatmethod)(t_pd *x, t_float f); typedef void (*t_symbolmethod)(t_pd *x, t_symbol *s); ! typedef void (*t_stringmethod)(t_pd *x, t_string *st); /* MP20061226 string type */ typedef void (*t_listmethod)(t_pd *x, t_symbol *s, int argc, t_atom *argv); typedef void (*t_anymethod)(t_pd *x, t_symbol *s, int argc, t_atom *argv); --- 26,30 ---- typedef void (*t_floatmethod)(t_pd *x, t_float f); typedef void (*t_symbolmethod)(t_pd *x, t_symbol *s); ! typedef void (*t_blobmethod)(t_pd *x, t_blob *st); /* MP20061226 blob type */ typedef void (*t_listmethod)(t_pd *x, t_symbol *s, int argc, t_atom *argv); typedef void (*t_anymethod)(t_pd *x, t_symbol *s, int argc, t_atom *argv); *************** *** 43,47 **** t_floatmethod c_floatmethod; t_symbolmethod c_symbolmethod; ! t_stringmethod c_stringmethod; /* MP20061226 string type */ t_listmethod c_listmethod; t_anymethod c_anymethod; --- 43,47 ---- t_floatmethod c_floatmethod; t_symbolmethod c_symbolmethod; ! t_blobmethod c_blobmethod; /* MP20061226 blob type */ t_listmethod c_listmethod; t_anymethod c_anymethod;
Index: m_pd.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v retrieving revision 1.16.2.2.2.1 retrieving revision 1.16.2.2.2.2 diff -C2 -d -r1.16.2.2.2.1 -r1.16.2.2.2.2 *** m_pd.h 4 Nov 2007 18:00:20 -0000 1.16.2.2.2.1 --- m_pd.h 25 Nov 2007 03:31:05 -0000 1.16.2.2.2.2 *************** *** 103,114 **** } t_gpointer;
! #define PD_STRINGS 1 /* MP20070211 Use this to test for string capability */ ! /* MP20061223 string type: */ ! typedef struct _string /* pointer to a string */ { ! unsigned long s_length; /* length of string in bytes */ ! unsigned char *s_data; /* pointer to 1st byte of string */ ! } t_string; ! /* ...MP20061223 string type */
--- 103,114 ---- } t_gpointer;
! #define PD_BLOBS 1 /* MP20070211 Use this to test for blob capability */ ! /* MP20061223 blob type: */ ! typedef struct _blob /* pointer to a blob */ { ! unsigned long s_length; /* length of blob in bytes */ ! unsigned char *s_data; /* pointer to 1st byte of blob */ ! } t_blob; ! /* ...MP20061223 blob type */
*************** *** 121,125 **** struct _glist *w_list; int w_index; ! t_string *w_string; /* MP20061223 string type */ } t_word;
--- 121,125 ---- struct _glist *w_list; int w_index; ! t_blob *w_blob; /* MP20061223 blob type */ } t_word;
*************** *** 138,142 **** A_GIMME, A_CANT, ! A_STRING /* MP20061223 string type */ } t_atomtype;
--- 138,142 ---- A_GIMME, A_CANT, ! A_BLOB /* MP20061223 blob type */ } t_atomtype;
*************** *** 225,229 **** EXTERN t_symbol s_float; EXTERN t_symbol s_symbol; ! EXTERN t_symbol s_string; EXTERN t_symbol s_bang; EXTERN t_symbol s_list; --- 225,229 ---- EXTERN t_symbol s_float; EXTERN t_symbol s_symbol; ! EXTERN t_symbol s_blob; EXTERN t_symbol s_bang; EXTERN t_symbol s_list; *************** *** 269,273 **** #define SETSYMBOL(atom, s) ((atom)->a_type = A_SYMBOL, \ (atom)->a_w.w_symbol = (s)) ! #define SETSTRING(atom, st) ((atom)->a_type = A_STRING, (atom)->a_w.w_string = (st)) /* MP 20061226 string type */ #define SETDOLLAR(atom, n) ((atom)->a_type = A_DOLLAR, \ (atom)->a_w.w_index = (n)) --- 269,273 ---- #define SETSYMBOL(atom, s) ((atom)->a_type = A_SYMBOL, \ (atom)->a_w.w_symbol = (s)) ! #define SETBLOB(atom, st) ((atom)->a_type = A_BLOB, (atom)->a_w.w_blob = (st)) /* MP 20061226 blob type */ #define SETDOLLAR(atom, n) ((atom)->a_type = A_DOLLAR, \ (atom)->a_w.w_index = (n)) *************** *** 278,282 **** EXTERN t_int atom_getint(t_atom *a); EXTERN t_symbol *atom_getsymbol(t_atom *a); ! EXTERN t_string *atom_getstring(t_atom *a);/* MP 20070108 sring type */ EXTERN t_symbol *atom_gensym(t_atom *a); EXTERN t_float atom_getfloatarg(int which, int argc, t_atom *argv); --- 278,282 ---- EXTERN t_int atom_getint(t_atom *a); EXTERN t_symbol *atom_getsymbol(t_atom *a); ! EXTERN t_blob *atom_getblob(t_atom *a);/* MP 20070108 blob type */ EXTERN t_symbol *atom_gensym(t_atom *a); EXTERN t_float atom_getfloatarg(int which, int argc, t_atom *argv); *************** *** 342,346 **** EXTERN void pd_float(t_pd *x, t_float f); EXTERN void pd_symbol(t_pd *x, t_symbol *s); ! EXTERN void pd_string(t_pd *x, t_string *st); /* MP 20061226 string type */ EXTERN void pd_list(t_pd *x, t_symbol *s, int argc, t_atom *argv); EXTERN void pd_anything(t_pd *x, t_symbol *s, int argc, t_atom *argv); --- 342,346 ---- EXTERN void pd_float(t_pd *x, t_float f); EXTERN void pd_symbol(t_pd *x, t_symbol *s); ! EXTERN void pd_blob(t_pd *x, t_blob *st); /* MP 20061226 blob type */ EXTERN void pd_list(t_pd *x, t_symbol *s, int argc, t_atom *argv); EXTERN void pd_anything(t_pd *x, t_symbol *s, int argc, t_atom *argv); *************** *** 367,371 **** EXTERN void outlet_float(t_outlet *x, t_float f); EXTERN void outlet_symbol(t_outlet *x, t_symbol *s); ! EXTERN void outlet_string(t_outlet *x, t_string *st); /* MP 20061226 string type */ EXTERN void outlet_list(t_outlet *x, t_symbol *s, int argc, t_atom *argv); EXTERN void outlet_anything(t_outlet *x, t_symbol *s, int argc, t_atom *argv); --- 367,371 ---- EXTERN void outlet_float(t_outlet *x, t_float f); EXTERN void outlet_symbol(t_outlet *x, t_symbol *s); ! EXTERN void outlet_blob(t_outlet *x, t_blob *st); /* MP 20061226 blob type */ EXTERN void outlet_list(t_outlet *x, t_symbol *s, int argc, t_atom *argv); EXTERN void outlet_anything(t_outlet *x, t_symbol *s, int argc, t_atom *argv); *************** *** 424,428 **** EXTERN void class_doaddfloat(t_class *c, t_method fn); EXTERN void class_addsymbol(t_class *c, t_method fn); ! EXTERN void class_addstring(t_class *c, t_method fn);/* MP 20061226 string type */ EXTERN void class_addlist(t_class *c, t_method fn); EXTERN void class_addanything(t_class *c, t_method fn); --- 424,428 ---- EXTERN void class_doaddfloat(t_class *c, t_method fn); EXTERN void class_addsymbol(t_class *c, t_method fn); ! EXTERN void class_addblob(t_class *c, t_method fn);/* MP 20061226 blob type */ EXTERN void class_addlist(t_class *c, t_method fn); EXTERN void class_addanything(t_class *c, t_method fn); *************** *** 453,457 **** #define class_addfloat(x, y) class_doaddfloat((x), (t_method)(y)) #define class_addsymbol(x, y) class_addsymbol((x), (t_method)(y)) ! #define class_addstring(x, y) class_addstring((x), (t_method)(y)) /* MP20061226 string type */ #define class_addlist(x, y) class_addlist((x), (t_method)(y)) #define class_addanything(x, y) class_addanything((x), (t_method)(y)) --- 453,457 ---- #define class_addfloat(x, y) class_doaddfloat((x), (t_method)(y)) #define class_addsymbol(x, y) class_addsymbol((x), (t_method)(y)) ! #define class_addblob(x, y) class_addblob((x), (t_method)(y)) /* MP20061226 blob type */ #define class_addlist(x, y) class_addlist((x), (t_method)(y)) #define class_addanything(x, y) class_addanything((x), (t_method)(y))
Index: x_interface.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/x_interface.c,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -C2 -d -r1.3 -r1.3.6.1 *** x_interface.c 11 Aug 2006 20:09:07 -0000 1.3 --- x_interface.c 25 Nov 2007 03:31:05 -0000 1.3.6.1 *************** *** 16,22 **** } t_print;
! static void *print_new(t_symbol *s) { t_print *x = (t_print *)pd_new(print_class); if (*s->s_name) x->x_sym = s; else x->x_sym = gensym("print"); --- 16,25 ---- } t_print;
! static void *print_new(t_symbol *s, int argc, t_atom *argv) { t_print *x = (t_print *)pd_new(print_class); + x->x_sym = atom_getsymbolarg(0,argc,argv); + if (x->x_sym == &s_) + x->x_sym = atom_getfloatarg(0,argc,argv); if (*s->s_name) x->x_sym = s; else x->x_sym = gensym("print"); *************** *** 61,65 **** { print_class = class_new(gensym("print"), (t_newmethod)print_new, 0, ! sizeof(t_print), 0, A_DEFSYM, 0); class_addbang(print_class, print_bang); class_addfloat(print_class, print_float); --- 64,68 ---- { print_class = class_new(gensym("print"), (t_newmethod)print_new, 0, ! sizeof(t_print), 0, A_GIMME, 0); class_addbang(print_class, print_bang); class_addfloat(print_class, print_float);
Index: m_pd.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_pd.c,v retrieving revision 1.4.10.1 retrieving revision 1.4.10.2 diff -C2 -d -r1.4.10.1 -r1.4.10.2 *** m_pd.c 4 Nov 2007 18:00:20 -0000 1.4.10.1 --- m_pd.c 25 Nov 2007 03:31:05 -0000 1.4.10.2 *************** *** 285,292 **** }
! void pd_string(t_pd *x, t_string *st) /* MP20061226 string type */ { ! /*post("pd_string: st %p length %lu (*x)->c_stringmethod %p", st, st->s_length, (*x)->c_stringmethod);*/ ! (*(*x)->c_stringmethod)(x, st); }
--- 285,292 ---- }
! void pd_blob(t_pd *x, t_blob *st) /* MP20061226 blob type */ { ! /*post("pd_blob: st %p length %lu (*x)->c_blobmethod %p", st, st->s_length, (*x)->c_blobmethod);*/ ! (*(*x)->c_blobmethod)(x, st); }