Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24503
Modified Files: Tag: desiredata m_pd.h Log Message: added t_string, A_STRING
Index: m_pd.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v retrieving revision 1.4.4.11.2.33.2.17 retrieving revision 1.4.4.11.2.33.2.18 diff -C2 -d -r1.4.4.11.2.33.2.17 -r1.4.4.11.2.33.2.18 *** m_pd.h 20 Dec 2006 09:16:12 -0000 1.4.4.11.2.33.2.17 --- m_pd.h 20 Dec 2006 09:58:39 -0000 1.4.4.11.2.33.2.18 *************** *** 96,99 **** --- 96,106 ---- } t_symbol;
+ typedef struct _string { + char *s_name; /* the const string that represents this symbol */ + size_t refcount; + struct _symbol *s_next; /* brochette of all strings */ + size_t s_size; /* size of string (DesireData support for NUL) */ + } t_string; + EXTERN_STRUCT _array; #define t_array struct _array /* g_canvas.h */ *************** *** 129,132 **** --- 136,140 ---- t_float w_float; /* A_FLOAT */ t_symbol *w_symbol; /* A_SYMBOL */ + t_string *w_string; /* A_STRING */ t_gpointer *w_gpointer; /* A_POINTER */ t_array *w_array; /* DS nested array? */ *************** *** 142,146 **** A_DOLLAR, A_DOLLSYM, /* radioactive elements of the second kind */ A_GIMME, /* non-type: represents varargs */ ! A_CANT /* bottom type */ } t_atomtype;
--- 150,155 ---- A_DOLLAR, A_DOLLSYM, /* radioactive elements of the second kind */ A_GIMME, /* non-type: represents varargs */ ! A_CANT, /* bottom type */ ! A_STRING /* symbol-like type (future use) */ } t_atomtype;
*************** *** 279,296 **** EXTERN t_pd pd_objectmaker; /* factory for creating "object" boxes */ EXTERN t_pd pd_canvasmaker; /* factory for creating canvases */ ! EXTERN t_symbol s_pointer; ! EXTERN t_symbol s_float; ! EXTERN t_symbol s_symbol; ! EXTERN t_symbol s_bang; ! EXTERN t_symbol s_list; ! EXTERN t_symbol s_anything; ! EXTERN t_symbol s_signal; ! EXTERN t_symbol s__N; ! EXTERN t_symbol s__X; ! EXTERN t_symbol s_x; ! EXTERN t_symbol s_y; ! EXTERN t_symbol s_;
! /* --------- prototypes from the central message system ----------- */ EXTERN void pd_typedmess(t_pd *x, t_symbol *s, int argc, t_atom *argv); EXTERN void pd_forwardmess(t_pd *x, int argc, t_atom *argv); --- 288,296 ---- EXTERN t_pd pd_objectmaker; /* factory for creating "object" boxes */ EXTERN t_pd pd_canvasmaker; /* factory for creating canvases */ ! EXTERN t_symbol s_pointer, s_float, s_symbol; ! EXTERN t_symbol s_bang, s_list, s_anything, s_signal; ! EXTERN t_symbol s__N, s__X, s_x, s_y, s_;
! /* --------- central message system ----------- */ EXTERN void pd_typedmess(t_pd *x, t_symbol *s, int argc, t_atom *argv); EXTERN void pd_forwardmess(t_pd *x, int argc, t_atom *argv); *************** *** 323,328 **** /* -------------------- atoms ----------------------------- */
! #define SETSEMI(atom) ((atom)->a_type = A_SEMI, (atom)->a_w.w_index = 0) ! #define SETCOMMA(atom) ((atom)->a_type = A_COMMA, (atom)->a_w.w_index = 0) #define SETPOINTER(atom, gp) ((atom)->a_type = A_POINTER, (atom)->a_w.w_gpointer = (gp)) #define SETFLOAT(atom, f) ((atom)->a_type = A_FLOAT, (atom)->a_w.w_float = (f)) --- 323,328 ---- /* -------------------- atoms ----------------------------- */
! #define SETSEMI(atom) ((atom)->a_type = A_SEMI, (atom)->a_w.w_index = 0) ! #define SETCOMMA(atom) ((atom)->a_type = A_COMMA, (atom)->a_w.w_index = 0) #define SETPOINTER(atom, gp) ((atom)->a_type = A_POINTER, (atom)->a_w.w_gpointer = (gp)) #define SETFLOAT(atom, f) ((atom)->a_type = A_FLOAT, (atom)->a_w.w_float = (f)) *************** *** 332,344 **** #define SETSTRING(atom, s) ((atom)->a_type = A_SYMBOL, (atom)->a_w.w_symbol = gensym(s))
! EXTERN t_float atom_getfloat(t_atom *a); ! EXTERN t_int atom_getint(t_atom *a); EXTERN t_symbol *atom_getsymbol(t_atom *a); ! EXTERN t_symbol *atom_gensym(t_atom *a); ! EXTERN t_float atom_getfloatarg(int which, int argc, t_atom *argv); ! EXTERN t_int atom_getintarg(int which, int argc, t_atom *argv); EXTERN t_symbol *atom_getsymbolarg(int which, int argc, t_atom *argv);
! EXTERN void atom_string(t_atom *a, char *buf, unsigned int bufsize);
/* ------------------ binbufs --------------- */ --- 332,346 ---- #define SETSTRING(atom, s) ((atom)->a_type = A_SYMBOL, (atom)->a_w.w_symbol = gensym(s))
! EXTERN t_float atom_getfloat( t_atom *a); ! EXTERN t_int atom_getint( t_atom *a); EXTERN t_symbol *atom_getsymbol(t_atom *a); ! EXTERN t_string *atom_getstring(t_atom *a); /* for future use */ ! EXTERN t_symbol *atom_gensym( t_atom *a); ! EXTERN t_float atom_getfloatarg( int which, int argc, t_atom *argv); ! EXTERN t_int atom_getintarg( int which, int argc, t_atom *argv); EXTERN t_symbol *atom_getsymbolarg(int which, int argc, t_atom *argv); + EXTERN t_string *atom_getstringarg(int which, int argc, t_atom *argv); /* for future use */
! EXTERN void atom_string(t_atom *a, char *buf, unsigned int bufsize); /* has nothing to do with A_STRING */
/* ------------------ binbufs --------------- */ *************** *** 382,397 **** EXTERN t_pd *pd_new(t_class *cls); EXTERN void pd_free(t_pd *x); ! EXTERN void pd_bind(t_pd *x, t_symbol *s); EXTERN void pd_unbind(t_pd *x, t_symbol *s); EXTERN t_pd *pd_findbyclass(t_symbol *s, t_class *c); EXTERN void pd_pushsym(t_pd *x); ! EXTERN void pd_popsym(t_pd *x); EXTERN t_symbol *pd_getfilename(void); EXTERN t_symbol *pd_getdirname(void); ! EXTERN void pd_bang(t_pd *x); ! EXTERN void pd_pointer(t_pd *x, t_gpointer *gp); ! EXTERN void pd_float(t_pd *x, t_float f); ! EXTERN void pd_symbol(t_pd *x, t_symbol *s); ! 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);
--- 384,400 ---- EXTERN t_pd *pd_new(t_class *cls); EXTERN void pd_free(t_pd *x); ! EXTERN void pd_bind( t_pd *x, t_symbol *s); EXTERN void pd_unbind(t_pd *x, t_symbol *s); EXTERN t_pd *pd_findbyclass(t_symbol *s, t_class *c); EXTERN void pd_pushsym(t_pd *x); ! EXTERN void pd_popsym( t_pd *x); EXTERN t_symbol *pd_getfilename(void); EXTERN t_symbol *pd_getdirname(void); ! EXTERN void pd_bang( t_pd *x); ! EXTERN void pd_pointer( t_pd *x, t_gpointer *gp); ! 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 *s); /* for future use */ ! 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);
*************** *** 421,438 **** #define t_outlet struct _outlet */ ! EXTERN t_inlet *inlet_new(t_object *owner, t_pd *dest, t_symbol *s1, ! t_symbol *s2); EXTERN t_inlet *pointerinlet_new(t_object *owner, t_gpointer *gp); EXTERN t_inlet *floatinlet_new(t_object *owner, t_float *fp); EXTERN t_inlet *symbolinlet_new(t_object *owner, t_symbol **sp); EXTERN t_inlet *signalinlet_new(t_object *owner, t_float f); EXTERN void inlet_free(t_inlet *x);
EXTERN t_outlet *outlet_new(t_object *owner, t_symbol *s); ! EXTERN void outlet_bang(t_outlet *x); ! EXTERN void outlet_pointer(t_outlet *x, t_gpointer *gp); ! EXTERN void outlet_float(t_outlet *x, t_float f); ! EXTERN void outlet_symbol(t_outlet *x, t_symbol *s); ! 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); EXTERN t_symbol *outlet_getsymbol(t_outlet *x); --- 424,442 ---- #define t_outlet struct _outlet */ ! EXTERN t_inlet *inlet_new(t_object *owner, t_pd *dest, t_symbol *s1, t_symbol *s2); EXTERN t_inlet *pointerinlet_new(t_object *owner, t_gpointer *gp); EXTERN t_inlet *floatinlet_new(t_object *owner, t_float *fp); EXTERN t_inlet *symbolinlet_new(t_object *owner, t_symbol **sp); + EXTERN t_inlet *stringinlet_new(t_object *owner, t_symbol **sp); /* for future use */ EXTERN t_inlet *signalinlet_new(t_object *owner, t_float f); EXTERN void inlet_free(t_inlet *x);
EXTERN t_outlet *outlet_new(t_object *owner, t_symbol *s); ! EXTERN void outlet_bang( t_outlet *x); ! EXTERN void outlet_pointer( t_outlet *x, t_gpointer *gp); ! 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 *s); /* for future use */ ! 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); EXTERN t_symbol *outlet_getsymbol(t_outlet *x); *************** *** 444,448 ****
EXTERN void glob_setfilename(void *dummy, t_symbol *name, t_symbol *dir); - EXTERN void canvas_setargs(int argc, t_atom *argv); EXTERN void canvas_getargs(int *argcp, t_atom **argvp); --- 448,451 ---- *************** *** 474,487 **** EXTERN t_class *class_new(t_symbol *name, t_newmethod newmethod, t_method freemethod, size_t size, int flags, t_atomtypearg arg1, ...); ! EXTERN void class_addcreator(t_newmethod newmethod, t_symbol *s, ! t_atomtypearg type1, ...); ! EXTERN void class_addmethod(t_class *c, t_method fn, t_symbol *sel, ! t_atomtypearg arg1, ...); EXTERN void class_addmethod2(t_class *c, t_method fn, t_symbol *sel, const char *sig); ! EXTERN void class_addbang(t_class *c, t_method fn); ! EXTERN void class_addpointer(t_class *c, t_method fn); ! EXTERN void class_doaddfloat(t_class *c, t_method fn); ! EXTERN void class_addsymbol(t_class *c, t_method fn); ! EXTERN void class_addlist(t_class *c, t_method fn); EXTERN void class_addanything(t_class *c, t_method fn); EXTERN void class_sethelpsymbol(t_class *c, t_symbol *s); --- 477,489 ---- EXTERN t_class *class_new(t_symbol *name, t_newmethod newmethod, t_method freemethod, size_t size, int flags, t_atomtypearg arg1, ...); ! EXTERN void class_addcreator(t_newmethod newmethod, t_symbol *sel, t_atomtypearg arg1, ...); ! EXTERN void class_addmethod(t_class *c, t_method fn, t_symbol *sel, t_atomtypearg arg1, ...); EXTERN void class_addmethod2(t_class *c, t_method fn, t_symbol *sel, const char *sig); ! EXTERN void class_addbang( t_class *c, t_method fn); ! EXTERN void class_addpointer( t_class *c, t_method fn); ! 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); /* for future use */ ! EXTERN void class_addlist( t_class *c, t_method fn); EXTERN void class_addanything(t_class *c, t_method fn); EXTERN void class_sethelpsymbol(t_class *c, t_symbol *s); *************** *** 507,510 **** --- 509,513 ---- #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)) /* for future use */ #define class_addlist(x, y) class_addlist((x), (t_method)(y)) #define class_addanything(x, y) class_addanything((x), (t_method)(y)) *************** *** 775,787 **** /*------------- Max 0.26 compatibility --------------------*/
- /* the following reflects the new way classes are laid out, with the class - pointing to the messlist and not vice versa. Externs shouldn't feel it. */ - typedef t_class *t_externclass; - - EXTERN void c_extern(t_externclass *cls, t_newmethod newroutine, - t_method freeroutine, t_symbol *name, size_t size, int tiny, \ - t_atomtype arg1, ...); - EXTERN void c_addmess(t_method fn, t_symbol *sel, t_atomtype arg1, ...); - #define t_getbytes getbytes #define t_freebytes freebytes --- 778,781 ---- *************** *** 795,799 **** #define PD_USE_TE_XPIX
- #ifdef __i386__ /* a test for NANs and denormals. Should only be necessary on i386. */ --- 789,792 ----