Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32585
Modified Files: Tag: desiredata builtins.c d_soundfile.c Log Message: removed some MAXPDSTRING
Index: d_soundfile.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/d_soundfile.c,v retrieving revision 1.4.4.11.2.10.2.14 retrieving revision 1.4.4.11.2.10.2.15 diff -C2 -d -r1.4.4.11.2.10.2.14 -r1.4.4.11.2.10.2.15 *** d_soundfile.c 18 Jul 2007 03:37:24 -0000 1.4.4.11.2.10.2.14 --- d_soundfile.c 18 Jul 2007 21:46:35 -0000 1.4.4.11.2.10.2.15 *************** *** 467,471 **** static int create_soundfile(t_canvas *canvas, const char *filename, int filetype, int nframes, int bytespersamp, int bigendian, int nchannels, int swap, float samplerate) { ! char filenamebuf[MAXPDSTRING], buf2[MAXPDSTRING]; char headerbuf[WRITEHDRSIZE]; t_wave *wavehdr = (t_wave *)headerbuf; --- 467,471 ---- static int create_soundfile(t_canvas *canvas, const char *filename, int filetype, int nframes, int bytespersamp, int bigendian, int nchannels, int swap, float samplerate) { ! char filenamebuf[MAXPDSTRING]; char headerbuf[WRITEHDRSIZE]; t_wave *wavehdr = (t_wave *)headerbuf; *************** *** 531,537 **** }
! canvas_makefilename(canvas, filenamebuf, buf2, MAXPDSTRING); ! sys_bashfilename(buf2, buf2); ! if ((fd = open(buf2, BINCREATE, 0666)) < 0) return -1; if (write(fd, headerbuf, headersize) < headersize) { close (fd); --- 531,537 ---- }
! char *buf2 = canvas_makefilename(canvas, filenamebuf,0,0); ! sys_bashfilename(buf2,buf2); ! if ((fd = open(buf2, BINCREATE, 0666)) < 0) {free(buf2); return -1;} if (write(fd, headerbuf, headersize) < headersize) { close (fd);
Index: builtins.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/builtins.c,v retrieving revision 1.1.2.32 retrieving revision 1.1.2.33 diff -C2 -d -r1.1.2.32 -r1.1.2.33 *** builtins.c 18 Jul 2007 20:22:12 -0000 1.1.2.32 --- builtins.c 18 Jul 2007 21:46:35 -0000 1.1.2.33 *************** *** 547,555 **** static void qlist_write(t_qlist *x, t_symbol *filename, t_symbol *format) { int cr = 0; ! char buf[MAXPDSTRING]; ! canvas_makefilename(x->canvas, filename->name, buf, MAXPDSTRING); if (!strcmp(format->name, "cr")) cr = 1; else if (*format->name) error("qlist_read: unknown flag: %s", format->name); if (binbuf_write(x->binbuf, buf, "", cr)) error("%s: write failed", filename->name); } static void qlist_print(t_qlist *x) { --- 547,555 ---- static void qlist_write(t_qlist *x, t_symbol *filename, t_symbol *format) { int cr = 0; ! char *buf = canvas_makefilename(x->canvas,filename->name,0,0); if (!strcmp(format->name, "cr")) cr = 1; else if (*format->name) error("qlist_read: unknown flag: %s", format->name); if (binbuf_write(x->binbuf, buf, "", cr)) error("%s: write failed", filename->name); + free(buf); } static void qlist_print(t_qlist *x) {