Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12672/pd/src
Modified Files:
configure.in d_fft.c d_soundfile.c g_array.c g_canvas.c
g_editor.c g_graph.c g_template.c g_traversal.c m_atom.c
m_binbuf.c makefile.in makefile.nt notes.txt s_audio.c
s_audio_pa.c s_audio_pablio.c s_audio_pablio.h
s_audio_paring.c s_audio_paring.h s_inter.c s_loader.c
s_main.c u_main.tk x_gui.c
Log Message:
FFT package selection
Zmoelnig's multi-'$' patch
big-soundfile support
Patch to set open directories (openpanel, savepanel)
patch to allow funny characters in extern names
fixed makefile.in to support intel mac
Index: m_binbuf.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_binbuf.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** m_binbuf.c 28 Nov 2004 21:20:42 -0000 1.6
--- m_binbuf.c 3 Jun 2006 19:13:07 -0000 1.7
***************
*** 150,154 ****
*bufp = 0;
#if 0
! post("buf %s", buf);
#endif
if (*buf == '$' && buf[1] >= '0' && buf[1] <= '9' && !firstslash)
--- 150,154 ----
*bufp = 0;
#if 0
! post("binbuf_text: buf %s", buf);
#endif
if (*buf == '$' && buf[1] >= '0' && buf[1] <= '9' && !firstslash)
***************
*** 157,161 ****
if (*bufp < '0' || *bufp > '9')
{
! SETDOLLSYM(ap, gensym(buf+1));
goto didit;
}
--- 157,161 ----
if (*bufp < '0' || *bufp > '9')
{
! SETDOLLSYM(ap, gensym(buf));
goto didit;
}
***************
*** 308,312 ****
break;
case A_DOLLSYM:
! sprintf(tbuf, "$%s", ap->a_w.w_symbol->s_name);
SETSYMBOL(ap, gensym(tbuf));
break;
--- 308,312 ----
break;
case A_DOLLSYM:
! atom_string(ap, tbuf, MAXPDSTRING);
SETSYMBOL(ap, gensym(tbuf));
break;
***************
*** 364,368 ****
dollsym = 1;
if (dollsym)
! SETDOLLSYM(ap, gensym(str + 1));
else
{
--- 364,368 ----
dollsym = 1;
if (dollsym)
! SETDOLLSYM(ap, gensym(str));
else
{
***************
*** 414,437 ****
int canvas_getdollarzero( void);
/* LATER remove the dependence on the current canvas for $0; should be another
argument. */
t_symbol *binbuf_realizedollsym(t_symbol *s, int ac, t_atom *av, int tonew)
{
! int argno = atol(s->s_name), lastnum;
! char buf[MAXPDSTRING], c, *sp;
! for (lastnum = 0, sp = s->s_name; ((c = *sp) && c >= '0' && c <= '9');
! sp++, lastnum++)
! if (!c || argno < 0 || argno > ac)
! {
! if (!tonew)
! return (0);
! else sprintf(buf, "$%d", argno);
}
! else if (argno == 0)
! sprintf(buf, "%d", canvas_getdollarzero());
! else
! atom_string(av+(argno-1), buf, MAXPDSTRING/2-1);
! strncat(buf, sp, MAXPDSTRING/2-1);
! return (gensym(buf));
}
--- 414,517 ----
int canvas_getdollarzero( void);
+ /* JMZ:
+ * s points to the first character after the $
+ * (e.g. if the org.symbol is "$1-bla", then s will point to "1-bla")
+ * (e.g. org.symbol="hu-$1mu", s="1mu")
+ * LATER: think about more complex $args, like ${$1+3}
+ *
+ * the return value holds the length of the $arg (in most cases: 1)
+ * buf holds the expanded $arg
+ *
+ * if some error occured, "-1" is returned
+ *
+ * e.g. "$1-bla" with list "10 20 30"
+ * s="1-bla"
+ * buf="10"
+ * return value = 1; (s+1=="-bla")
+ */
+ int binbuf_expanddollsym(char*s, char*buf,t_atom dollar0, int ac, t_atom *av, int tonew)
+ {
+ int argno=atol(s);
+ int arglen=0;
+ char*cs=s;
+ char c=*cs;
+ *buf=0;
+
+ while(c&&(c>='0')&&(c<='9')){
+ c=*cs++;
+ arglen++;
+ }
+
+ if (cs==s) { /* invalid $-expansion (like "$bla") */
+ sprintf(buf, "$");
+ return 0;
+ }
+ else if (argno < 0 || argno > ac) /* undefined argument */
+ {
+ if(!tonew)return 0;
+ sprintf(buf, "$%d", argno);
+ }
+ else if (argno == 0){ /* $0 */
+ atom_string(&dollar0, buf, MAXPDSTRING/2-1);
+ }
+ else{ /* fine! */
+ atom_string(av+(argno-1), buf, MAXPDSTRING/2-1);
+ }
+ return (arglen-1);
+ }
+
/* LATER remove the dependence on the current canvas for $0; should be another
argument. */
t_symbol *binbuf_realizedollsym(t_symbol *s, int ac, t_atom *av, int tonew)
{
! char buf[MAXPDSTRING];
! char buf2[MAXPDSTRING];
! char*str=s->s_name;
! char*substr;
! int next=0, i=MAXPDSTRING;
! t_atom dollarnull;
! SETFLOAT(&dollarnull, canvas_getdollarzero());
! while(i--)buf2[i]=0;
!
! #if 1
! /* JMZ: currently, a symbol is detected to be A_DOLLSYM if it starts with '$'
! * the leading $ is stripped and the rest stored in "s"
! * i would suggest to NOT strip the leading $
! * and make everything a A_DOLLSYM that contains(!) a $
! *
! * whenever this happened, enable this code
! */
! substr=strchr(str, '$');
! if(substr){
! strncat(buf2, str, (substr-str));
! str=substr+1;
}
! #endif
!
! while((next=binbuf_expanddollsym(str, buf, dollarnull, ac, av, tonew))>=0)
! {
! /*
! * JMZ: i am not sure what this means, so i might have broken it
! * it seems like that if "tonew" is set and the $arg cannot be expanded (or the dollarsym is in reality a A_DOLLAR)
! * 0 is returned from binbuf_realizedollsym
! * this happens, when expanding in a message-box, but does not happen when the A_DOLLSYM is the name of a subpatch
! */
! if(!tonew&&(0==next)&&(0==*buf)){
! return 0; /* JMZ: this should mimick the original behaviour */
! }
!
! strncat(buf2, buf, MAXPDSTRING/2-1);
! str+=next;
! substr=strchr(str, '$');
! if(substr){
! strncat(buf2, str, (substr-str));
! str=substr+1;
! } else {
! strcat(buf2, str);
!
! return gensym(buf2);
! }
! }
! return (gensym(buf2));
}
***************
*** 818,822 ****
{
char buf[100];
! sprintf(buf, "$%s", nextmess[i].a_w.w_symbol->s_name);
SETSYMBOL(nextmess+i, gensym(buf));
}
--- 898,902 ----
{
char buf[100];
! sprintf(buf, "%s", nextmess[i].a_w.w_symbol->s_name);
SETSYMBOL(nextmess+i, gensym(buf));
}
Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** u_main.tk 31 Dec 2005 20:55:25 -0000 1.18
--- u_main.tk 3 Jun 2006 19:13:07 -0000 1.19
***************
*** 90,93 ****
--- 90,95 ----
}
+ set pd_deffont {courier 12 bold}
+
set help_top_directory $pd_guidir/doc
***************
*** 355,359 ****
global pd_guidir
global pd_myversion
- # global pd_font3
set name [format ".help%d" $doc_number]
toplevel $name
--- 357,360 ----
***************
*** 574,578 ****
if {$filename != ""} {
! $name.c postscript -file $filename
}
}
--- 575,579 ----
if {$filename != ""} {
! $name.c postscript -file $filename
}
}
***************
*** 1230,1237 ****
global pd_array_listview_id
set windowName [format ".%sArrayWindow" $arrayName]
if {[winfo exists $windowName]} {
set cmd "$pd_array_listview_id($arrayName) \
arrayviewlistfillpage \
! $pd_array_listview_page($arrayName)"
pd [concat $cmd \;]
}
--- 1231,1243 ----
global pd_array_listview_id
set windowName [format ".%sArrayWindow" $arrayName]
+ set topItem [expr [lindex [$windowName.lb yview] 0] * \
+ [$windowName.lb size]]
+
if {[winfo exists $windowName]} {
set cmd "$pd_array_listview_id($arrayName) \
arrayviewlistfillpage \
! $pd_array_listview_page($arrayName) \
! $topItem"
!
pd [concat $cmd \;]
}
***************
*** 1261,1265 ****
-command "$windowName.lb yview" -orient vertical]
place configure $windowName.lb.sb -relheight 1 -relx 0.9 -relwidth 0.1
! pack $windowName.lb
bind $windowName.lb <Double-ButtonPress-1> \
"pdtk_array_listview_edit $arrayName $page $font"
--- 1267,1271 ----
-command "$windowName.lb yview" -orient vertical]
place configure $windowName.lb.sb -relheight 1 -relx 0.9 -relwidth 0.1
! pack $windowName.lb -expand 1 -fill both
bind $windowName.lb <Double-ButtonPress-1> \
"pdtk_array_listview_edit $arrayName $page $font"
***************
*** 1278,1283 ****
set $windowName.nextBtn [button $windowName.nextBtn -text "->" \
-command "pdtk_array_listview_changepage $arrayName 1"]
! pack $windowName.prevBtn -side left -ipadx 20 -pady 10
! pack $windowName.nextBtn -side right -ipadx 20 -pady 10
focus $windowName
}
--- 1284,1289 ----
set $windowName.nextBtn [button $windowName.nextBtn -text "->" \
-command "pdtk_array_listview_changepage $arrayName 1"]
! pack $windowName.prevBtn -side left -ipadx 20 -pady 10 -anchor s
! pack $windowName.nextBtn -side right -ipadx 20 -pady 10 -anchor s
focus $windowName
}
***************
*** 3145,3149 ****
proc pdtk_data_dialog {name stuff} {
! global pd_font3
toplevel $name
wm title $name {Atom}
--- 3151,3155 ----
proc pdtk_data_dialog {name stuff} {
! global pd_deffont
toplevel $name
wm title $name {Atom}
***************
*** 3160,3164 ****
text $name.text -relief raised -bd 2 -height 40 -width 60 \
! -yscrollcommand "$name.scroll set" -font $pd_font3
scrollbar $name.scroll -command "$name.text yview"
pack $name.scroll -side right -fill y
--- 3166,3170 ----
text $name.text -relief raised -bd 2 -height 40 -width 60 \
! -yscrollcommand "$name.scroll set" -font $pd_deffont
scrollbar $name.scroll -command "$name.text yview"
pack $name.scroll -side right -fill y
***************
*** 3186,3198 ****
# if {$font >= 13} {set fontname [format -*-courier-----%d-* $font]}
! global pd_font1 pd_font2 pd_font3 pd_font4 pd_font5 pd_font6 pd_font7
switch -- $font {
! 8 { set typeface $pd_font1 }
! 10 { set typeface $pd_font2 }
! 12 { set typeface $pd_font3 }
! 14 { set typeface $pd_font4 }
! 16 { set typeface $pd_font5 }
! 24 { set typeface $pd_font6 }
! 36 { set typeface $pd_font7 }
}
--- 3192,3207 ----
# if {$font >= 13} {set fontname [format -*-courier-----%d-* $font]}
! global pd_fontlist
switch -- $font {
! 8 { set typeface [lindex $pd_fontlist 0] }
! 9 { set typeface [lindex $pd_fontlist 1] }
! 10 { set typeface [lindex $pd_fontlist 2] }
! 12 { set typeface [lindex $pd_fontlist 3] }
! 14 { set typeface [lindex $pd_fontlist 4] }
! 16 { set typeface [lindex $pd_fontlist 5] }
! 18 { set typeface [lindex $pd_fontlist 6] }
! 24 { set typeface [lindex $pd_fontlist 7] }
! 30 { set typeface [lindex $pd_fontlist 8] }
! 36 { set typeface [lindex $pd_fontlist 9] }
}
***************
*** 3227,3231 ****
# Tell pd the current directory; this is used in case the command line
# asked pd to open something. Also, get character width and height for
! # font sizes 8, 10, 12, 14, 16, and 24.
# tb: user defined typefaces
--- 3236,3240 ----
# Tell pd the current directory; this is used in case the command line
# asked pd to open something. Also, get character width and height for
! # seven "useful" font sizes.
# tb: user defined typefaces
***************
*** 3236,3282 ****
set pd_apilist $apilist
set pd_midiapilist $midiapilist
! global pd_font1 pd_font2 pd_font3 pd_font4 pd_font5 pd_font6 pd_font7
!
! set pd_font1 [format -*-%s-bold--normal--8-* $fontname]
! set pd_font2 [format -*-%s-bold--normal--10-* $fontname]
! set pd_font3 [format -*-%s-bold--normal--12-* $fontname]
! set pd_font4 [format -*-%s-bold--normal--14-* $fontname]
! set pd_font5 [format -*-%s-bold--normal--16-* $fontname]
! set pd_font6 [format -*-%s-bold--normal--24-* $fontname]
! set pd_font7 [format -*-%s-bold--normal--36-* $fontname]
! set width1 [font measure $pd_font1 x]
! set height1 [lindex [font metrics $pd_font1] 5]
! set width2 [font measure $pd_font2 x]
! set height2 [lindex [font metrics $pd_font2] 5]
! set width3 [font measure $pd_font3 x]
! set height3 [lindex [font metrics $pd_font3] 5]
! set width4 [font measure $pd_font4 x]
! set height4 [lindex [font metrics $pd_font4] 5]
! set width5 [font measure $pd_font5 x]
! set height5 [lindex [font metrics $pd_font5] 5]
! set width6 [font measure $pd_font6 x]
! set height6 [lindex [font metrics $pd_font6] 5]
! set width7 [font measure $pd_font7 x]
! set height7 [lindex [font metrics $pd_font7] 5]
set tclpatch [info patchlevel]
if {$tclpatch == "8.3.0" || \
! $tclpatch == "8.3.1" || \
! $tclpatch == "8.3.2" || \
! $tclpatch == "8.3.3" } {
! set oldtclversion 1
} else {
! set oldtclversion 0
}
! pd [concat pd init [pdtk_enquote [pwd]] \
! 8 $width1 $height1 \
! 10 $width2 $height2 \
! 12 $width3 $height3 \
! 14 $width4 $height4 \
! 16 $width5 $height5 \
! 24 $width6 $height6 \
! 36 $width7 $height7 \
! $oldtclversion \;];
# add the audio and help menus to the Pd window. We delayed this
--- 3245,3271 ----
set pd_apilist $apilist
set pd_midiapilist $midiapilist
! global pd_fontlist
! set pd_fontlist {}
! set fontlist ""
! foreach i {8 9 10 12 14 16 18 24 30 36} {
! set font [concat $fontname -$i bold]
! set pd_fontlist [linsert $pd_fontlist 100000 $font]
! set width0 [font measure $font x]
! set height0 [lindex [font metrics $font] 5]
! set fontlist [concat $fontlist $i [font measure $font x] \
! [lindex [font metrics $font] 5]]
! }
set tclpatch [info patchlevel]
if {$tclpatch == "8.3.0" || \
! $tclpatch == "8.3.1" || \
! $tclpatch == "8.3.2" || \
! $tclpatch == "8.3.3" } {
! set oldtclversion 1
} else {
! set oldtclversion 0
}
! pd [concat pd init [pdtk_enquote [pwd]] $oldtclversion $fontlist \;];
# add the audio and help menus to the Pd window. We delayed this
***************
*** 3353,3357 ****
proc pdtk_pd_texteditor {stuff} {
! global edit_number pd_font3
set name [format ".text%d" $edit_number]
set edit_number [expr $edit_number + 1]
--- 3342,3346 ----
proc pdtk_pd_texteditor {stuff} {
! global edit_number pd_deffont
set name [format ".text%d" $edit_number]
set edit_number [expr $edit_number + 1]
***************
*** 3370,3374 ****
text $name.text -relief raised -bd 2 -height 12 -width 60 \
! -yscrollcommand "$name.scroll set" -font $pd_font3
scrollbar $name.scroll -command "$name.text yview"
pack $name.scroll -side right -fill y
--- 3359,3363 ----
text $name.text -relief raised -bd 2 -height 12 -width 60 \
! -yscrollcommand "$name.scroll set" -font $pd_deffont
scrollbar $name.scroll -command "$name.text yview"
pack $name.scroll -side right -fill y
***************
*** 3395,3402 ****
############# open and save dialogs for objects in Pd ##########
! proc pdtk_openpanel {target} {
global pd_opendir
set filename [tk_getOpenFile \
! -initialdir $pd_opendir]
if {$filename != ""} {
set directory [string range $filename 0 \
--- 3384,3394 ----
############# open and save dialogs for objects in Pd ##########
! proc pdtk_openpanel {target localdir} {
global pd_opendir
+ if {$localdir == ""} {
+ set localdir $pd_opendir
+ }
set filename [tk_getOpenFile \
! -initialdir $localdir]
if {$filename != ""} {
set directory [string range $filename 0 \
***************
*** 3404,3415 ****
set pd_opendir $directory
! pd [concat $target symbol [pdtk_enquote $filename] \;]
}
}
! proc pdtk_savepanel {target} {
! set filename [tk_getSaveFile]
if {$filename != ""} {
! pd [concat $target symbol [pdtk_enquote $filename] \;]
}
}
--- 3396,3407 ----
set pd_opendir $directory
! pd [concat $target callback [pdtk_enquote $filename] \;]
}
}
! proc pdtk_savepanel {target localdir} {
! set filename [tk_getSaveFile -initialdir $localdir]
if {$filename != ""} {
! pd [concat $target callback [pdtk_enquote $filename] \;]
}
}
Index: makefile.nt
===================================================================
RCS file: /cvsroot/pure-data/pd/src/makefile.nt,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** makefile.nt 15 Sep 2005 03:17:27 -0000 1.7
--- makefile.nt 3 Jun 2006 19:13:07 -0000 1.8
***************
*** 5,9 ****
VC = "C:\Program Files\Microsoft Visual Studio\VC98"
#VC="\Program Files\DevStudio\Vc"
! INCLUDE = -I.\ -I..\Tcl\include -I$(VC)\include
LDIR = $(VC)\lib
--- 5,9 ----
VC = "C:\Program Files\Microsoft Visual Studio\VC98"
#VC="\Program Files\DevStudio\Vc"
! INCLUDE = -I.\ -I..\Tcl\include -I\DXSDK\include -I$(VC)\include
LDIR = $(VC)\lib
***************
*** 13,17 ****
$(LDIR)\libc.lib $(LDIR)\oldnames.lib $(LDIR)\kernel32.lib \
$(LDIR)\wsock32.lib $(LDIR)\winmm.lib $(LDIR)\advapi32.lib \
! ..\bin\pthreadVC.lib
GLIB = $(LIB) ..\bin\tcl84.lib ..\bin\tk84.lib
--- 13,17 ----
$(LDIR)\libc.lib $(LDIR)\oldnames.lib $(LDIR)\kernel32.lib \
$(LDIR)\wsock32.lib $(LDIR)\winmm.lib $(LDIR)\advapi32.lib \
! $(LDIR)\setupapi.lib ..\bin\pthreadVC.lib
GLIB = $(LIB) ..\bin\tcl84.lib ..\bin\tk84.lib
***************
*** 51,55 ****
$(PADIR)/pa_win/pa_win_util.c \
$(PADIR)/pa_win/pa_win_hostapis.c \
! $(PADIR)/pa_win_wmme/pa_win_wmme.c
SRCASIO = $(PADIR)/pa_asio/pa_asio.cpp
--- 51,56 ----
$(PADIR)/pa_win/pa_win_util.c \
$(PADIR)/pa_win/pa_win_hostapis.c \
! $(PADIR)/pa_win_wmme/pa_win_wmme.c
! # $(PADIR)/pa_win_wdmks/pa_win_wdmks.c
SRCASIO = $(PADIR)/pa_asio/pa_asio.cpp
***************
*** 64,68 ****
pa_front.obj pa_dither.obj pa_cpuload.obj pa_converters.obj \
pa_allocation.obj pa_win_util.obj pa_win_hostapis.obj pa_asio.obj \
! pa_win_wmme.obj
PMDIR = ..\portmidi
--- 65,70 ----
pa_front.obj pa_dither.obj pa_cpuload.obj pa_converters.obj \
pa_allocation.obj pa_win_util.obj pa_win_hostapis.obj pa_asio.obj \
! pa_win_wmme.obj
! # pa_win_wdmks.obj
PMDIR = ..\portmidi
***************
*** 151,154 ****
--- 153,160 ----
pa_win_wmme.obj: $(PADIR)\pa_win_wmme\pa_win_wmme.c
cl /c $(ALLCF) $(PADIR)\pa_win_wmme\pa_win_wmme.c
+ pa_win_wdmks.obj: $(PADIR)\pa_win_wdmks\pa_win_wdmks.c
+ cl /c $(ALLCF) \
+ -DWINVER=0x400 -DKSAUDIO_SPEAKER_DIRECTOUT \
+ $(PADIR)\pa_win_wdmks\pa_win_wdmks.c
pa_asio.obj: $(PADIR)\pa_asio\pa_asio.cpp
cl /c $(ALLCF) $(PADIR)\pa_asio\pa_asio.cpp
Index: g_canvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** g_canvas.c 31 Dec 2005 20:55:25 -0000 1.12
--- g_canvas.c 3 Jun 2006 19:13:07 -0000 1.13
***************
*** 1495,1499 ****
gensym("scalar"), A_GIMME, A_NULL);
! /* -------------- Thomas Musil's GUI objects ------------ */
class_addmethod(canvas_class, (t_method)canvas_bng, gensym("bng"),
A_GIMME, A_NULL);
--- 1495,1499 ----
gensym("scalar"), A_GIMME, A_NULL);
! /* -------------- IEMGUI: button, toggle, slider, etc. ------------ */
class_addmethod(canvas_class, (t_method)canvas_bng, gensym("bng"),
A_GIMME, A_NULL);
Index: x_gui.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/x_gui.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** x_gui.c 15 Oct 2005 23:14:28 -0000 1.4
--- x_gui.c 3 Jun 2006 19:13:08 -0000 1.5
***************
*** 183,187 ****
} t_openpanel;
! static void *openpanel_new(void)
{
char buf[50];
--- 183,187 ----
} t_openpanel;
! static void *openpanel_new( void)
{
char buf[50];
***************
*** 194,207 ****
}
static void openpanel_bang(t_openpanel *x)
{
! sys_vgui("pdtk_openpanel %s\n", x->x_s->s_name);
}
! static void openpanel_symbol(t_openpanel *x, t_symbol *s)
{
outlet_symbol(x->x_obj.ob_outlet, s);
}
static void openpanel_free(t_openpanel *x)
{
--- 194,214 ----
}
+ static void openpanel_symbol(t_openpanel *x, t_symbol *s)
+ {
+ char *path = (s && s->s_name) ? s->s_name : "\"\"";
+ sys_vgui("pdtk_openpanel {%s} {%s}\n", x->x_s->s_name, path);
+ }
+
static void openpanel_bang(t_openpanel *x)
{
! openpanel_symbol(x, &s_);
}
! static void openpanel_callback(t_openpanel *x, t_symbol *s)
{
outlet_symbol(x->x_obj.ob_outlet, s);
}
+
static void openpanel_free(t_openpanel *x)
{
***************
*** 213,219 ****
openpanel_class = class_new(gensym("openpanel"),
(t_newmethod)openpanel_new, (t_method)openpanel_free,
! sizeof(t_openpanel), 0, A_DEFFLOAT, 0);
class_addbang(openpanel_class, openpanel_bang);
class_addsymbol(openpanel_class, openpanel_symbol);
}
--- 220,228 ----
openpanel_class = class_new(gensym("openpanel"),
(t_newmethod)openpanel_new, (t_method)openpanel_free,
! sizeof(t_openpanel), 0, 0);
class_addbang(openpanel_class, openpanel_bang);
class_addsymbol(openpanel_class, openpanel_symbol);
+ class_addmethod(openpanel_class, (t_method)openpanel_callback,
+ gensym("callback"), A_SYMBOL, 0);
}
***************
*** 228,232 ****
} t_savepanel;
! static void *savepanel_new(void)
{
char buf[50];
--- 237,241 ----
} t_savepanel;
! static void *savepanel_new( void)
{
char buf[50];
***************
*** 239,248 ****
}
static void savepanel_bang(t_savepanel *x)
{
! sys_vgui("pdtk_savepanel %s\n", x->x_s->s_name);
}
! static void savepanel_symbol(t_savepanel *x, t_symbol *s)
{
outlet_symbol(x->x_obj.ob_outlet, s);
--- 248,263 ----
}
+ static void savepanel_symbol(t_savepanel *x, t_symbol *s)
+ {
+ char *path = (s && s->s_name) ? s->s_name : "\"\"";
+ sys_vgui("pdtk_savepanel {%s} {%s}\n", x->x_s->s_name, path);
+ }
+
static void savepanel_bang(t_savepanel *x)
{
! savepanel_symbol(x, &s_);
}
! static void savepanel_callback(t_savepanel *x, t_symbol *s)
{
outlet_symbol(x->x_obj.ob_outlet, s);
***************
*** 258,264 ****
savepanel_class = class_new(gensym("savepanel"),
(t_newmethod)savepanel_new, (t_method)savepanel_free,
! sizeof(t_savepanel), 0, A_DEFFLOAT, 0);
class_addbang(savepanel_class, savepanel_bang);
class_addsymbol(savepanel_class, savepanel_symbol);
}
--- 273,281 ----
savepanel_class = class_new(gensym("savepanel"),
(t_newmethod)savepanel_new, (t_method)savepanel_free,
! sizeof(t_savepanel), 0, 0);
class_addbang(savepanel_class, savepanel_bang);
class_addsymbol(savepanel_class, savepanel_symbol);
+ class_addmethod(savepanel_class, (t_method)savepanel_callback,
+ gensym("callback"), A_SYMBOL, 0);
}
Index: g_template.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_template.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** g_template.c 21 Aug 2005 17:46:52 -0000 1.13
--- g_template.c 3 Jun 2006 19:13:07 -0000 1.14
***************
*** 1083,1086 ****
--- 1083,1087 ----
}
+ #if 0
static int rangecolor(int n) /* 0 to 9 in 5 steps */
{
***************
*** 1090,1093 ****
--- 1091,1103 ----
return (ret);
}
+ #endif
+
+ static int rangecolor(int n) /* 0 to 9 in 5 steps */
+ {
+ int n2 = (n == 9 ? 8 : n); /* 0 to 8 */
+ int ret = (n2 << 5); /* 0 to 256 in 9 steps */
+ if (ret > 255) ret = 255;
+ return (ret);
+ }
static void numbertocolor(int n, char *s)
Index: g_traversal.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_traversal.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** g_traversal.c 16 Aug 2005 04:06:28 -0000 1.5
--- g_traversal.c 3 Jun 2006 19:13:07 -0000 1.6
***************
*** 1037,1042 ****
glist->gl_list = &sc->sc_gobj;
}
- if (glist_isvisible(glist_getcanvas(glist)))
- gobj_vis(&sc->sc_gobj, glist, 1);
gp->gp_un.gp_scalar = sc;
--- 1037,1040 ----
***************
*** 1047,1051 ****
}
! scalar_redraw(sc, glist);
outlet_pointer(x->x_obj.ob_outlet, gp);
--- 1045,1052 ----
}
! if (glist_isvisible(glist_getcanvas(glist)))
! gobj_vis(&sc->sc_gobj, glist, 1);
! /* scalar_redraw(sc, glist); ... have to do 'vis' instead here because
! redraw assumes we're already visible??? ... */
outlet_pointer(x->x_obj.ob_outlet, gp);
Index: s_audio_pablio.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio_pablio.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** s_audio_pablio.h 6 Sep 2004 20:20:35 -0000 1.1
--- s_audio_pablio.h 3 Jun 2006 19:13:07 -0000 1.2
***************
*** 47,57 ****
#include <math.h>
#include "portaudio.h"
! #include "ringbuffer.h"
#include <string.h>
typedef struct
{
! RingBuffer inFIFO;
! RingBuffer outFIFO;
PaStream *stream;
int inbytesPerFrame;
--- 47,57 ----
#include <math.h>
#include "portaudio.h"
! #include "s_audio_paring.h"
#include <string.h>
typedef struct
{
! sys_ringbuf inFIFO;
! sys_ringbuf outFIFO;
PaStream *stream;
int inbytesPerFrame;
Index: d_fft.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_fft.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** d_fft.c 30 May 2005 03:04:17 -0000 1.3
--- d_fft.c 3 Jun 2006 19:13:07 -0000 1.4
***************
*** 1,3 ****
! /* Copyright (c) 1997-1999 Miller Puckette and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 1997- Miller Puckette and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 5,8 ****
--- 5,15 ----
#include "m_pd.h"
+ /* This file interfaces to one of the Mayer, Ooura, or fftw FFT packages
+ to implement the "fft~", etc, Pd objects. If using Mayer, also compile
+ d_fft_mayer.c; if ooura, use d_fft_fftsg.c instead; if fftw, use d_fft_fftw.c
+ and also link in the fftw library. You can only have one of these three
+ linked in. The configure script can be used to select which one.
+ */
+
/* ---------------- utility functions for DSP chains ---------------------- */
Index: makefile.in
===================================================================
RCS file: /cvsroot/pure-data/pd/src/makefile.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** makefile.in 31 Dec 2005 20:55:25 -0000 1.9
--- makefile.in 3 Jun 2006 19:13:07 -0000 1.10
***************
*** 50,54 ****
s_loader.c s_path.c s_entry.c s_audio.c s_midi.c \
d_ugen.c d_ctl.c d_arithmetic.c d_osc.c d_filter.c d_dac.c d_misc.c \
! d_math.c d_fft.c d_mayer_fft.c d_fftroutine.c d_array.c d_global.c \
d_delay.c d_resample.c \
x_arithmetic.c x_connective.c x_interface.c x_midi.c x_misc.c \
--- 50,54 ----
s_loader.c s_path.c s_entry.c s_audio.c s_midi.c \
d_ugen.c d_ctl.c d_arithmetic.c d_osc.c d_filter.c d_dac.c d_misc.c \
! d_math.c d_fft.c d_array.c d_global.c \
d_delay.c d_resample.c \
x_arithmetic.c x_connective.c x_interface.c x_midi.c x_misc.c \
***************
*** 56,60 ****
$(SYSSRC)
-
OBJ = $(SRC:.c=.o)
--- 56,59 ----
***************
*** 166,170 ****
-rm -f ../obj/* $(BIN_DIR)/pd $(BIN_DIR)/$(GUINAME) $(BIN_DIR)/pdsend \
$(BIN_DIR)/pdreceive $(BIN_DIR)/pd-watchdog m_stamp.c
! -rm -f `find ../portaudio ../portaudio_v18 -name "*.o"`
-rm -f *~
-(cd ../doc/6.externs; rm -f *.pd_linux)
--- 165,169 ----
-rm -f ../obj/* $(BIN_DIR)/pd $(BIN_DIR)/$(GUINAME) $(BIN_DIR)/pdsend \
$(BIN_DIR)/pdreceive $(BIN_DIR)/pd-watchdog m_stamp.c
! -rm -f `find ../portaudio -name "*.o"`
-rm -f *~
-(cd ../doc/6.externs; rm -f *.pd_linux)
***************
*** 180,184 ****
distclean: clean
! -rm -f config.cache config.log config.status makefile configure tags \
autom4te.cache/output.* autom4te.cache/traces.* autom4te.cache/requests
-rmdir autom4te.cache
--- 179,183 ----
distclean: clean
! -rm -f config.cache config.log config.status makefile tags \
autom4te.cache/output.* autom4te.cache/traces.* autom4te.cache/requests
-rmdir autom4te.cache
Index: configure.in
===================================================================
RCS file: /cvsroot/pure-data/pd/src/configure.in,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** configure.in 31 Dec 2005 20:55:25 -0000 1.16
--- configure.in 3 Jun 2006 19:13:07 -0000 1.17
***************
*** 7,10 ****
--- 7,11 ----
AC_SUBST(portmidi, no)
AC_SUBST(binarymode, -m755)
+ AC_SUBST(fftw, no)
AC_SUBST(PDLIB)
AC_SUBST(MORECFLAGS)
***************
*** 39,43 ****
AC_ARG_ENABLE(setuid, [ --enable-setuid install as setuid (linux)],
setuid=$enableval)
!
dnl Checks for programs.
AC_PROG_CC
--- 40,46 ----
AC_ARG_ENABLE(setuid, [ --enable-setuid install as setuid (linux)],
setuid=$enableval)
! AC_ARG_ENABLE(fftw, [ --enable-fftw use FFTW package],
! fftw=$enableval)
!
dnl Checks for programs.
AC_PROG_CC
***************
*** 80,83 ****
--- 83,93 ----
echo "pthreads required" || exit 1)
+ dnl Check for fftw package
+ if test x$fftw == "xyes";
+ then
+ AC_CHECK_LIB(fftw, fftw_one,PDLIB="$PDLIB -lfftw",
+ echo "fftw package not found - using built-in FFT"; fftw=no)
+ fi
+
dnl look for tcl 8.x... do I really have to go through all this!?
***************
*** 162,166 ****
fi
EXT=pd_linux
! MORECFLAGS="-DDL_OPEN -DPA_USE_OSS -DPA_LITTLE_ENDIAN -DUNIX -DUNISTD\
-DUSEAPI_OSS \
-I../portaudio/pa_common -I../portaudio/pablio \
--- 172,176 ----
fi
EXT=pd_linux
! MORECFLAGS="-DDL_OPEN -DPA_USE_OSS -DUNIX -DUNISTD\
-DUSEAPI_OSS \
-I../portaudio/pa_common -I../portaudio/pablio \
***************
*** 214,228 ****
else
OPT_CFLAGS="-O6 -funroll-loops -fomit-frame-pointer"
-
- if test x$jack == "xyes";
- then
- LDFLAGS=$LDFLAGS" -lrt -ljack"
- fi
- if test x$jack == "xrun";
- then
- LDFLAGS=$LDFLAGS" -lrt -ljack"
- fi
fi
-
if test x$jack == "xyes";
then
--- 224,228 ----
***************
*** 233,256 ****
LDFLAGS=$LDFLAGS" -lrt -ljack"
fi
echo OPT_CFLAGS --------------- $OPT_CFLAGS
OSNUMBER=0
- if test x$jack == "xyes";
- then
- LDFLAGS=$LDFLAGS" -lrt -ljack"
- fi
- if test x$jack == "xrun";
- then
- LDFLAGS=$LDFLAGS" -lrt -ljack"
- fi
- fi
-
- if test x$jack == "xyes";
- then
- LDFLAGS=$LDFLAGS" -lrt -ljack"
- fi
- if test x$jack == "xrun";
- then
- LDFLAGS=$LDFLAGS" -lrt -ljack"
fi
--- 233,240 ----
LDFLAGS=$LDFLAGS" -lrt -ljack"
fi
+
echo OPT_CFLAGS --------------- $OPT_CFLAGS
OSNUMBER=0
fi
***************
*** 266,270 ****
-I../portmidi/porttime \
-Wno-error \
! -DUSEAPI_PORTAUDIO -DPA_BIG_ENDIAN -DPA19 -DPA_USE_COREAUDIO"
SYSSRC="s_midi_pm.c s_audio_pa.c \
s_audio_pablio.c \
--- 250,254 ----
-I../portmidi/porttime \
-Wno-error \
! -DUSEAPI_PORTAUDIO -DPA19 -DPA_USE_COREAUDIO"
SYSSRC="s_midi_pm.c s_audio_pa.c \
s_audio_pablio.c \
***************
*** 314,318 ****
fi
OSNUMBER=2
! EXTERNTARGET=pd_darwin
if test x$jack == "xyes";
then
--- 298,307 ----
fi
OSNUMBER=2
! if test `uname -m` = i386;
! then
! EXTERNTARGET=pd_imac
! else
! EXTERNTARGET=pd_darwin
! fi
if test x$jack == "xyes";
then
***************
*** 338,341 ****
--- 327,338 ----
fi
+ if test x$fftw == "xyes";
+ then
+ SYSSRC=$SYSSRC" d_fft_fftw.c d_fftroutine.c"
+ LDFLAGS=$LDFLAGS" -lfftw"
+ else
+ SYSSRC=$SYSSRC" d_fft_mayer.c d_fftroutine.c"
+ fi
+
# extra flags for alpha machines
if test `uname -m | awk '{print $1}'` = alpha;
Index: s_audio_pablio.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio_pablio.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** s_audio_pablio.c 18 May 2005 04:28:51 -0000 1.6
--- s_audio_pablio.c 3 Jun 2006 19:13:07 -0000 1.7
***************
*** 70,75 ****
PaTimestamp outTime, void *userData );
#endif
! static PaError PABLIO_InitFIFO( RingBuffer *rbuf, long numFrames, long bytesPerFrame );
! static PaError PABLIO_TermFIFO( RingBuffer *rbuf );
/************************************************************************/
--- 70,75 ----
PaTimestamp outTime, void *userData );
#endif
! static PaError PABLIO_InitFIFO( sys_ringbuf *rbuf, long numFrames, long bytesPerFrame );
! static PaError PABLIO_TermFIFO( sys_ringbuf *rbuf );
/************************************************************************/
***************
*** 98,102 ****
if( inputBuffer != NULL )
{
! RingBuffer_Write( &data->inFIFO, inputBuffer,
data->inbytesPerFrame * framesPerBuffer );
}
--- 98,102 ----
if( inputBuffer != NULL )
{
! sys_ringbuf_Write( &data->inFIFO, inputBuffer,
data->inbytesPerFrame * framesPerBuffer );
}
***************
*** 105,109 ****
int i;
int numBytes = data->outbytesPerFrame * framesPerBuffer;
! int numRead = RingBuffer_Read( &data->outFIFO, outputBuffer,
numBytes);
/* Zero out remainder of buffer if we run out of data. */
--- 105,109 ----
int i;
int numBytes = data->outbytesPerFrame * framesPerBuffer;
! int numRead = sys_ringbuf_Read( &data->outFIFO, outputBuffer,
numBytes);
/* Zero out remainder of buffer if we run out of data. */
***************
*** 118,122 ****
/* Allocate buffer. */
! static PaError PABLIO_InitFIFO( RingBuffer *rbuf, long numFrames, long bytesPerFrame )
{
long numBytes = numFrames * bytesPerFrame;
--- 118,122 ----
/* Allocate buffer. */
! static PaError PABLIO_InitFIFO( sys_ringbuf *rbuf, long numFrames, long bytesPerFrame )
{
long numBytes = numFrames * bytesPerFrame;
***************
*** 124,132 ****
if( buffer == NULL ) return paInsufficientMemory;
memset( buffer, 0, numBytes );
! return (PaError) RingBuffer_Init( rbuf, numBytes, buffer );
}
/* Free buffer. */
! static PaError PABLIO_TermFIFO( RingBuffer *rbuf )
{
if( rbuf->buffer ) free( rbuf->buffer );
--- 124,132 ----
if( buffer == NULL ) return paInsufficientMemory;
memset( buffer, 0, numBytes );
! return (PaError) sys_ringbuf_Init( rbuf, numBytes, buffer );
}
/* Free buffer. */
! static PaError PABLIO_TermFIFO( sys_ringbuf *rbuf )
{
if( rbuf->buffer ) free( rbuf->buffer );
***************
*** 146,150 ****
while( numBytes > 0)
{
! bytesWritten = RingBuffer_Write( &aStream->outFIFO, p, numBytes );
numBytes -= bytesWritten;
p += bytesWritten;
--- 146,150 ----
while( numBytes > 0)
{
! bytesWritten = sys_ringbuf_Write( &aStream->outFIFO, p, numBytes );
numBytes -= bytesWritten;
p += bytesWritten;
***************
*** 165,169 ****
while( numBytes > 0)
{
! bytesRead = RingBuffer_Read( &aStream->inFIFO, p, numBytes );
numBytes -= bytesRead;
p += bytesRead;
--- 165,169 ----
while( numBytes > 0)
{
! bytesRead = sys_ringbuf_Read( &aStream->inFIFO, p, numBytes );
numBytes -= bytesRead;
p += bytesRead;
***************
*** 179,183 ****
long GetAudioStreamWriteable( PABLIO_Stream *aStream )
{
! int bytesEmpty = RingBuffer_GetWriteAvailable( &aStream->outFIFO );
return bytesEmpty / aStream->outbytesPerFrame;
}
--- 179,183 ----
long GetAudioStreamWriteable( PABLIO_Stream *aStream )
{
! int bytesEmpty = sys_ringbuf_GetWriteAvailable( &aStream->outFIFO );
return bytesEmpty / aStream->outbytesPerFrame;
}
***************
*** 189,193 ****
long GetAudioStreamReadable( PABLIO_Stream *aStream )
{
! int bytesFull = RingBuffer_GetReadAvailable( &aStream->inFIFO );
return bytesFull / aStream->inbytesPerFrame;
}
--- 189,193 ----
long GetAudioStreamReadable( PABLIO_Stream *aStream )
{
! int bytesFull = sys_ringbuf_GetReadAvailable( &aStream->inFIFO );
return bytesFull / aStream->inbytesPerFrame;
}
***************
*** 321,326 ****
if( err != paNoError ) goto error;
/* Make Write FIFO appear full initially. */
! numBytes = RingBuffer_GetWriteAvailable( &aStream->outFIFO );
! RingBuffer_AdvanceWriteIndex( &aStream->outFIFO, numBytes );
}
--- 321,326 ----
if( err != paNoError ) goto error;
/* Make Write FIFO appear full initially. */
! numBytes = sys_ringbuf_GetWriteAvailable( &aStream->outFIFO );
! sys_ringbuf_AdvanceWriteIndex( &aStream->outFIFO, numBytes );
}
***************
*** 383,391 ****
if( byteSize > 0 )
{
! bytesEmpty = RingBuffer_GetWriteAvailable( &aStream->outFIFO );
while( bytesEmpty < byteSize )
{
NPa_Sleep( 10 ); /* MSP */
! bytesEmpty = RingBuffer_GetWriteAvailable( &aStream->outFIFO );
}
}
--- 383,391 ----
if( byteSize > 0 )
{
! bytesEmpty = sys_ringbuf_GetWriteAvailable( &aStream->outFIFO );
while( bytesEmpty < byteSize )
{
NPa_Sleep( 10 ); /* MSP */
! bytesEmpty = sys_ringbuf_GetWriteAvailable( &aStream->outFIFO );
}
}
Index: notes.txt
===================================================================
RCS file: /cvsroot/pure-data/pd/src/notes.txt,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** notes.txt 31 Dec 2005 20:55:25 -0000 1.24
--- notes.txt 3 Jun 2006 19:13:07 -0000 1.25
***************
*** 8,11 ****
--- 8,19 ----
MIDI I/O (inc. sysex)
what does OSX do when jack is compiled into Pd but not installed??
+ turn on paMacCore_ChangeDeviceParameters for mac (pa_mac_core.h)
+
+ done:
+ openpanel directory
+ big-soundfile support
+ escaping filenames for wierdly named externs
+ infrastructure for adding externs in non-ascii languages
+ '$' patch (multiple dollar-sign expansion)
doc:
***************
*** 16,21 ****
--- 24,38 ----
document tabwrite~_start
"list" to signal inlet (e.g., "*~") or float inlet (f) complains.
+ $-expansion changed
problems:
+ crashed Pd putting vec and template in wrong order in array element of struct
+ z.pd - list to numbox misbehaves (inlet and object but object is noinlet)
+ floor, ciel functions in expr misdeclared
+ graphics updates in data sometimes don't happen?
+ graph names don't appear until graph moved? (invis/vis on new array/rename)
+ flag to defeat .pdsettings
+ '{' bug
+ "-audiodev" with no args in registry can't start up in MSW
"save as" with spaces in filename still messes up
don't filter locked click() through getrect
***************
*** 44,50 ****
features:
.dll to .msw32 or .pd_msw (then offer .pd_msw64, .pd_lnx64, etc.)
integrate video into tilde objects
! flag to suppress printing array name above graph
flag to suppress scrollbars in canvases
fix copyright notices
--- 61,70 ----
features:
+ sprout inlet for "route", "sel" if one arg; also send
+ list length and nth functions
+ poly inlet to turn stealing on/off
.dll to .msw32 or .pd_msw (then offer .pd_msw64, .pd_lnx64, etc.)
integrate video into tilde objects
! graph "hide name" flag controllable from dialog
flag to suppress scrollbars in canvases
fix copyright notices
***************
*** 98,101 ****
--- 118,124 ----
more features:
+ "-march=pentium4 -O2 -mfpmath=sse -msse -msse2 -mmmx" ?
+ try to improve for AMD - try "-march=athlon-xp -msse2"
+ search for -mcpu=cpu-type in man gcc.
-Wno-unused to -Wno-unused-paramter and clean up unused automatic variables
security module system in 2.6 - see the kernel module replacing jackstart
Index: d_soundfile.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_soundfile.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** d_soundfile.c 31 Dec 2005 20:55:25 -0000 1.10
--- d_soundfile.c 3 Jun 2006 19:13:07 -0000 1.11
***************
*** 1791,1795 ****
else
{
- idle:
for (i = 0; i < noutlets; i++)
for (j = vecsize, fp = x->x_outvec[i]; j--; )
--- 1791,1794 ----
Index: s_audio.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** s_audio.c 15 Oct 2005 23:14:28 -0000 1.8
--- s_audio.c 3 Jun 2006 19:13:07 -0000 1.9
***************
*** 609,613 ****
post("input devices:");
for (i = 0; i < nindevs; i++)
! post("%d. %s", i+1, indevlist + i * DEVDESCSIZE);
}
if (!noutdevs)
--- 609,613 ----
post("input devices:");
for (i = 0; i < nindevs; i++)
! post("%d. %s", i + DEVONSET, indevlist + i * DEVDESCSIZE);
}
if (!noutdevs)
Index: s_loader.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** s_loader.c 31 Dec 2005 20:55:25 -0000 1.7
--- s_loader.c 3 Jun 2006 19:13:07 -0000 1.8
***************
*** 39,44 ****
--- 39,48 ----
#endif
#ifdef MACOSX
+ #ifdef __i386
+ ".pd_imac";
+ #else
".pd_darwin";
#endif
+ #endif
#ifdef MSW
".dll";
***************
*** 74,101 ****
dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
{
! /* next try (alternative_classname).(sys_dllextent) */
! if(altname)
{
! if ((fd = open_via_path(dirname, altname, sys_dllextent,
! dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
!
! /* next try (alternative_classname)/(alternative_classname).(sys_dllextent) ... */
! strncpy(classname2, altname, MAXPDSTRING);
! filename[MAXPDSTRING-2] = 0;
! strcat(classname2, "/");
! strncat(classname2, altname, MAXPDSTRING-strlen(classname2));
! filename[MAXPDSTRING-1] = 0;
! if ((fd = open_via_path(dirname, classname2, sys_dllextent,
! dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
{
! return 0;
! }
}
! else
! return (0);
}
}
-
-
close(fd);
class_set_extern_dir(gensym(dirbuf));
--- 78,105 ----
dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
{
! /* next try (alternative_classname).(sys_dllextent) */
! if (altname)
{
! if ((fd = open_via_path(dirname, altname, sys_dllextent,
! dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
{
! /* next try
! (alt_classname)/(alt_classname).(sys_dllextent) */
! strncpy(classname2, altname, MAXPDSTRING);
! filename[MAXPDSTRING-2] = 0;
! strcat(classname2, "/");
! strncat(classname2, altname,
! MAXPDSTRING-strlen(classname2));
! filename[MAXPDSTRING-1] = 0;
! if ((fd = open_via_path(dirname, classname2,
! sys_dllextent, dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
! {
! return 0;
! }
! }
}
! else return (0);
}
}
close(fd);
class_set_extern_dir(gensym(dirbuf));
***************
*** 111,115 ****
*lastdot = 0;
! #ifdef MACOSX
strcpy(symname, "_");
strcat(symname, nameptr);
--- 115,119 ----
*lastdot = 0;
! #ifdef DIDFORMACOSX /* no longer correct on macosx??? */
strcpy(symname, "_");
strcat(symname, nameptr);
***************
*** 135,138 ****
--- 139,143 ----
#ifdef DL_OPEN
dlobj = dlopen(filename, RTLD_NOW | RTLD_GLOBAL);
+ post("opened %x", dlobj);
if (!dlobj)
{
Index: s_main.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** s_main.c 31 Dec 2005 20:55:25 -0000 1.22
--- s_main.c 3 Jun 2006 19:13:07 -0000 1.23
***************
*** 104,108 ****
static t_fontinfo sys_fontlist[] = {
! {8, 5, 9, 0, 0, 0}, {10, 7, 13, 0, 0, 0}, {12, 9, 16, 0, 0, 0},
{16, 10, 20, 0, 0, 0}, {24, 15, 25, 0, 0, 0}, {36, 25, 45, 0, 0, 0}};
#define NFONT (sizeof(sys_fontlist)/sizeof(*sys_fontlist))
--- 104,108 ----
static t_fontinfo sys_fontlist[] = {
! {8, 6, 10, 0, 0, 0}, {10, 7, 13, 0, 0, 0}, {12, 9, 16, 0, 0, 0},
{16, 10, 20, 0, 0, 0}, {24, 15, 25, 0, 0, 0}, {36, 25, 45, 0, 0, 0}};
#define NFONT (sizeof(sys_fontlist)/sizeof(*sys_fontlist))
***************
*** 176,181 ****
}
- #define NHOSTFONT 7
-
/* this is called from the gui process. The first argument is the cwd, and
succeeding args give the widths and heights of known fonts. We wait until
--- 176,179 ----
***************
*** 190,212 ****
char *cwd = atom_getsymbolarg(0, argc, argv)->s_name;
t_namelist *nl;
! unsigned int i, j;
! if (argc != 2 + 3 * NHOSTFONT) bug("glob_initfromgui");
for (i = 0; i < NFONT; i++)
{
int wantheight = sys_fontlist[i].fi_maxheight;
! for (j = 0; j < NHOSTFONT-1; j++)
{
! if (atom_getintarg(3 * (j + 1) + 3, argc, argv) > wantheight)
! break;
}
! /* j is now the "real" font index for the desired font index i. */
! sys_fontlist[i].fi_hostfontsize = atom_getintarg(3 * j + 1, argc, argv);
! sys_fontlist[i].fi_width = atom_getintarg(3 * j + 2, argc, argv);
! sys_fontlist[i].fi_height = atom_getintarg(3 * j + 3, argc, argv);
}
#if 0
for (i = 0; i < 6; i++)
! fprintf(stderr, "font %d %d %d %d %d\n",
sys_fontlist[i].fi_fontsize,
sys_fontlist[i].fi_maxheight,
sys_fontlist[i].fi_hostfontsize,
--- 188,218 ----
char *cwd = atom_getsymbolarg(0, argc, argv)->s_name;
t_namelist *nl;
! unsigned int i;
! int j;
! int nhostfont = (argc-2)/3;
! sys_oldtclversion = atom_getfloatarg(1, argc, argv);
! if (argc != 2 + 3 * nhostfont) bug("glob_initfromgui");
for (i = 0; i < NFONT; i++)
{
+ int best = 0;
int wantheight = sys_fontlist[i].fi_maxheight;
! int wantwidth = sys_fontlist[i].fi_maxwidth;
! for (j = 1; j < nhostfont; j++)
{
! if (atom_getintarg(3 * j + 4, argc, argv) <= wantheight &&
! atom_getintarg(3 * j + 3, argc, argv) <= wantwidth)
! best = j;
}
! /* best is now the host font index for the desired font index i. */
! sys_fontlist[i].fi_hostfontsize =
! atom_getintarg(3 * best + 2, argc, argv);
! sys_fontlist[i].fi_width = atom_getintarg(3 * best + 3, argc, argv);
! sys_fontlist[i].fi_height = atom_getintarg(3 * best + 4, argc, argv);
}
#if 0
for (i = 0; i < 6; i++)
! fprintf(stderr, "font (%d %d %d) -> (%d %d %d)\n",
sys_fontlist[i].fi_fontsize,
+ sys_fontlist[i].fi_maxwidth,
sys_fontlist[i].fi_maxheight,
sys_fontlist[i].fi_hostfontsize,
***************
*** 233,237 ****
namelist_free(sys_messagelist);
sys_messagelist = 0;
- sys_oldtclversion = atom_getfloatarg(1 + 3 * NHOSTFONT, argc, argv);
}
--- 239,242 ----
***************
*** 518,522 ****
argv += 2;
}
! else if (!strcmp(*argv, "-inchannels"))
{
sys_parsedevlist(&sys_nchin,
--- 523,527 ----
argv += 2;
}
! else if (!strcmp(*argv, "-inchannels") && (argc > 1))
{
sys_parsedevlist(&sys_nchin,
***************
*** 528,532 ****
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-outchannels"))
{
sys_parsedevlist(&sys_nchout, sys_choutlist,
--- 533,537 ----
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-outchannels") && (argc > 1))
{
sys_parsedevlist(&sys_nchout, sys_choutlist,
***************
*** 538,542 ****
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-channels"))
{
sys_parsedevlist(&sys_nchin, sys_chinlist,MAXAUDIOINDEV,
--- 543,547 ----
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-channels") && (argc > 1))
{
sys_parsedevlist(&sys_nchin, sys_chinlist,MAXAUDIOINDEV,
***************
*** 550,554 ****
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-soundbuf") || !strcmp(*argv, "-audiobuf"))
{
sys_main_advance = atoi(argv[1]);
--- 555,559 ----
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-soundbuf") || !strcmp(*argv, "-audiobuf") && (argc > 1))
{
sys_main_advance = atoi(argv[1]);
***************
*** 560,564 ****
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-sleepgrain"))
{
sys_sleepgrain = 1000 * atoi(argv[1]);
--- 565,569 ----
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-sleepgrain") && (argc > 1))
{
sys_sleepgrain = 1000 * atoi(argv[1]);
***************
*** 602,606 ****
argc--; argv++;
}
! else if (!strcmp(*argv, "-alsaadd"))
{
if (argc > 1)
--- 607,611 ----
argc--; argv++;
}
! else if (!strcmp(*argv, "-alsaadd") && (argc > 1))
{
if (argc > 1)
***************
*** 665,669 ****
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-midioutdev"))
{
sys_parsedevlist(&sys_nmidiout, sys_midioutdevlist, MAXMIDIOUTDEV,
--- 670,674 ----
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-midioutdev") && (argc > 1))
{
sys_parsedevlist(&sys_nmidiout, sys_midioutdevlist, MAXMIDIOUTDEV,
***************
*** 673,677 ****
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-mididev"))
{
sys_parsedevlist(&sys_nmidiin, sys_midiindevlist, MAXMIDIINDEV,
--- 678,682 ----
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-mididev") && (argc > 1))
{
sys_parsedevlist(&sys_nmidiin, sys_midiindevlist, MAXMIDIINDEV,
***************
*** 683,687 ****
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-path"))
{
sys_searchpath = namelist_append_files(sys_searchpath, argv[1]);
--- 688,692 ----
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-path") && (argc > 1))
{
sys_searchpath = namelist_append_files(sys_searchpath, argv[1]);
***************
*** 823,827 ****
argc -= 2; argv += 2;
}
! else if (!strcmp(*argv, "-sounddev") || !strcmp(*argv, "-audiodev"))
{
sys_parsedevlist(&sys_nsoundin, sys_soundindevlist,
--- 828,833 ----
argc -= 2; argv += 2;
}
! else if ((!strcmp(*argv, "-sounddev") || !strcmp(*argv, "-audiodev"))
! && (argc > 1))
{
sys_parsedevlist(&sys_nsoundin, sys_soundindevlist,
Index: g_array.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_array.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** g_array.c 19 Aug 2005 23:28:03 -0000 1.9
--- g_array.c 3 Jun 2006 19:13:07 -0000 1.10
***************
*** 134,137 ****
--- 134,138 ----
char x_saveit; /* true if we should save this with parent */
char x_listviewing; /* true if list view window is open */
+ char x_hidename; /* don't print name above graph */
};
***************
*** 246,253 ****
}
! /* get the array's name */
! t_symbol *garray_getname(t_garray *x)
{
! return (x->x_name);
}
--- 247,255 ----
}
! /* get the array's name. Return nonzero if it should be hidden */
! int garray_getname(t_garray *x, t_symbol **namep)
{
! *namep = x->x_name;
! return (x->x_hidename);
}
***************
*** 321,324 ****
--- 323,327 ----
saveit = ((flags & 1) != 0);
x = graph_scalar(gl, s, templatesym, saveit);
+ x->x_hidename = ((flags & 8) >> 3);
if (n <= 0)
***************
*** 487,498 ****
void garray_arrayviewlist_fillpage(t_garray *x,
! t_float page)
{
! int i, xonset=0, yonset=0, type=0, elemsize=0;
float yval;
char cmdbuf[200];
t_symbol *arraytype;
t_array *a = garray_getarray_floatonly(x, &yonset, &elemsize);
!
if (!a)
{
--- 490,503 ----
void garray_arrayviewlist_fillpage(t_garray *x,
! t_float page,
! t_float fTopItem)
{
! int i, xonset=0, yonset=0, type=0, elemsize=0, topItem;
float yval;
char cmdbuf[200];
t_symbol *arraytype;
t_array *a = garray_getarray_floatonly(x, &yonset, &elemsize);
!
! topItem = (int)fTopItem;
if (!a)
{
***************
*** 528,531 ****
--- 533,539 ----
yval);
}
+ sys_vgui(".%sArrayWindow.lb yview %d\n",
+ x->x_realname->s_name,
+ topItem);
}
***************
*** 541,546 ****
{
t_pd *x2;
/* jsarlo { */
! if (x->x_listviewing)
{
garray_arrayviewlist_close(x);
--- 549,555 ----
{
t_pd *x2;
+ sys_unqueuegui(&x->x_gobj);
/* jsarlo { */
! if (x->x_listviewing)
{
garray_arrayviewlist_close(x);
***************
*** 1029,1033 ****
(style == PLOTSTYLE_POLY ? 0 : style));
binbuf_addv(b, "sssisi;", gensym("#X"), gensym("array"),
! x->x_name, array->a_n, &s_float, x->x_saveit + 2 * filestyle);
if (x->x_saveit)
{
--- 1038,1043 ----
(style == PLOTSTYLE_POLY ? 0 : style));
binbuf_addv(b, "sssisi;", gensym("#X"), gensym("array"),
! x->x_name, array->a_n, &s_float,
! x->x_saveit + 2 * filestyle + 8*x->x_hidename);
if (x->x_saveit)
{
***************
*** 1495,1499 ****
gensym("arrayviewlistnew"), A_NULL);
class_addmethod(garray_class, (t_method)garray_arrayviewlist_fillpage,
! gensym("arrayviewlistfillpage"), A_FLOAT, A_NULL);
class_addmethod(garray_class, (t_method)garray_arrayviewlist_close,
gensym("arrayviewclose"), A_NULL);
--- 1505,1509 ----
gensym("arrayviewlistnew"), A_NULL);
class_addmethod(garray_class, (t_method)garray_arrayviewlist_fillpage,
! gensym("arrayviewlistfillpage"), A_FLOAT, A_DEFFLOAT, A_NULL);
class_addmethod(garray_class, (t_method)garray_arrayviewlist_close,
gensym("arrayviewclose"), A_NULL);
Index: s_audio_paring.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio_paring.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** s_audio_paring.h 6 Sep 2004 20:20:35 -0000 1.1
--- s_audio_paring.h 3 Jun 2006 19:13:07 -0000 1.2
***************
*** 44,78 ****
#include <stdlib.h>
#include <math.h>
! #include "ringbuffer.h"
#include <string.h>
typedef struct
{
! long bufferSize; /* Number of bytes in FIFO. Power of 2. Set by RingBuffer_Init. */
/* These are declared volatile because they are written by a different thread than the reader. */
! volatile long writeIndex; /* Index of next writable byte. Set by RingBuffer_AdvanceWriteIndex. */
! volatile long readIndex; /* Index of next readable byte. Set by RingBuffer_AdvanceReadIndex. */
long bigMask; /* Used for wrapping indices with extra bit to distinguish full/empty. */
long smallMask; /* Used for fitting indices to buffer. */
char *buffer;
}
! RingBuffer;
/*
* Initialize Ring Buffer.
* numBytes must be power of 2, returns -1 if not.
*/
! long RingBuffer_Init( RingBuffer *rbuf, long numBytes, void *dataPtr );
/* Clear buffer. Should only be called when buffer is NOT being read. */
! void RingBuffer_Flush( RingBuffer *rbuf );
/* Return number of bytes available for writing. */
! long RingBuffer_GetWriteAvailable( RingBuffer *rbuf );
/* Return number of bytes available for read. */
! long RingBuffer_GetReadAvailable( RingBuffer *rbuf );
/* Return bytes written. */
! long RingBuffer_Write( RingBuffer *rbuf, const void *data, long numBytes );
/* Return bytes read. */
! long RingBuffer_Read( RingBuffer *rbuf, void *data, long numBytes );
/* Get address of region(s) to which we can write data.
--- 44,78 ----
#include <stdlib.h>
#include <math.h>
! #include "s_audio_paring.h"
#include <string.h>
typedef struct
{
! long bufferSize; /* Number of bytes in FIFO. Power of 2. Set by sys_ringbuf_Init. */
/* These are declared volatile because they are written by a different thread than the reader. */
! volatile long writeIndex; /* Index of next writable byte. Set by sys_ringbuf_AdvanceWriteIndex. */
! volatile long readIndex; /* Index of next readable byte. Set by sys_ringbuf_AdvanceReadIndex. */
long bigMask; /* Used for wrapping indices with extra bit to distinguish full/empty. */
long smallMask; /* Used for fitting indices to buffer. */
char *buffer;
}
! sys_ringbuf;
/*
* Initialize Ring Buffer.
* numBytes must be power of 2, returns -1 if not.
*/
! long sys_ringbuf_Init( sys_ringbuf *rbuf, long numBytes, void *dataPtr );
/* Clear buffer. Should only be called when buffer is NOT being read. */
! void sys_ringbuf_Flush( sys_ringbuf *rbuf );
/* Return number of bytes available for writing. */
! long sys_ringbuf_GetWriteAvailable( sys_ringbuf *rbuf );
/* Return number of bytes available for read. */
! long sys_ringbuf_GetReadAvailable( sys_ringbuf *rbuf );
/* Return bytes written. */
! long sys_ringbuf_Write( sys_ringbuf *rbuf, const void *data, long numBytes );
/* Return bytes read. */
! long sys_ringbuf_Read( sys_ringbuf *rbuf, void *data, long numBytes );
/* Get address of region(s) to which we can write data.
***************
*** 81,88 ****
** Returns room available to be written or numBytes, whichever is smaller.
*/
! long RingBuffer_GetWriteRegions( RingBuffer *rbuf, long numBytes,
void **dataPtr1, long *sizePtr1,
void **dataPtr2, long *sizePtr2 );
! long RingBuffer_AdvanceWriteIndex( RingBuffer *rbuf, long numBytes );
/* Get address of region(s) from which we can read data.
--- 81,88 ----
** Returns room available to be written or numBytes, whichever is smaller.
*/
! long sys_ringbuf_GetWriteRegions( sys_ringbuf *rbuf, long numBytes,
void **dataPtr1, long *sizePtr1,
void **dataPtr2, long *sizePtr2 );
! long sys_ringbuf_AdvanceWriteIndex( sys_ringbuf *rbuf, long numBytes );
/* Get address of region(s) from which we can read data.
***************
*** 91,99 ****
** Returns room available to be read or numBytes, whichever is smaller.
*/
! long RingBuffer_GetReadRegions( RingBuffer *rbuf, long numBytes,
void **dataPtr1, long *sizePtr1,
void **dataPtr2, long *sizePtr2 );
! long RingBuffer_AdvanceReadIndex( RingBuffer *rbuf, long numBytes );
#ifdef __cplusplus
--- 91,99 ----
** Returns room available to be read or numBytes, whichever is smaller.
*/
! long sys_ringbuf_GetReadRegions( sys_ringbuf *rbuf, long numBytes,
void **dataPtr1, long *sizePtr1,
void **dataPtr2, long *sizePtr2 );
! long sys_ringbuf_AdvanceReadIndex( sys_ringbuf *rbuf, long numBytes );
#ifdef __cplusplus
Index: s_audio_paring.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio_paring.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** s_audio_paring.c 6 Sep 2004 20:20:35 -0000 1.1
--- s_audio_paring.c 3 Jun 2006 19:13:07 -0000 1.2
***************
*** 48,61 ****
* Initialize FIFO.
*/
! long RingBuffer_Init( RingBuffer *rbuf, long numBytes, void *dataPtr )
{
rbuf->bufferSize = numBytes;
rbuf->buffer = (char *)dataPtr;
! RingBuffer_Flush( rbuf );
return 0;
}
/***************************************************************************
** Return number of bytes available for reading. */
! long RingBuffer_GetReadAvailable( RingBuffer *rbuf )
{
long ret = rbuf->writeIndex - rbuf->readIndex;
--- 48,61 ----
* Initialize FIFO.
*/
! long sys_ringbuf_Init( sys_ringbuf *rbuf, long numBytes, void *dataPtr )
{
rbuf->bufferSize = numBytes;
rbuf->buffer = (char *)dataPtr;
! sys_ringbuf_Flush( rbuf );
return 0;
}
/***************************************************************************
** Return number of bytes available for reading. */
! long sys_ringbuf_GetReadAvailable( sys_ringbuf *rbuf )
{
long ret = rbuf->writeIndex - rbuf->readIndex;
***************
*** 64,80 ****
if (ret < 0 || ret > rbuf->bufferSize)
fprintf(stderr,
! "consistency check failed: RingBuffer_GetReadAvailable\n");
return ( ret );
}
/***************************************************************************
** Return number of bytes available for writing. */
! long RingBuffer_GetWriteAvailable( RingBuffer *rbuf )
{
! return ( rbuf->bufferSize - RingBuffer_GetReadAvailable(rbuf));
}
/***************************************************************************
** Clear buffer. Should only be called when buffer is NOT being read. */
! void RingBuffer_Flush( RingBuffer *rbuf )
{
rbuf->writeIndex = rbuf->readIndex = 0;
--- 64,80 ----
if (ret < 0 || ret > rbuf->bufferSize)
fprintf(stderr,
! "consistency check failed: sys_ringbuf_GetReadAvailable\n");
return ( ret );
}
/***************************************************************************
** Return number of bytes available for writing. */
! long sys_ringbuf_GetWriteAvailable( sys_ringbuf *rbuf )
{
! return ( rbuf->bufferSize - sys_ringbuf_GetReadAvailable(rbuf));
}
/***************************************************************************
** Clear buffer. Should only be called when buffer is NOT being read. */
! void sys_ringbuf_Flush( sys_ringbuf *rbuf )
{
rbuf->writeIndex = rbuf->readIndex = 0;
***************
*** 87,96 ****
** Returns room available to be written or numBytes, whichever is smaller.
*/
! long RingBuffer_GetWriteRegions( RingBuffer *rbuf, long numBytes,
void **dataPtr1, long *sizePtr1,
void **dataPtr2, long *sizePtr2 )
{
long index;
! long available = RingBuffer_GetWriteAvailable( rbuf );
if( numBytes > available ) numBytes = available;
/* Check to see if write is not contiguous. */
--- 87,96 ----
** Returns room available to be written or numBytes, whichever is smaller.
*/
! long sys_ringbuf_GetWriteRegions( sys_ringbuf *rbuf, long numBytes,
void **dataPtr1, long *sizePtr1,
void **dataPtr2, long *sizePtr2 )
{
long index;
! long available = sys_ringbuf_GetWriteAvailable( rbuf );
if( numBytes > available ) numBytes = available;
/* Check to see if write is not contiguous. */
***************
*** 120,124 ****
/***************************************************************************
*/
! long RingBuffer_AdvanceWriteIndex( RingBuffer *rbuf, long numBytes )
{
long ret = (rbuf->writeIndex + numBytes);
--- 120,124 ----
/***************************************************************************
*/
! long sys_ringbuf_AdvanceWriteIndex( sys_ringbuf *rbuf, long numBytes )
{
long ret = (rbuf->writeIndex + numBytes);
***************
*** 134,143 ****
** Returns room available to be written or numBytes, whichever is smaller.
*/
! long RingBuffer_GetReadRegions( RingBuffer *rbuf, long numBytes,
void **dataPtr1, long *sizePtr1,
void **dataPtr2, long *sizePtr2 )
{
long index;
! long available = RingBuffer_GetReadAvailable( rbuf );
if( numBytes > available ) numBytes = available;
/* Check to see if read is not contiguous. */
--- 134,143 ----
** Returns room available to be written or numBytes, whichever is smaller.
*/
! long sys_ringbuf_GetReadRegions( sys_ringbuf *rbuf, long numBytes,
void **dataPtr1, long *sizePtr1,
void **dataPtr2, long *sizePtr2 )
{
long index;
! long available = sys_ringbuf_GetReadAvailable( rbuf );
if( numBytes > available ) numBytes = available;
/* Check to see if read is not contiguous. */
***************
*** 166,170 ****
/***************************************************************************
*/
! long RingBuffer_AdvanceReadIndex( RingBuffer *rbuf, long numBytes )
{
long ret = (rbuf->readIndex + numBytes);
--- 166,170 ----
/***************************************************************************
*/
! long sys_ringbuf_AdvanceReadIndex( sys_ringbuf *rbuf, long numBytes )
{
long ret = (rbuf->readIndex + numBytes);
***************
*** 176,184 ****
/***************************************************************************
** Return bytes written. */
! long RingBuffer_Write( RingBuffer *rbuf, const void *data, long numBytes )
{
long size1, size2, numWritten;
void *data1, *data2;
! numWritten = RingBuffer_GetWriteRegions( rbuf, numBytes, &data1, &size1, &data2, &size2 );
if( size2 > 0 )
{
--- 176,184 ----
/***************************************************************************
** Return bytes written. */
! long sys_ringbuf_Write( sys_ringbuf *rbuf, const void *data, long numBytes )
{
long size1, size2, numWritten;
void *data1, *data2;
! numWritten = sys_ringbuf_GetWriteRegions( rbuf, numBytes, &data1, &size1, &data2, &size2 );
if( size2 > 0 )
{
***************
*** 192,196 ****
memcpy( data1, data, size1 );
}
! RingBuffer_AdvanceWriteIndex( rbuf, numWritten );
return numWritten;
}
--- 192,196 ----
memcpy( data1, data, size1 );
}
! sys_ringbuf_AdvanceWriteIndex( rbuf, numWritten );
return numWritten;
}
***************
*** 198,206 ****
/***************************************************************************
** Return bytes read. */
! long RingBuffer_Read( RingBuffer *rbuf, void *data, long numBytes )
{
long size1, size2, numRead;
void *data1, *data2;
! numRead = RingBuffer_GetReadRegions( rbuf, numBytes, &data1, &size1, &data2, &size2 );
if( size2 > 0 )
{
--- 198,206 ----
/***************************************************************************
** Return bytes read. */
! long sys_ringbuf_Read( sys_ringbuf *rbuf, void *data, long numBytes )
{
long size1, size2, numRead;
void *data1, *data2;
! numRead = sys_ringbuf_GetReadRegions( rbuf, numBytes, &data1, &size1, &data2, &size2 );
if( size2 > 0 )
{
***************
*** 213,217 ****
memcpy( data, data1, size1 );
}
! RingBuffer_AdvanceReadIndex( rbuf, numRead );
return numRead;
}
--- 213,217 ----
memcpy( data, data1, size1 );
}
! sys_ringbuf_AdvanceReadIndex( rbuf, numRead );
return numRead;
}
Index: m_atom.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_atom.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** m_atom.c 6 Sep 2004 20:20:35 -0000 1.2
--- m_atom.c 3 Jun 2006 19:13:07 -0000 1.3
***************
*** 89,94 ****
for (sp = a->a_w.w_symbol->s_name, len = 0, quote = 0; *sp; sp++, len++)
if (*sp == ';' || *sp == ',' || *sp == '\\' ||
! (*sp == '$' && sp == a->a_w.w_symbol->s_name && sp[1] >= '0'
! && sp[1] <= '9'))
quote = 1;
if (quote)
--- 89,93 ----
for (sp = a->a_w.w_symbol->s_name, len = 0, quote = 0; *sp; sp++, len++)
if (*sp == ';' || *sp == ',' || *sp == '\\' ||
! (*sp == '$' && sp[1] >= '0' && sp[1] <= '9'))
quote = 1;
if (quote)
***************
*** 99,103 ****
{
if (*sp == ';' || *sp == ',' || *sp == '\\' ||
! (*sp == '$' && bp == buf && sp[1] >= '0' && sp[1] <= '9'))
*bp++ = '\\';
*bp++ = *sp++;
--- 98,102 ----
{
if (*sp == ';' || *sp == ',' || *sp == '\\' ||
! (*sp == '$' && sp[1] >= '0' && sp[1] <= '9'))
*bp++ = '\\';
*bp++ = *sp++;
***************
*** 122,126 ****
break;
case A_DOLLSYM:
! sprintf(buf, "$%s", a->a_w.w_symbol->s_name);
break;
default:
--- 121,126 ----
break;
case A_DOLLSYM:
! snprintf(buf, bufsize-1, "%s", a->a_w.w_symbol->s_name);
! buf[bufsize-1] = 0;
break;
default:
Index: s_inter.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** s_inter.c 31 Dec 2005 20:55:25 -0000 1.15
--- s_inter.c 3 Jun 2006 19:13:07 -0000 1.16
***************
*** 789,792 ****
--- 789,794 ----
if (gq->gq_client == client)
return;
+ if (gq->gq_client == client)
+ return;
gqnextptr = &gq->gq_next;
}
Index: g_graph.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_graph.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** g_graph.c 15 Sep 2005 03:17:27 -0000 1.9
--- g_graph.c 3 Jun 2006 19:13:07 -0000 1.10
***************
*** 673,677 ****
extern t_widgetbehavior text_widgetbehavior;
! t_symbol *garray_getname(t_garray *x);
--- 673,677 ----
extern t_widgetbehavior text_widgetbehavior;
! int garray_getname(t_garray *x, t_symbol **namep);
***************
*** 727,730 ****
--- 727,731 ----
t_gobj *g;
t_symbol *arrayname;
+ t_garray *ga;
/* draw a rectangle around the graph */
sys_vgui(".x%lx.c create line\
***************
*** 735,745 ****
/* if there's just one "garray" in the graph, write its name
along the top */
! if ((g = x->gl_list) && !g->g_next && (g->g_pd == garray_class))
{
! int ymin = (y1 < y2 ? y1 : y2);
! t_symbol *s = garray_getname((t_garray *)g);
! sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor sw\
-font -*-courier-bold--normal--%d-* -tags %s\n",
! (long)glist_getcanvas(x), x1, ymin, s->s_name,
sys_hostfontsize(glist_getfont(x)), tag);
}
--- 736,747 ----
/* if there's just one "garray" in the graph, write its name
along the top */
! for (i = (y1 < y2 ? y1 : y2)-1, g = x->gl_list; g; g = g->g_next)
! if (g->g_pd == garray_class &&
! !garray_getname((t_garray *)g, &arrayname))
{
! i -= sys_fontheight(glist_getfont(x));
! sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor nw\
-font -*-courier-bold--normal--%d-* -tags %s\n",
! (long)glist_getcanvas(x), x1, i, arrayname->s_name,
sys_hostfontsize(glist_getfont(x)), tag);
}
Index: g_editor.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** g_editor.c 31 Dec 2005 20:55:25 -0000 1.14
--- g_editor.c 3 Jun 2006 19:13:07 -0000 1.15
***************
*** 786,793 ****
{
t_gobj *y, *rval = 0;
for (y = x->gl_list; y; y = y->g_next)
{
! if (canvas_hitbox(x, y, xpos, ypos, x1p, y1p, x2p, y2p))
! rval = y;
}
return (rval);
--- 786,796 ----
{
t_gobj *y, *rval = 0;
+ int x1, y1, x2, y2;
+ *x1p = -0x7fffffff;
for (y = x->gl_list; y; y = y->g_next)
{
! if (canvas_hitbox(x, y, xpos, ypos, &x1, &y1, &x2, &y2)
! && (x1 > *x1p))
! *x1p = x1, *y1p = y1, *x2p = x2, *y2p = y2, rval = y;
}
return (rval);
Index: s_audio_pa.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio_pa.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** s_audio_pa.c 6 Nov 2004 16:07:34 -0000 1.5
--- s_audio_pa.c 3 Jun 2006 19:13:07 -0000 1.6
***************
*** 275,284 ****
if (pdi->maxInputChannels > 0 && nin < maxndev)
{
! strcpy(indevlist + nin * devdescsize, pdi->name);
nin++;
}
if (pdi->maxOutputChannels > 0 && nout < maxndev)
{
! strcpy(outdevlist + nout * devdescsize, pdi->name);
nout++;
}
--- 275,288 ----
if (pdi->maxInputChannels > 0 && nin < maxndev)
{
! sprintf(indevlist + nin * devdescsize, "(%d)%s",
! pdi->hostApi,pdi->name);
! /* strcpy(indevlist + nin * devdescsize, pdi->name); */
nin++;
}
if (pdi->maxOutputChannels > 0 && nout < maxndev)
{
! sprintf(outdevlist + nout * devdescsize, "(%d)%s",
! pdi->hostApi,pdi->name);
! /* strcpy(outdevlist + nout * devdescsize, pdi->name); */
nout++;
}