Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27950
Modified Files: Tag: desiredata kernel.c m_pd.h Log Message: introducing symsprintf
Index: m_pd.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v retrieving revision 1.4.4.11.2.33.2.48 retrieving revision 1.4.4.11.2.33.2.49 diff -C2 -d -r1.4.4.11.2.33.2.48 -r1.4.4.11.2.33.2.49 *** m_pd.h 10 Jul 2007 20:30:54 -0000 1.4.4.11.2.33.2.48 --- m_pd.h 11 Jul 2007 19:50:18 -0000 1.4.4.11.2.33.2.49 *************** *** 291,294 **** --- 291,295 ---- EXTERN t_symbol *gensym(const char *s); EXTERN t_symbol *gensym2(const char *s, size_t n); + EXTERN t_symbol *symsprintf(const char *s, ...); EXTERN t_gotfn getfn(t_pd *x, t_symbol *s); EXTERN t_gotfn zgetfn(t_pd *x, t_symbol *s);
Index: kernel.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/kernel.c,v retrieving revision 1.1.2.49 retrieving revision 1.1.2.50 diff -C2 -d -r1.1.2.49 -r1.1.2.50 *** kernel.c 11 Jul 2007 19:39:10 -0000 1.1.2.49 --- kernel.c 11 Jul 2007 19:50:18 -0000 1.1.2.50 *************** *** 1319,1322 **** --- 1319,1332 ---- t_symbol *gensym( const char *s) {return dogensym(s,strlen(s),0);} t_symbol *gensym2(const char *s, size_t n) {return dogensym(s,n,0);} + t_symbol *symsprintf(const char *s, ...) { + char *buf; + va_list args; + va_start(args,s); + vasprintf(&buf,s,args); + va_end(args); + t_symbol *r = gensym(buf); + free(buf); + return r; + }
static int tryingalready;