Update of /cvsroot/pure-data/externals/zexy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25670
Modified Files: list2symbol.c makesymbol.c Log Message: removed implicit use of alloca (my mingw-X-compiler couldn't cope with that)
Index: makesymbol.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/makesymbol.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** makesymbol.c 10 Nov 2005 09:39:16 -0000 1.3 --- makesymbol.c 14 Dec 2005 19:00:57 -0000 1.4 *************** *** 56,64 **** }
t_symbol* list2symbol(char *masque, int argc, t_atom *argv) { ! typedef char cstring[MAXSTRINGLENG]; ! ! cstring buf[MAXSTRINGARGS]; cstring buffer; int i; --- 56,65 ---- }
+ typedef char cstring[MAXSTRINGLENG]; + t_symbol* list2symbol(char *masque, int argc, t_atom *argv) { ! // cstring buf[MAXSTRINGARGS]; ! cstring*buf=(cstring*)getbytes(MAXSTRINGARGS*sizeof(cstring)); cstring buffer; int i; *************** *** 74,77 **** --- 75,79 ---- buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7], buf[8], buf[9]);
+ freebytes(buf, MAXSTRINGARGS*sizeof(cstring)); return (gensym(buffer)); }
Index: list2symbol.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/list2symbol.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** list2symbol.c 31 Aug 2005 09:57:51 -0000 1.5 --- list2symbol.c 14 Dec 2005 19:00:57 -0000 1.6 *************** *** 48,51 **** --- 48,52 ---- char *connector=0; char connlen=0; + char*buffer = (char*)getbytes(MAXPDSTRING*sizeof(char)); if(x->connector)connector=x->connector->s_name; if(connector)connlen=strlen(connector); *************** *** 58,62 ****
while(i--){ - char buffer[MAXPDSTRING]; int len=0; if(A_SYMBOL==argv->a_type){ --- 59,62 ---- *************** *** 94,98 **** len+= strlen(argv->a_w.w_symbol->s_name); } else { - char buffer[MAXPDSTRING]; atom_string(argv, buffer, MAXPDSTRING); strcpy(result+len, buffer); --- 94,97 ---- *************** *** 105,108 **** --- 104,109 ---- } } + freebytes(buffer, MAXPDSTRING*sizeof(char)); + result[length]=0; outlet_symbol(x->x_obj.ob_outlet, gensym(result));