From 9c0e19a3be2288db79e2502e5fa450c3e20a668d Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Fri, 9 May 2003 16:04:00 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r610, which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=611 --- pd/src/g_template.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'pd/src/g_template.c') diff --git a/pd/src/g_template.c b/pd/src/g_template.c index 8dc897a3..67c35413 100644 --- a/pd/src/g_template.c +++ b/pd/src/g_template.c @@ -6,7 +6,8 @@ #include #include -#include "m_imp.h" /* for sys_hostfontsize */ +#include "m_pd.h" +#include "s_stuff.h" /* for sys_hostfontsize */ #include "g_canvas.h" /* @@ -15,6 +16,9 @@ template. Templates describe objects of type "array" (g_array.c) and "scalar" (g_scalar.c). */ +/* T.Grill - changed the _template.t_pd member to t_pdobj to avoid name clashes +with the t_pd type */ + /* the structure of a "struct" object (also the obsolete "gtemplate" you get when using the name "template" in a box.) */ @@ -122,7 +126,7 @@ t_template *template_new(t_symbol *templatesym, int argc, t_atom *argv) if (templatesym->s_name) { x->t_sym = templatesym; - pd_bind(&x->t_pd, x->t_sym); + pd_bind(&x->t_pdobj, x->t_sym); } else x->t_sym = templatesym; return (x); @@ -496,11 +500,11 @@ static void *template_usetemplate(void *dummy, t_symbol *s, { /* conform everyone to the new template */ template_conform(x, y); - pd_free(&x->t_pd); + pd_free(&x->t_pdobj); template_new(templatesym, argc, argv); } } - pd_free(&y->t_pd); + pd_free(&y->t_pdobj); } /* otherwise, just make one. */ else template_new(templatesym, argc, argv); @@ -511,7 +515,7 @@ static void *template_usetemplate(void *dummy, t_symbol *s, void template_free(t_template *x) { if (*x->t_sym->s_name) - pd_unbind(&x->t_pd, x->t_sym); + pd_unbind(&x->t_pdobj, x->t_sym); t_freebytes(x->t_vec, x->t_n * sizeof(*x->t_vec)); } @@ -572,10 +576,10 @@ static void *gtemplate_donew(t_symbol *sym, int argc, t_atom *argv) { /* conform everyone to the new template */ template_conform(t, y); - pd_free(&t->t_pd); + pd_free(&t->t_pdobj); t = template_new(sym, argc, argv); } - pd_free(&y->t_pd); + pd_free(&y->t_pdobj); t->t_list = x; } } @@ -630,8 +634,8 @@ static void gtemplate_free(t_gtemplate *x) first-on-list and replace teh existing template with it. */ t_template *z = template_new(&s_, x->x_argc, x->x_argv); template_conform(t, z); - pd_free(&t->t_pd); - pd_free(&z->t_pd); + pd_free(&t->t_pdobj); + pd_free(&z->t_pdobj); z = template_new(x->x_sym, x->x_argc, x->x_argv); z->t_list = x->x_next; } @@ -1668,7 +1672,7 @@ void g_template_setup(void) { template_setup(); gtemplate_setup(); - template_float.t_pd = template_class; + template_float.t_pdobj = template_class; curve_setup(); plot_setup(); drawnumber_setup(); -- cgit v1.2.1