Update of /cvsroot/pure-data/externals/grill/delsplit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14717
Modified Files: delsplit-help.pd main.cpp Log Message: updated for any messages to be processed (not only symbols) rename help file more fixes
Index: main.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/delsplit/main.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** main.cpp 7 Apr 2005 15:00:29 -0000 1.6 --- main.cpp 3 Nov 2005 20:36:57 -0000 1.7 *************** *** 23,27 ****
! #define VERSION "0.1.4"
#ifdef __MWERKS__ --- 23,27 ----
! #define VERSION "0.1.5"
#ifdef __MWERKS__ *************** *** 41,45 ****
protected: ! void m_list(const t_symbol *s); void m_del(const t_symbol *s,int argc,const t_atom *argv); --- 41,45 ----
protected: ! void m_any(const t_symbol *s,int argc,const t_atom *argv); void m_del(const t_symbol *s,int argc,const t_atom *argv); *************** *** 52,56 **** static const t_symbol *sym__space; ! FLEXT_CALLBACK_S(m_list) FLEXT_CALLBACK_A(m_del) FLEXT_ATTRVAR_S(delim) --- 52,56 ---- static const t_symbol *sym__space; ! FLEXT_CALLBACK_A(m_any) FLEXT_CALLBACK_A(m_del) FLEXT_ATTRVAR_S(delim) *************** *** 66,70 **** sym__space = MakeSymbol(" ");
! FLEXT_CADDMETHOD(c,0,m_list); FLEXT_CADDMETHOD(c,1,m_del); FLEXT_CADDATTR_VAR1(c,"del",delim); --- 66,70 ---- sym__space = MakeSymbol(" ");
! FLEXT_CADDMETHOD(c,0,m_any); FLEXT_CADDMETHOD(c,1,m_del); FLEXT_CADDATTR_VAR1(c,"del",delim); *************** *** 128,132 **** }
! void delsplit::m_list(const t_symbol *sym) { FLEXT_ASSERT(delim); --- 128,132 ---- }
! void delsplit::m_any(const t_symbol *sym,int argc,const t_atom *argv) { FLEXT_ASSERT(delim); *************** *** 136,154 **** const char *sdel = GetString(delim); int ldel = strlen(sdel); ! char str[1024]; ! strcpy(str,GetString(sym)); ! ! for(const char *s = str; *s; ) { ! char *e = strstr(s,sdel); ! if(!e) { ! SetAtom(lst[cnt++],s); ! break; ! } ! else { ! *e = 0; ! SetAtom(lst[cnt++],s); ! s = e+ldel; } ! } ToOutList(0,cnt,lst); --- 136,173 ---- const char *sdel = GetString(delim); int ldel = strlen(sdel); ! ! for(int i = -1; i < argc; ++i) { ! char str[1024]; ! if(i < 0) { ! if( ! sym != sym_list && sym != sym_float && sym != sym_symbol && sym != sym_bang ! #if FLEXT_SYS == FLEXT_SYS_MAX ! && sym != sym_int ! #endif ! ) ! strcpy(str,GetString(sym)); ! else ! str[0] = 0; } ! else if(IsString(argv[i])) ! strcpy(str,GetString(argv[i])); ! else if(CanbeFloat(argv[i])) ! sprintf(str,"%e",GetAFloat(argv[i])); ! else ! str[0] = 0; ! ! for(const char *s = str; *s; ) { ! char *e = strstr(s,sdel); ! if(!e) { ! SetAtom(lst[cnt++],s); ! break; ! } ! else { ! *e = 0; ! SetAtom(lst[cnt++],s); ! s = e+ldel; ! } ! } ! } ToOutList(0,cnt,lst);
Index: delsplit-help.pd =================================================================== RCS file: /cvsroot/pure-data/externals/grill/delsplit/delsplit-help.pd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** delsplit-help.pd 11 Aug 2005 15:03:14 -0000 1.1 --- delsplit-help.pd 3 Nov 2005 20:36:57 -0000 1.2 *************** *** 1,12 **** ! #N canvas 300 90 458 286 12; #X msg 264 133 symbol -; #X msg 232 57 list; #X msg 242 84 list +; #X obj 105 229 print; ! #X obj 43 69 tosymbol; ! #X msg 42 42 ask+asd-ssds; #X symbolatom 251 111 10 0 0 0 - - -; #X obj 105 203 delsplit; #X text 273 54 space; #X connect 0 0 7 1; #X connect 1 0 7 1; --- 1,15 ---- ! #N canvas 300 90 462 290 12; #X msg 264 133 symbol -; #X msg 232 57 list; #X msg 242 84 list +; #X obj 105 229 print; ! #X obj 39 78 tosymbol; ! #X msg 29 22 ask+asd-ssds; #X symbolatom 251 111 10 0 0 0 - - -; #X obj 105 203 delsplit; #X text 273 54 space; + #X msg 31 152 a-b c+d e-f+g; + #X msg 58 47 a b c+d e-f+g; + #X text 29 130 any messages will work; #X connect 0 0 7 1; #X connect 1 0 7 1; *************** *** 16,17 **** --- 19,22 ---- #X connect 6 0 7 1; #X connect 7 0 3 0; + #X connect 9 0 7 0; + #X connect 10 0 4 0;