aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pd/doc/1.manual/x5.htm20
-rw-r--r--pd/doc/5.reference/list-help.pd4
-rw-r--r--pd/portaudio/pa_win_wdmks/pa_win_wdmks.c2
-rw-r--r--pd/portaudio/pablio/ringbuffer.c2
-rw-r--r--pd/portaudio/pablio/ringbuffer.h2
-rw-r--r--pd/portmidi/pm_mac/pmmacosxcm.c2
-rw-r--r--pd/src/d_soundfile.c44
-rw-r--r--pd/src/g_canvas.c13
-rw-r--r--pd/src/g_canvas.h1
-rw-r--r--pd/src/g_editor.c4
-rw-r--r--pd/src/g_template.c16
-rw-r--r--pd/src/g_traversal.c2
-rw-r--r--pd/src/m_pd.h2
-rw-r--r--pd/src/s_loader.c4
-rw-r--r--pd/src/u_main.tk2
-rw-r--r--pd/src/x_qlist.c5
16 files changed, 93 insertions, 32 deletions
diff --git a/pd/doc/1.manual/x5.htm b/pd/doc/1.manual/x5.htm
index 1bc8ef9d..ab950b9e 100644
--- a/pd/doc/1.manual/x5.htm
+++ b/pd/doc/1.manual/x5.htm
@@ -19,6 +19,20 @@
<P>This section tracks changes in Pd's current implementation.</P>
<H3> <A name="s2"> 5.1. release notes </A> </H3>
+
+<P> ------------------ 0.40-1 --------------------------
+
+<P> Fixed "declare" which wasn't working properly yet in 0.40-0, and
+made more objects (notably "soundfiler") respect "declared" paths. Path
+entries are relative to the parent patch. Declares inside abstractions are
+ignored.
+
+<P> "drawnumbers" are draggable now, even if they're in arrays.
+
+<P> Bug fix opening "html" help from windows.
+
+<P> Changed MACOSX to __APPLE__ in 4 places.
+
<P> ------------------ 0.40 -----------------------------
<P> A new object, "declare", allows patches to control where Pd looks
@@ -1496,7 +1510,9 @@ The following max-like objects are included:
<H3> <A name="s2"> 5.2. known bugs </A> </H3>
-<P> In the list below, starred items are still things needing attention...
+<P> In the list below, starred items are still things needing attention.
+This list is no longer maintained; see the sourceforge bug tracker on
+https://sourceforge.net/tracker/?group_id=55736
<P> *1. Timing of MIDI input/output is very shaky. Audio I/O is primitive, but
there's at least a way to detect errors now for linux and NT.
@@ -1537,7 +1553,7 @@ holds a "pd" object with tilde objects in the subpatch.
<P> *13. In linux, Pd doesn't report audio data-late errors yet.
<P> *14. Several objects, notably dac~, adc~, and env~, are incompatible with
-uses of block~ or switch~ objects that change block size frmo the default of
+uses of block~ or switch~ objects that change block size from the default of
64. Using switch~ without reblocking causes no problem. Don't try to
read/write delay lines or use send~/receive~, or throw~/catch~, between
windows with different block sizes.
diff --git a/pd/doc/5.reference/list-help.pd b/pd/doc/5.reference/list-help.pd
index 608cd02a..8ab27888 100644
--- a/pd/doc/5.reference/list-help.pd
+++ b/pd/doc/5.reference/list-help.pd
@@ -1,4 +1,4 @@
-#N canvas 596 406 629 492 12;
+#N canvas 256 20 629 492 12;
#X obj 29 11 list;
#X text 76 12 - building and using variable-length messages;
#N canvas 92 130 654 658 about-lists 0;
@@ -361,7 +361,6 @@ append" above.;
#X restore 222 463 pd example3;
#X obj 23 207 list;
#X text 71 208 - short for "list append";
-#X obj 22 182 list trim;
#X text 141 185 - output number of items in list;
#N canvas 188 111 576 365 length 0;
#X msg 126 183 1 2 3;
@@ -386,3 +385,4 @@ in a list or other message.;
#X connect 7 0 8 0;
#X restore 506 186 pd length;
#X text 353 468 updated for Pd version 0.40.;
+#X obj 22 182 list length;
diff --git a/pd/portaudio/pa_win_wdmks/pa_win_wdmks.c b/pd/portaudio/pa_win_wdmks/pa_win_wdmks.c
index 22e67a71..7426c7a5 100644
--- a/pd/portaudio/pa_win_wdmks/pa_win_wdmks.c
+++ b/pd/portaudio/pa_win_wdmks/pa_win_wdmks.c
@@ -1,5 +1,5 @@
/*
- * $Id: pa_win_wdmks.c,v 1.14 2006-10-04 19:35:06 millerpuckette Exp $
+ * $Id: pa_win_wdmks.c,v 1.15 2006-10-09 04:36:12 millerpuckette Exp $
* PortAudio Windows WDM-KS interface
*
* Author: Andrew Baldwin
diff --git a/pd/portaudio/pablio/ringbuffer.c b/pd/portaudio/pablio/ringbuffer.c
index 70fa5e32..f20d7965 100644
--- a/pd/portaudio/pablio/ringbuffer.c
+++ b/pd/portaudio/pablio/ringbuffer.c
@@ -1,5 +1,5 @@
/*
- * $Id: ringbuffer.c,v 1.13 2006-10-04 19:35:06 millerpuckette Exp $
+ * $Id: ringbuffer.c,v 1.14 2006-10-09 04:36:12 millerpuckette Exp $
* ringbuffer.c
* Ring Buffer utility..
*
diff --git a/pd/portaudio/pablio/ringbuffer.h b/pd/portaudio/pablio/ringbuffer.h
index 012e6856..36fab68f 100644
--- a/pd/portaudio/pablio/ringbuffer.h
+++ b/pd/portaudio/pablio/ringbuffer.h
@@ -6,7 +6,7 @@ extern "C"
#endif /* __cplusplus */
/*
- * $Id: ringbuffer.h,v 1.14 2006-10-04 19:35:06 millerpuckette Exp $
+ * $Id: ringbuffer.h,v 1.15 2006-10-09 04:36:12 millerpuckette Exp $
* ringbuffer.h
* Ring Buffer utility..
*
diff --git a/pd/portmidi/pm_mac/pmmacosxcm.c b/pd/portmidi/pm_mac/pmmacosxcm.c
index c1e3d371..4fb4a108 100644
--- a/pd/portmidi/pm_mac/pmmacosxcm.c
+++ b/pd/portmidi/pm_mac/pmmacosxcm.c
@@ -5,7 +5,7 @@
* and subsequent work by Andrew Zeldis and Zico Kolter
* and Roger B. Dannenberg
*
- * $Id: pmmacosxcm.c,v 1.14 2006-10-04 19:35:06 millerpuckette Exp $
+ * $Id: pmmacosxcm.c,v 1.15 2006-10-09 04:36:12 millerpuckette Exp $
*/
/* Notes:
diff --git a/pd/src/d_soundfile.c b/pd/src/d_soundfile.c
index 562979f8..9f186b2d 100644
--- a/pd/src/d_soundfile.c
+++ b/pd/src/d_soundfile.c
@@ -200,18 +200,13 @@ static void swapstring(char *foo, int doit)
* header and fill in the properties.
*/
-int open_soundfile(const char *dirname, const char *filename, int headersize,
+int open_soundfile_via_fd(int fd, int headersize,
int *p_bytespersamp, int *p_bigendian, int *p_nchannels, long *p_bytelimit,
long skipframes)
{
- char buf[OBUFSIZE], *bufptr;
- int fd, format, nchannels, bigendian, bytespersamp, swap, sysrtn;
+ int format, nchannels, bigendian, bytespersamp, swap, sysrtn;
long bytelimit = 0x7fffffff;
errno = 0;
- fd = open_via_path(dirname, filename,
- "", buf, &bufptr, MAXPDSTRING, 1);
- if (fd < 0)
- return (-1);
if (headersize >= 0) /* header detection overridden */
{
bigendian = *p_bigendian;
@@ -221,6 +216,7 @@ int open_soundfile(const char *dirname, const char *filename, int headersize,
}
else
{
+ char buf[OBUFSIZE];
int bytesread = read(fd, buf, READHDRSIZE);
int format;
if (bytesread < 4)
@@ -392,6 +388,38 @@ badheader:
return (-1);
}
+ /* open a soundfile, using open_via_path(). This is used by readsf~ in
+ a not-perfectly-threadsafe way. LATER replace with a thread-hardened
+ version of open_soundfile_via_canvas() */
+int open_soundfile(const char *dirname, const char *filename, int headersize,
+ int *p_bytespersamp, int *p_bigendian, int *p_nchannels, long *p_bytelimit,
+ long skipframes)
+{
+ char buf[OBUFSIZE], *bufptr;
+ int fd;
+ fd = open_via_path(dirname, filename, "", buf, &bufptr, MAXPDSTRING, 1);
+ if (fd < 0)
+ return (-1);
+ else return (open_soundfile_via_fd(fd, headersize, p_bytespersamp,
+ p_bigendian, p_nchannels, p_bytelimit, skipframes));
+}
+
+ /* open a soundfile, using open_via_canvas(). This is used by readsf~ in
+ a not-perfectly-threadsafe way. LATER replace with a thread-hardened
+ version of open_soundfile_via_canvas() */
+int open_soundfile_via_canvas(t_canvas *canvas, const char *filename, int headersize,
+ int *p_bytespersamp, int *p_bigendian, int *p_nchannels, long *p_bytelimit,
+ long skipframes)
+{
+ char buf[OBUFSIZE], *bufptr;
+ int fd;
+ fd = canvas_open(canvas, filename, "", buf, &bufptr, MAXPDSTRING, 1);
+ if (fd < 0)
+ return (-1);
+ else return (open_soundfile_via_fd(fd, headersize, p_bytespersamp,
+ p_bigendian, p_nchannels, p_bytelimit, skipframes));
+}
+
static void soundfile_xferin(int sfchannels, int nvecs, float **vecs,
long itemsread, unsigned char *buf, int nitems, int bytespersamp,
int bigendian)
@@ -1033,7 +1061,7 @@ static void soundfiler_read(t_soundfiler *x, t_symbol *s,
}
finalsize = vecsize;
}
- fd = open_soundfile(canvas_getdir(x->x_canvas)->s_name, filename,
+ fd = open_soundfile_via_canvas(x->x_canvas, filename,
headersize, &bytespersamp, &bigendian, &channels, &bytelimit,
skipframes);
diff --git a/pd/src/g_canvas.c b/pd/src/g_canvas.c
index 9385c05f..5a52a07a 100644
--- a/pd/src/g_canvas.c
+++ b/pd/src/g_canvas.c
@@ -1552,9 +1552,20 @@ int canvas_open(t_canvas *x, const char *name, const char *ext,
if (y->gl_env)
{
t_namelist *nl;
+ t_canvas *x2 = x;
+ char *dir;
+ while (x2 && x2->gl_owner)
+ x2 = x2->gl_owner;
+ dir = (x2 ? canvas_getdir(x2)->s_name : ".");
for (nl = y->gl_env->ce_path; nl; nl = nl->nl_next)
{
- if ((fd = sys_trytoopenone(nl->nl_string, name, ext,
+ char realname[MAXPDSTRING];
+ strncpy(realname, dir, MAXPDSTRING);
+ realname[MAXPDSTRING-3] = 0;
+ strcat(realname, "/");
+ strncat(realname, nl->nl_string, MAXPDSTRING-strlen(realname));
+ realname[MAXPDSTRING-1] = 0;
+ if ((fd = sys_trytoopenone(realname, name, ext,
dirresult, nameresult, size, bin)) >= 0)
return (fd);
}
diff --git a/pd/src/g_canvas.h b/pd/src/g_canvas.h
index f1c99769..d3dee3d3 100644
--- a/pd/src/g_canvas.h
+++ b/pd/src/g_canvas.h
@@ -536,6 +536,7 @@ EXTERN void array_free(t_array *x);
EXTERN t_gstub *gstub_new(t_glist *gl, t_array *a);
EXTERN void gstub_cutoff(t_gstub *gs);
EXTERN void gpointer_setglist(t_gpointer *gp, t_glist *glist, t_scalar *x);
+EXTERN void gpointer_setarray(t_gpointer *gp, t_array *array, t_word *w);
/* --------------------- scalars ------------------------- */
EXTERN void word_init(t_word *wp, t_template *tmpl, t_gpointer *gp);
diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c
index cbc9e1d7..aa8b35c0 100644
--- a/pd/src/g_editor.c
+++ b/pd/src/g_editor.c
@@ -1947,7 +1947,7 @@ static void canvas_copy(t_canvas *x)
int bufsize;
rtext_getseltext(x->gl_editor->e_textedfor, &buf, &bufsize);
-#if defined(MSW) || defined(MACOSX)
+#if defined(MSW) || defined(__APPLE__)
/* for Mac or Windows, copy the text to the clipboard here */
sys_vgui("clipboard clear\n", bufsize, buf);
sys_vgui("clipboard append {%.*s}\n", bufsize, buf);
@@ -2111,7 +2111,7 @@ static void canvas_paste(t_canvas *x)
if (x->gl_editor->e_textedfor)
{
/* simulate keystrokes as if the copy buffer were typed in. */
-#if defined(MSW) || defined(MACOSX)
+#if defined(MSW) || defined(__APPLE__)
/* for Mac or Windows, ask the GUI to send the clipboard down */
sys_gui("pdtk_pastetext\n");
#else
diff --git a/pd/src/g_template.c b/pd/src/g_template.c
index 2ee67196..3d00b5dd 100644
--- a/pd/src/g_template.c
+++ b/pd/src/g_template.c
@@ -1285,8 +1285,11 @@ static int curve_click(t_gobj *z, t_glist *glist,
curve_motion_wp = data;
curve_motion_field = 2*bestn;
curve_motion_template = template;
- gpointer_setglist(&curve_motion_gpointer, curve_motion_glist,
- curve_motion_scalar);
+ if (curve_motion_scalar)
+ gpointer_setglist(&curve_motion_gpointer, curve_motion_glist,
+ curve_motion_scalar);
+ else gpointer_setarray(&curve_motion_gpointer,
+ curve_motion_array, curve_motion_wp);
glist_grab(glist, z, curve_motion, 0, xpix, ypix);
}
return (1);
@@ -2268,9 +2271,12 @@ static int drawnumber_click(t_gobj *z, t_glist *glist,
drawnumber_motion_ycumulative =
fielddesc_getfloat(&x->x_value, template, data, 0);
drawnumber_motion_symbol = ((x->x_flags & DRAW_SYMBOL) != 0);
- gpointer_setglist(&drawnumber_motion_gpointer,
- drawnumber_motion_glist, drawnumber_motion_scalar);
- glist_grab(glist, z, drawnumber_motion, drawnumber_key,
+ if (drawnumber_motion_scalar)
+ gpointer_setglist(&drawnumber_motion_gpointer,
+ drawnumber_motion_glist, drawnumber_motion_scalar);
+ else gpointer_setarray(&drawnumber_motion_gpointer,
+ drawnumber_motion_array, drawnumber_motion_wp);
+ glist_grab(glist, z, drawnumber_motion, drawnumber_key,
xpix, ypix);
}
return (1);
diff --git a/pd/src/g_traversal.c b/pd/src/g_traversal.c
index 9ec8ca90..7de67848 100644
--- a/pd/src/g_traversal.c
+++ b/pd/src/g_traversal.c
@@ -143,7 +143,7 @@ void gpointer_setglist(t_gpointer *gp, t_glist *glist, t_scalar *x)
gs->gs_refcount++;
}
-static void gpointer_setarray(t_gpointer *gp, t_array *array, t_word *w)
+void gpointer_setarray(t_gpointer *gp, t_array *array, t_word *w)
{
t_gstub *gs;
if (gs = gp->gp_stub) gstub_dis(gs);
diff --git a/pd/src/m_pd.h b/pd/src/m_pd.h
index d733a6cd..8f22b765 100644
--- a/pd/src/m_pd.h
+++ b/pd/src/m_pd.h
@@ -10,7 +10,7 @@ extern "C" {
#define PD_MAJOR_VERSION 0
#define PD_MINOR_VERSION 40
-#define PD_BUGFIX_VERSION 0
+#define PD_BUGFIX_VERSION 1
#define PD_TEST_VERSION ""
/* old name for "MSW" flag -- we have to take it for the sake of many old
diff --git a/pd/src/s_loader.c b/pd/src/s_loader.c
index b72d799b..a10ebab6 100644
--- a/pd/src/s_loader.c
+++ b/pd/src/s_loader.c
@@ -13,7 +13,7 @@
#include <io.h>
#include <windows.h>
#endif
-#ifdef MACOSX
+#ifdef __APPLE__
#include <mach-o/dyld.h>
#endif
#include <string.h>
@@ -41,7 +41,7 @@ static char sys_dllextent[] = ".l_ia64", sys_dllextent2[] = ".pd_linux";
static char sys_dllextent[] = ".l_i386", sys_dllextent2[] = ".pd_linux";
#endif
#endif
-#ifdef MACOSX
+#ifdef __APPLE__
#ifndef MACOSX3
static char sys_dllextent[] = ".d_fat", sys_dllextent2[] = ".pd_darwin";
#else
diff --git a/pd/src/u_main.tk b/pd/src/u_main.tk
index 97fc77b4..a05d145f 100644
--- a/pd/src/u_main.tk
+++ b/pd/src/u_main.tk
@@ -394,7 +394,7 @@ proc menu_openhtml {filename} {
exec sh -c [format "open %s" $filename]
} else {
exec rundll32 url.dll,FileProtocolHandler \
- [format "file:%s" $filename] &
+ [format "file://%s" $filename] &
}
}
diff --git a/pd/src/x_qlist.c b/pd/src/x_qlist.c
index 4b6a393b..271259a3 100644
--- a/pd/src/x_qlist.c
+++ b/pd/src/x_qlist.c
@@ -181,9 +181,8 @@ static void qlist_read(t_qlist *x, t_symbol *filename, t_symbol *format)
cr = 1;
else if (*format->s_name)
error("qlist_read: unknown flag: %s", format->s_name);
-
- if (binbuf_read_via_path(x->x_binbuf, filename->s_name,
- canvas_getdir(x->x_canvas)->s_name, cr))
+
+ if (binbuf_read_via_canvas(x->x_binbuf, filename->s_name, x->x_canvas, cr))
error("%s: read failed", filename->s_name);
x->x_onset = 0x7fffffff;
x->x_reentered = 1;