Update of /cvsroot/pure-data/externals/iem/iemmatrix/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5253
Modified Files: mtx_print.c Log Message: added labels when printing
Index: mtx_print.c =================================================================== RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_print.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** mtx_print.c 21 Mar 2005 14:33:31 -0000 1.1.1.1 --- mtx_print.c 30 Mar 2005 12:06:29 -0000 1.2 *************** *** 14,23 **** #include "iemmatrix.h"
- #include "iemmatrix.h"
/* mtx_print */ static t_class *mtx_print_class; ! static void mtx_print(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int col, row; --- 14,27 ---- #include "iemmatrix.h"
+ typedef struct _mtxprint + { + t_object x_obj; + t_symbol *x_s; + } t_mtxprint;
/* mtx_print */ static t_class *mtx_print_class; ! static void mtx_print(t_mtxprint *x, t_symbol *s, int argc, t_atom *argv) { int col, row; *************** *** 32,36 **** return; } ! post("matrix:"); while(row--){ postatom(col, argv); --- 36,40 ---- return; } ! post("%s:", x->x_s->s_name); while(row--){ postatom(col, argv); *************** *** 40,48 **** endpost(); } ! static void *mtx_print_new(void) { ! t_matrix *x = (t_matrix *)pd_new(mtx_print_class); ! x->row = x->col = 0; ! x->atombuffer = 0; return (x); } --- 44,51 ---- endpost(); } ! static void *mtx_print_new(t_symbol*s) { ! t_mtxprint *x = (t_mtxprint *)pd_new(mtx_print_class); ! x->x_s=(s&&s!=&s_)?s:gensym("matrix"); return (x); } *************** *** 50,54 **** { mtx_print_class = class_new(gensym("mtx_print"), (t_newmethod)mtx_print_new, ! 0, sizeof(t_matrix), 0, 0, 0); class_addmethod (mtx_print_class, (t_method)mtx_print, gensym("matrix"), A_GIMME, 0); class_sethelpsymbol(mtx_print_class, gensym("iemmatrix/matrix")); --- 53,57 ---- { mtx_print_class = class_new(gensym("mtx_print"), (t_newmethod)mtx_print_new, ! 0, sizeof(t_mtxprint), 0, A_DEFSYM, 0); class_addmethod (mtx_print_class, (t_method)mtx_print, gensym("matrix"), A_GIMME, 0); class_sethelpsymbol(mtx_print_class, gensym("iemmatrix/matrix"));