Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9369
Modified Files: Tag: desiredata m_pd.h kernel.c Log Message: added binbuf_gettext2
Index: m_pd.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v retrieving revision 1.4.4.11.2.33.2.41 retrieving revision 1.4.4.11.2.33.2.42 diff -C2 -d -r1.4.4.11.2.33.2.41 -r1.4.4.11.2.33.2.42 *** m_pd.h 9 Jan 2007 21:41:05 -0000 1.4.4.11.2.33.2.41 --- m_pd.h 9 Jan 2007 23:13:21 -0000 1.4.4.11.2.33.2.42 *************** *** 95,99 **** size_t capa; size_t refcount; ! size_t n; /* size of at */ } t_list, t_binbuf;
--- 95,99 ---- size_t capa; size_t refcount; ! size_t n; } t_list, t_binbuf;
*************** *** 363,366 **** --- 363,367 ---- EXTERN void binbuf_text(t_binbuf *x, char *text, size_t size); EXTERN void binbuf_gettext(t_binbuf *x, char **bufp, int *lengthp); + EXTERN char *binbuf_gettext2(t_binbuf *x); EXTERN void binbuf_clear(t_binbuf *x); EXTERN void binbuf_add(t_binbuf *x, int argc, t_atom *argv);
Index: kernel.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/kernel.c,v retrieving revision 1.1.2.37 retrieving revision 1.1.2.38 diff -C2 -d -r1.1.2.37 -r1.1.2.38 *** kernel.c 9 Jan 2007 22:13:01 -0000 1.1.2.37 --- kernel.c 9 Jan 2007 23:13:21 -0000 1.1.2.38 *************** *** 1810,1813 **** --- 1810,1821 ---- }
+ /* convert a binbuf to text with null termination and malloc. */ + char *binbuf_gettext2(t_binbuf *x) { + char *buf = (char *)malloc(MAXPDSTRING); + int n; + binbuf_gettext(x,&buf,&n); + return buf; + } + /* Miller said: fix this so that writing to file doesn't buffer everything together. */ /* matju said: make this use vector size doubling as it used to be in binbuf_text */