aboutsummaryrefslogtreecommitdiff
path: root/pd/src
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2005-05-18 04:28:51 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2005-05-18 04:28:51 +0000
commit388f7a1df37afeed0dd120f8091614a7f6dd91ab (patch)
tree8a439951a1c190b1fc786abc4f69b23181c54168 /pd/src
parentbb13717ae41bfa317e7b84625201279a5a2a09d9 (diff)
Damn, edited this before and lost the update. More data features.
Took about 12 patches. svn path=/trunk/; revision=3006
Diffstat (limited to 'pd/src')
-rw-r--r--pd/src/CHANGELOG.txt23
-rw-r--r--pd/src/configure.in8
-rw-r--r--pd/src/d_filter.c27
-rw-r--r--pd/src/d_mayer_fft.c3
-rw-r--r--pd/src/g_all_guis.c5
-rw-r--r--pd/src/g_array.c126
-rw-r--r--pd/src/g_canvas.c54
-rw-r--r--pd/src/g_canvas.h18
-rw-r--r--pd/src/g_editor.c2
-rw-r--r--pd/src/g_graph.c29
-rw-r--r--pd/src/g_scalar.c28
-rw-r--r--pd/src/g_template.c504
-rw-r--r--pd/src/g_text.c8
-rw-r--r--pd/src/m_obj.c7
-rw-r--r--pd/src/m_pd.h2
-rw-r--r--pd/src/m_sched.c12
-rw-r--r--pd/src/makefile6
-rw-r--r--pd/src/makefile.dependencies938
-rw-r--r--pd/src/makefile.in4
-rw-r--r--pd/src/notes.txt65
-rw-r--r--pd/src/s_audio_alsa.c25
-rw-r--r--pd/src/s_audio_alsamm.c8
-rw-r--r--pd/src/s_audio_pablio.c2
-rw-r--r--pd/src/s_file.c26
-rw-r--r--pd/src/s_inter.c22
-rw-r--r--pd/src/s_loader.c14
-rw-r--r--pd/src/s_main.c17
-rw-r--r--pd/src/s_path.c16
-rw-r--r--pd/src/s_print.c18
-rw-r--r--pd/src/u_main.tk806
30 files changed, 1285 insertions, 1538 deletions
diff --git a/pd/src/CHANGELOG.txt b/pd/src/CHANGELOG.txt
index c8cc8f49..39eefbef 100644
--- a/pd/src/CHANGELOG.txt
+++ b/pd/src/CHANGELOG.txt
@@ -3,6 +3,29 @@ user appears in the "release notes" instead.
0.38.0
+finally figured out how to do "-enable-", etc., flags in the configure
+script correctly.
+
+The scheduler now has a hook (set_so you can add polling routines) :
+ sys_idlehook().
+
+I'm now uploading directly to CVS repository ("main" and "stable_0_38"
+branches.) There are still problems keeping CVS's and my versions of
+portaudio the same (CVS bashes the "ident" lines).
+
+t_int to int in binbuf_addv prototype
+
+64-bit fix to externs makefiles
+
+Pd now uses portaudio out-of-the-box; customized files are moved to
+"src" directory.
+
+All "tags" are printf'd as %lx to make 64-bit safe.
+
+GUI queueing mechanism added: sys_queuegui() etc.
+
+massive rewrite of array code to unify arrays and scalars.
+
fixed empty lists automatically to call "bang" method if one is supplied.
rewrote the "namelist" stuff to facilitate preference saving (s_stuff.h,
diff --git a/pd/src/configure.in b/pd/src/configure.in
index 0f9fa291..5428eafb 100644
--- a/pd/src/configure.in
+++ b/pd/src/configure.in
@@ -152,9 +152,11 @@ dnl This should be fixed so Pd can use ALSA shared libraries where appropriate.
dnl Checking for JACK
- AC_CHECK_LIB(rt,shm_open,LIBS="$LIBS -lrt")
- AC_CHECK_LIB(jack,jack_set_xrun_callback,LIBS="$LIBS -ljack";jack=xrun,jack=no)
- AC_CHECK_LIB(jack,jack_set_error_function,LIBS="$LIBS -ljack";jack=yes,jack=no)
+ if test x$jack == xyes; then
+ AC_CHECK_LIB(rt,shm_open,LIBS="$LIBS -lrt")
+ AC_CHECK_LIB(jack,jack_set_xrun_callback,LIBS="$LIBS -ljack";jack=xrun,jack=no)
+ AC_CHECK_LIB(jack,jack_set_error_function,LIBS="$LIBS -ljack";jack=yes,jack=no)
+ fi
LDFLAGS="-Wl,-export-dynamic"
if test "$static" = "yes"; then
diff --git a/pd/src/d_filter.c b/pd/src/d_filter.c
index 7a5649ee..39cc9f6f 100644
--- a/pd/src/d_filter.c
+++ b/pd/src/d_filter.c
@@ -549,10 +549,11 @@ t_class *sigrpole_class;
static void *sigrpole_new(t_float f)
{
t_sigrpole *x = (t_sigrpole *)pd_new(sigrpole_class);
- inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal);
+ pd_float(
+ (t_pd *)inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal),
+ f);
outlet_new(&x->x_obj, &s_signal);
x->x_last = 0;
- x->x_f = f;
return (x);
}
@@ -571,6 +572,8 @@ static t_int *sigrpole_perform(t_int *w)
float coef = *in2++;
*out++ = last = coef * last + next;
}
+ if (PD_BIGORSMALL(last))
+ last = 0;
x->x_last = last;
return (w+6);
}
@@ -619,10 +622,11 @@ t_class *sigrzero_class;
static void *sigrzero_new(t_float f)
{
t_sigrzero *x = (t_sigrzero *)pd_new(sigrzero_class);
- inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal);
+ pd_float(
+ (t_pd *)inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal),
+ f);
outlet_new(&x->x_obj, &s_signal);
x->x_last = 0;
- x->x_f = f;
return (x);
}
@@ -690,10 +694,11 @@ t_class *sigrzero_rev_class;
static void *sigrzero_rev_new(t_float f)
{
t_sigrzero_rev *x = (t_sigrzero_rev *)pd_new(sigrzero_rev_class);
- inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal);
+ pd_float(
+ (t_pd *)inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal),
+ f);
outlet_new(&x->x_obj, &s_signal);
x->x_last = 0;
- x->x_f = f;
return (x);
}
@@ -800,6 +805,10 @@ static t_int *sigcpole_perform(t_int *w)
lastim = *outim++ = nextim + lastre * coefim + lastim * coefre;
lastre = tempre;
}
+ if (PD_BIGORSMALL(lastre))
+ lastre = 0;
+ if (PD_BIGORSMALL(lastim))
+ lastim = 0;
x->x_lastre = lastre;
x->x_lastim = lastim;
return (w+9);
@@ -975,8 +984,10 @@ static t_int *sigczero_rev_perform(t_int *w)
float nextim = *inim1++;
float coefre = *inre2++;
float coefim = *inim2++;
- *outre++ = lastre - nextre * coefre + nextim * coefim;
- *outim++ = lastim - nextre * coefim - nextim * coefre;
+ /* transfer function is (A bar) - Z^-1, for the same
+ frequency response as 1 - AZ^-1 from czero_tilde. */
+ *outre++ = lastre - nextre * coefre - nextim * coefim;
+ *outim++ = lastim - nextre * coefim + nextim * coefre;
lastre = nextre;
lastim = nextim;
}
diff --git a/pd/src/d_mayer_fft.c b/pd/src/d_mayer_fft.c
index 0e2242b7..da77e048 100644
--- a/pd/src/d_mayer_fft.c
+++ b/pd/src/d_mayer_fft.c
@@ -54,6 +54,9 @@
#pragma warning( disable : 4101 ) /* unused local variables */
#endif
+/* the following is needed only to declare pd_fft() as exportable in MSW */
+#include "m_pd.h"
+
#define REAL float
#define GOOD_TRIG
diff --git a/pd/src/g_all_guis.c b/pd/src/g_all_guis.c
index 72382de8..da83c2ab 100644
--- a/pd/src/g_all_guis.c
+++ b/pd/src/g_all_guis.c
@@ -402,6 +402,11 @@ void iemgui_label(void *x, t_iemgui *iemgui, t_symbol *s)
int pargc, tail_len, nth_arg;
t_atom *pargv;
+ /* tb: fix for empty label { */
+ if (s == gensym(""))
+ s = gensym("empty");
+ /* tb } */
+
lab = iemgui_raute2dollar(s);
iemgui->x_lab_unexpanded = lab;
iemgui->x_lab = lab = canvas_realizedollar(iemgui->x_glist, lab);
diff --git a/pd/src/g_array.c b/pd/src/g_array.c
index dd1e88f2..ce91eb6e 100644
--- a/pd/src/g_array.c
+++ b/pd/src/g_array.c
@@ -245,6 +245,12 @@ static t_array *garray_getarray_floatonly(t_garray *x,
return (a);
}
+ /* get the array's name */
+t_symbol *garray_getname(t_garray *x)
+{
+ return (x->x_name);
+}
+
/* if there is one garray in a graph, reset the graph's coordinates
to fit a new size and style for the garray */
static void garray_fittograph(t_garray *x, int n, int style)
@@ -553,6 +559,7 @@ void array_redraw(t_array *a, t_glist *glist)
void array_getcoordinate(t_glist *glist,
char *elem, int xonset, int yonset, int wonset, int indx,
float basex, float basey, float xinc,
+ t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc,
float *xp, float *yp, float *wp)
{
float xval, yval, ypix, wpix;
@@ -562,25 +569,29 @@ void array_getcoordinate(t_glist *glist,
if (yonset >= 0)
yval = *(float *)(elem + yonset);
else yval = 0;
- ypix = glist_ytopixels(glist, basey + yval);
+ ypix = glist_ytopixels(glist, basey +
+ fielddesc_cvttocoord(yfielddesc, yval));
if (wonset >= 0)
{
/* found "w" field which controls linewidth. */
float wval = *(float *)(elem + wonset);
- wpix = glist_ytopixels(glist, basey + yval + wval) - ypix;
+ wpix = glist_ytopixels(glist, basey +
+ fielddesc_cvttocoord(yfielddesc, yval) +
+ fielddesc_cvttocoord(wfielddesc, wval)) - ypix;
if (wpix < 0)
wpix = -wpix;
}
else wpix = 1;
- *xp = glist_xtopixels(glist, basex + xval);
+ *xp = glist_xtopixels(glist, basex +
+ fielddesc_cvttocoord(xfielddesc, xval));
*yp = ypix;
*wp = wpix;
}
static float array_motion_xcumulative;
static float array_motion_ycumulative;
-static t_symbol *array_motion_xfield;
-static t_symbol *array_motion_yfield;
+static t_fielddesc *array_motion_xfield;
+static t_fielddesc *array_motion_yfield;
static t_glist *array_motion_glist;
static t_scalar *array_motion_scalar;
static t_array *array_motion_array;
@@ -602,25 +613,23 @@ static void array_motion(void *z, t_floatarg dx, t_floatarg dy)
{
array_motion_xcumulative += dx * array_motion_xperpix;
array_motion_ycumulative += dy * array_motion_yperpix;
- if (*array_motion_xfield->s_name)
+ if (array_motion_xfield)
{
/* it's an x, y plot; can drag many points at once */
int i;
- char *charword = (char *)array_motion_wp;
for (i = 0; i < array_motion_npoints; i++)
{
- t_word *thisword = (t_word *)(charword + i * array_motion_elemsize);
- if (*array_motion_xfield->s_name)
- {
- float xwas = template_getfloat(array_motion_template,
- array_motion_xfield, thisword, 1);
- template_setfloat(array_motion_template,
- array_motion_xfield, thisword, xwas + dx, 1);
- }
- if (*array_motion_yfield->s_name)
+ t_word *thisword = (t_word *)(((char *)array_motion_wp) +
+ i * array_motion_elemsize);
+ float xwas = fielddesc_getcoord(array_motion_xfield,
+ array_motion_template, thisword, 1);
+ float ywas = (array_motion_yfield ?
+ fielddesc_getcoord(array_motion_yfield,
+ array_motion_template, thisword, 1) : 0);
+ fielddesc_setcoord(array_motion_xfield,
+ array_motion_template, thisword, xwas + dx, 1);
+ if (array_motion_yfield)
{
- float ywas = template_getfloat(array_motion_template,
- array_motion_yfield, thisword, 1);
if (array_motion_fatten)
{
if (i == 0)
@@ -628,30 +637,30 @@ static void array_motion(void *z, t_floatarg dx, t_floatarg dy)
float newy = ywas + dy * array_motion_yperpix;
if (newy < 0)
newy = 0;
- template_setfloat(array_motion_template,
- array_motion_yfield, thisword, newy, 1);
+ fielddesc_setcoord(array_motion_yfield,
+ array_motion_template, thisword, newy, 1);
}
}
else
{
- template_setfloat(array_motion_template,
- array_motion_yfield, thisword,
+ fielddesc_setcoord(array_motion_yfield,
+ array_motion_template, thisword,
ywas + dy * array_motion_yperpix, 1);
}
}
}
}
- else
+ else if (array_motion_yfield)
{
/* a y-only plot. */
- int thisx = array_motion_initx +
- array_motion_xcumulative, x2;
+ int thisx = array_motion_initx + array_motion_xcumulative, x2;
int increment, i, nchange;
- char *charword = (char *)array_motion_wp;
float newy = array_motion_ycumulative,
- oldy = template_getfloat(
- array_motion_template, array_motion_yfield,
- (t_word *)(charword + array_motion_elemsize * array_motion_lastx), 1);
+ oldy = fielddesc_getcoord(array_motion_yfield,
+ array_motion_template,
+ (t_word *)(((char *)array_motion_wp) +
+ array_motion_elemsize * array_motion_lastx),
+ 1);
float ydiff = newy - oldy;
if (thisx < 0) thisx = 0;
else if (thisx >= array_motion_npoints)
@@ -661,10 +670,10 @@ static void array_motion(void *z, t_floatarg dx, t_floatarg dy)
for (i = 0, x2 = thisx; i < nchange; i++, x2 += increment)
{
- template_setfloat(array_motion_template,
- array_motion_yfield,
- (t_word *)(charword + array_motion_elemsize * x2),
- newy, 1);
+ fielddesc_setcoord(array_motion_yfield,
+ array_motion_template,
+ (t_word *)(((char *)array_motion_wp) +
+ array_motion_elemsize * x2), newy, 1);
if (nchange > 1)
newy -= ydiff * (1./(nchange - 1));
}
@@ -688,6 +697,7 @@ static int array_doclick_element(t_array *array, t_glist *glist,
t_scalar *sc, t_array *ap,
t_symbol *elemtemplatesym,
float linewidth, float xloc, float xinc, float yloc,
+ t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield,
int xpix, int ypix, int shift, int alt, int dbl, int doit)
{
t_canvas *elemtemplatecanvas;
@@ -697,8 +707,9 @@ static int array_doclick_element(t_array *array, t_glist *glist,
if (elemtemplatesym == &s_float)
return (0);
if (array_getfields(elemtemplatesym, &elemtemplatecanvas,
- &elemtemplate, &elemsize, &xonset, &yonset, &wonset))
- return (0);
+ &elemtemplate, &elemsize, xfield, yfield, wfield,
+ &xonset, &yonset, &wonset))
+ return (0);
/* if it has more than 2000 points, just check 300 of them. */
if (array->a_n < 2000)
incr = 1;
@@ -714,10 +725,12 @@ static int array_doclick_element(t_array *array, t_glist *glist,
return (0);
}
- /* LATER move this and others back into plot parentwidget code. */
+ /* LATER move this and others back into plot parentwidget code, so
+ they can be static (look in g_canvas.h for candidates). */
int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
t_symbol *elemtemplatesym,
float linewidth, float xloc, float xinc, float yloc,
+ t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield,
int xpix, int ypix, int shift, int alt, int dbl, int doit)
{
t_canvas *elemtemplatecanvas;
@@ -725,7 +738,8 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
int elemsize, yonset, wonset, xonset, i;
if (!array_getfields(elemtemplatesym, &elemtemplatecanvas,
- &elemtemplate, &elemsize, &xonset, &yonset, &wonset))
+ &elemtemplate, &elemsize, xfield, yfield, wfield,
+ &xonset, &yonset, &wonset))
{
float best = 100;
int incr;
@@ -738,7 +752,7 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
float pxpix, pypix, pwpix, dx, dy;
array_getcoordinate(glist, (char *)(array->a_vec) + i * elemsize,
xonset, yonset, wonset, i, xloc, yloc, xinc,
- &pxpix, &pypix, &pwpix);
+ xfield, yfield, wfield, &pxpix, &pypix, &pwpix);
if (pwpix < 4)
pwpix = 4;
dx = pxpix - xpix;
@@ -763,15 +777,16 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
}
if (best > 8)
return (array_doclick_element(array, glist, sc, ap,
- elemtemplatesym, linewidth,
- xloc, xinc, yloc, xpix, ypix, shift, alt, dbl, doit));
+ elemtemplatesym, linewidth, xloc, xinc, yloc,
+ xfield, yfield, wfield,
+ xpix, ypix, shift, alt, dbl, doit));
best += 0.001; /* add truncation error margin */
for (i = 0; i < array->a_n; i += incr)
{
float pxpix, pypix, pwpix, dx, dy, dy2, dy3;
array_getcoordinate(glist, (char *)(array->a_vec) + i * elemsize,
xonset, yonset, wonset, i, xloc, yloc, xinc,
- &pxpix, &pypix, &pwpix);
+ xfield, yfield, wfield, &pxpix, &pypix, &pwpix);
if (pwpix < 4)
pwpix = 4;
dx = pxpix - xpix;
@@ -827,15 +842,16 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
}
if (xonset >= 0)
{
- array_motion_xfield = gensym("x");
+ array_motion_xfield = xfield;
array_motion_xcumulative =
- *(float *)((elem + elemsize * i) + xonset);
+ fielddesc_getcoord(xfield, array_motion_template,
+ (t_word *)(elem + i * elemsize), 1);
array_motion_wp = (t_word *)(elem + i * elemsize);
array_motion_npoints = array->a_n - i;
}
else
{
- array_motion_xfield = &s_;
+ array_motion_xfield = 0;
array_motion_xcumulative = 0;
array_motion_wp = (t_word *)elem;
array_motion_npoints = array->a_n;
@@ -846,20 +862,23 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
}
if (array_motion_fatten)
{
- array_motion_yfield = gensym("w");
+ array_motion_yfield = wfield;
array_motion_ycumulative =
- *(float *)((elem + elemsize * i) + wonset);
- array_motion_yperpix *= array_motion_fatten;
+ fielddesc_getcoord(wfield, array_motion_template,
+ (t_word *)(elem + i * elemsize), 1);
+ array_motion_yperpix *= -array_motion_fatten;
}
else if (yonset >= 0)
{
- array_motion_yfield = gensym("y");
+ array_motion_yfield = yfield;
array_motion_ycumulative =
- *(float *)((elem + elemsize * i) + yonset);
+ fielddesc_getcoord(yfield, array_motion_template,
+ (t_word *)(elem + i * elemsize), 1);
+ /* *(float *)((elem + elemsize * i) + yonset); */
}
else
{
- array_motion_yfield = &s_;
+ array_motion_yfield = 0;
array_motion_ycumulative = 0;
}
glist_grab(glist, 0, array_motion, 0, xpix, ypix);
@@ -887,7 +906,7 @@ static void array_getrect(t_array *array, t_glist *glist,
int elemsize, yonset, wonset, xonset, i;
if (!array_getfields(array->a_templatesym, &elemtemplatecanvas,
- &elemtemplate, &elemsize, &xonset, &yonset, &wonset))
+ &elemtemplate, &elemsize, 0, 0, 0, &xonset, &yonset, &wonset))
{
int incr;
/* if it has more than 2000 points, just check 300 of them. */
@@ -900,6 +919,7 @@ static void array_getrect(t_array *array, t_glist *glist,
array_getcoordinate(glist, (char *)(array->a_vec) +
i * elemsize,
xonset, yonset, wonset, i, 0, 0, 1,
+ 0, 0, 0,
&pxpix, &pypix, &pwpix);
if (pwpix < 2)
pwpix = 2;
@@ -1267,7 +1287,7 @@ static void garray_list(t_garray *x, t_symbol *s, int argc, t_atom *argv)
if (argc <= 0) return;
}
for (i = 0; i < argc; i++)
- *((float *)(array->a_vec + elemsize * i) + yonset)
+ *((float *)(array->a_vec + elemsize * (i + firstindex)) + yonset)
= atom_getfloat(argv + i);
}
garray_redraw(x);
@@ -1403,6 +1423,8 @@ void garray_resize(t_garray *x, t_floatarg f)
template_findbyname(x->x_scalar->sc_template),
gensym("style"), x->x_scalar->sc_vec, 1));
array_resize_and_redraw(array, x->x_glist, n);
+ if (x->x_usedindsp)
+ canvas_update_dsp();
}
static void garray_print(t_garray *x)
diff --git a/pd/src/g_canvas.c b/pd/src/g_canvas.c
index c34e1502..2607c1b2 100644
--- a/pd/src/g_canvas.c
+++ b/pd/src/g_canvas.c
@@ -519,7 +519,7 @@ int glist_isgraph(t_glist *x)
static void canvas_setbounds(t_canvas *x, int x1, int y1, int x2, int y2)
{
int heightwas = y2 - y1;
- int heightchange = y2 - y1 - (x->gl_screeny2 - x->gl_screeny1);
+ int heightchange = y2 - y1 - (x->gl_screeny2 - x->gl_screeny1);
if (x->gl_screenx1 == x1 && x->gl_screeny1 == y1 &&
x->gl_screenx2 == x2 && x->gl_screeny2 == y2)
return;
@@ -527,7 +527,6 @@ static void canvas_setbounds(t_canvas *x, int x1, int y1, int x2, int y2)
x->gl_screeny1 = y1;
x->gl_screenx2 = x2;
x->gl_screeny2 = y2;
- /* post("set bounds %d %d %d %d", x1, y1, x2, y2); */
if (!glist_isgraph(x) && (x->gl_y2 < x->gl_y1))
{
/* if it's flipped so that y grows upward,
@@ -753,6 +752,7 @@ void canvas_vis(t_canvas *x, t_floatarg f)
canvas_create_editor(x, 0);
return;
}
+ sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x);
glist_noselect(x);
if (glist_isvisible(x))
canvas_map(x, 0);
@@ -1326,8 +1326,8 @@ void glist_redrawitem(t_glist *owner, t_gobj *gobj)
/* redraw all "scalars" (do this if a drawing command is changed.)
LATER we'll use the "template" information to select which ones we
- redraw. */
-static void glist_redrawall(t_glist *gl)
+ redraw. Action = 0 for redraw, 1 for draw only, 2 for erase. */
+static void glist_redrawall(t_glist *gl, int action)
{
t_gobj *g;
int vis = glist_isvisible(gl);
@@ -1335,19 +1335,55 @@ static void glist_redrawall(t_glist *gl)
{
t_class *cl;
if (vis && g->g_pd == scalar_class)
- glist_redrawitem(gl, g);
+ {
+ if (action == 1)
+ {
+ if (glist_isvisible(gl))
+ gobj_vis(g, gl, 1);
+ }
+ else if (action == 2)
+ {
+ if (glist_isvisible(gl))
+ gobj_vis(g, gl, 0);
+ }
+ else glist_redrawitem(gl, g);
+ }
else if (g->g_pd == canvas_class)
- glist_redrawall((t_glist *)g);
+ glist_redrawall((t_glist *)g, action);
}
}
- /* public interface for above */
-void canvas_redrawallfortemplate( t_template *template)
+ /* public interface for above. */
+void canvas_redrawallfortemplate(t_template *template, int action)
{
t_canvas *x;
/* find all root canvases */
for (x = canvas_list; x; x = x->gl_next)
- glist_redrawall(x);
+ glist_redrawall(x, action);
+}
+
+ /* find the template defined by a canvas, and redraw all elements
+ for that */
+void canvas_redrawallfortemplatecanvas(t_canvas *x, int action)
+{
+ t_gobj *g;
+ t_template *tmpl;
+ t_symbol *s1 = gensym("struct");
+ for (g = x->gl_list; g; g = g->g_next)
+ {
+ t_object *ob = pd_checkobject(&g->g_pd);
+ t_atom *argv;
+ if (!ob || ob->te_type != T_OBJECT ||
+ binbuf_getnatom(ob->te_binbuf) < 2)
+ continue;
+ argv = binbuf_getvec(ob->te_binbuf);
+ if (argv[0].a_type != A_SYMBOL || argv[1].a_type != A_SYMBOL
+ || argv[0].a_w.w_symbol != s1)
+ continue;
+ tmpl = template_findbyname(argv[1].a_w.w_symbol);
+ canvas_redrawallfortemplate(tmpl, action);
+ }
+ canvas_redrawallfortemplate(0, action);
}
/* ------------------------------- setup routine ------------------------ */
diff --git a/pd/src/g_canvas.h b/pd/src/g_canvas.h
index cdd0b242..6d4527b0 100644
--- a/pd/src/g_canvas.h
+++ b/pd/src/g_canvas.h
@@ -73,6 +73,9 @@ EXTERN_STRUCT _tscalar;
EXTERN_STRUCT _canvasenvironment;
#define t_canvasenvironment struct _canvasenvironment
+EXTERN_STRUCT _fielddesc;
+#define t_fielddesc struct _fielddesc
+
typedef struct _selection
{
t_gobj *sel_what;
@@ -453,7 +456,8 @@ EXTERN t_inlet *canvas_addinlet(t_canvas *x, t_pd *who, t_symbol *sym);
EXTERN void canvas_rminlet(t_canvas *x, t_inlet *ip);
EXTERN t_outlet *canvas_addoutlet(t_canvas *x, t_pd *who, t_symbol *sym);
EXTERN void canvas_rmoutlet(t_canvas *x, t_outlet *op);
-EXTERN void canvas_redrawallfortemplate( t_template *tmpl);
+EXTERN void canvas_redrawallfortemplate(t_template *tmpl, int action);
+EXTERN void canvas_redrawallfortemplatecanvas(t_canvas *x, int action);
EXTERN void canvas_zapallfortemplate(t_canvas *tmpl);
EXTERN void canvas_setusedastemplate(t_canvas *x);
EXTERN t_canvas *canvas_getcurrent(void);
@@ -553,16 +557,19 @@ EXTERN void scalar_getbasexy(t_scalar *x, float *basex, float *basey);
EXTERN int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
t_symbol *elemtemplatesym,
float linewidth, float xloc, float xinc, float yloc,
+ t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield,
int xpix, int ypix, int shift, int alt, int dbl, int doit);
EXTERN void array_getcoordinate(t_glist *glist,
char *elem, int xonset, int yonset, int wonset, int indx,
float basex, float basey, float xinc,
+ t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc,
float *xp, float *yp, float *wp);
EXTERN int array_getfields(t_symbol *elemtemplatesym,
t_canvas **elemtemplatecanvasp,
t_template **elemtemplatep, int *elemsizep,
+ t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc,
int *xonsetp, int *yonsetp, int *wonsetp);
/* --------------------- templates ------------------------- */
@@ -583,6 +590,8 @@ EXTERN void template_setsymbol(t_template *x, t_symbol *fieldname,
EXTERN t_template *gtemplate_get(t_gtemplate *x);
EXTERN t_template *template_findbyname(t_symbol *s);
EXTERN t_canvas *template_findcanvas(t_template *tmpl);
+EXTERN void template_notify(t_template *template,
+ t_symbol *s, int argc, t_atom *argv);
EXTERN t_float template_getfloat(t_template *x, t_symbol *fieldname,
t_word *wp, int loud);
@@ -592,6 +601,13 @@ EXTERN t_symbol *template_getsymbol(t_template *x, t_symbol *fieldname,
t_word *wp, int loud);
EXTERN void template_setsymbol(t_template *x, t_symbol *fieldname,
t_word *wp, t_symbol *s, int loud);
+EXTERN t_float fielddesc_getcoord(t_fielddesc *f, t_template *template,
+ t_word *wp, int loud);
+EXTERN void fielddesc_setcoord(t_fielddesc *f, t_template *template,
+ t_word *wp, float pix, int loud);
+EXTERN t_float fielddesc_cvttocoord(t_fielddesc *f, float val);
+EXTERN float fielddesc_cvtfromcoord(t_fielddesc *f, float coord);
+
/* ----------------------- guiconnects, g_guiconnect.c --------- */
EXTERN t_guiconnect *guiconnect_new(t_pd *who, t_symbol *sym);
diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c
index 02fe7726..82e43acc 100644
--- a/pd/src/g_editor.c
+++ b/pd/src/g_editor.c
@@ -1911,6 +1911,7 @@ static void canvas_cut(t_canvas *x)
canvas_undo_set_cut(x, UCUT_CUT), "cut");
canvas_copy(x);
canvas_doclear(x);
+ sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x);
}
}
@@ -1949,6 +1950,7 @@ static void canvas_dopaste(t_canvas *x, t_binbuf *b)
paste_canvas = 0;
canvas_resume_dsp(dspstate);
canvas_dirty(x, 1);
+ sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x);
glist_donewloadbangs(x);
}
diff --git a/pd/src/g_graph.c b/pd/src/g_graph.c
index 1c9afc30..3b26d477 100644
--- a/pd/src/g_graph.c
+++ b/pd/src/g_graph.c
@@ -10,6 +10,7 @@ to this file... */
#include "m_pd.h"
#include "t_tk.h"
#include "g_canvas.h"
+#include "s_stuff.h" /* for sys_hostfontsize */
#include <stdio.h>
#include <string.h>
@@ -40,7 +41,7 @@ void glist_add(t_glist *x, t_gobj *y)
gobj_vis(y, x, 1);
if (class_isdrawcommand(y->g_pd))
canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(
- glist_getcanvas(x)->gl_name)));
+ glist_getcanvas(x)->gl_name)), 0);
}
/* this is to protect against a hairy problem in which deleting
@@ -91,6 +92,11 @@ void glist_delete(t_glist *x, t_gobj *y)
}
}
}
+ /* if we're a drawing command, erase all scalars now, before deleting
+ it; we'll redraw them once it's deleted below. */
+ if (drawcommand)
+ canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(
+ glist_getcanvas(x)->gl_name)), 2);
gobj_delete(y, x);
if (glist_isvisible(canvas))
gobj_vis(y, x, 0);
@@ -107,7 +113,7 @@ void glist_delete(t_glist *x, t_gobj *y)
if (chkdsp) canvas_update_dsp();
if (drawcommand)
canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(
- glist_getcanvas(x)->gl_name)));
+ glist_getcanvas(x)->gl_name)), 1);
canvas_setdeleting(canvas, wasdeleting);
x->gl_valid = ++glist_valid;
}
@@ -644,6 +650,8 @@ void glist_redraw(t_glist *x)
/* --------------------------- widget behavior ------------------- */
extern t_widgetbehavior text_widgetbehavior;
+t_symbol *garray_getname(t_garray *x);
+
/* Note that some code in here would also be useful for drawing
graph decorations in toplevels... */
@@ -694,13 +702,26 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis)
{
int i;
float f;
-
+ t_gobj *g;
+ t_symbol *arrayname;
/* draw a rectangle around the graph */
sys_vgui(".x%lx.c create line\
%d %d %d %d %d %d %d %d %d %d -tags %s\n",
glist_getcanvas(x->gl_owner),
x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag);
-
+
+ /* 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);
+ }
+
/* draw ticks on horizontal borders. If lperb field is
zero, this is disabled. */
if (x->gl_xtick.k_lperb)
diff --git a/pd/src/g_scalar.c b/pd/src/g_scalar.c
index 3a61a39d..d091108c 100644
--- a/pd/src/g_scalar.c
+++ b/pd/src/g_scalar.c
@@ -156,7 +156,6 @@ static void scalar_getrect(t_gobj *z, t_glist *owner,
int *xp1, int *yp1, int *xp2, int *yp2)
{
t_scalar *x = (t_scalar *)z;
- int hit = 0;
t_template *template = template_findbyname(x->sc_template);
t_canvas *templatecanvas = template_findcanvas(template);
int x1 = 0x7fffffff, x2 = -0x7fffffff, y1 = 0x7fffffff, y2 = -0x7fffffff;
@@ -171,7 +170,6 @@ static void scalar_getrect(t_gobj *z, t_glist *owner,
}
else
{
- int hit = 0;
x1 = y1 = 0x7fffffff;
x2 = y2 = -0x7fffffff;
for (y = templatecanvas->gl_list; y; y = y->g_next)
@@ -182,16 +180,13 @@ static void scalar_getrect(t_gobj *z, t_glist *owner,
(*wb->w_parentgetrectfn)(y, owner,
x->sc_vec, template, basex, basey,
&nx1, &ny1, &nx2, &ny2);
- if (hit)
- {
- if (nx1 < x1) x1 = nx1;
- if (ny1 < y1) y1 = ny1;
- if (nx2 > x2) x2 = nx2;
- if (ny2 > y2) y2 = ny2;
- }
- else x1 = nx1, y1 = ny1, x2 = nx2, y2 = ny2, hit = 1;
+ if (nx1 < x1) x1 = nx1;
+ if (ny1 < y1) y1 = ny1;
+ if (nx2 > x2) x2 = nx2;
+ if (ny2 > y2) y2 = ny2;
}
- if (!hit) x1 = y1 = x2 = y2 = 0;
+ if (x2 < x1 || y2 < y1)
+ x1 = y1 = x2 = y2 = 0;
}
/* post("scalar x1 %d y1 %d x2 %d y2 %d", x1, y1, x2, y2); */
*xp1 = x1;
@@ -208,6 +203,17 @@ static void scalar_select(t_gobj *z, t_glist *owner, int state)
if (state)
{
int x1, y1, x2, y2;
+ t_symbol *templatesym = x->sc_template;
+ t_template *tmpl;
+ t_atom at;
+ t_gpointer gp;
+ gpointer_init(&gp);
+ gpointer_setglist(&gp, owner, x);
+ SETPOINTER(&at, &gp);
+ if (tmpl = template_findbyname(templatesym))
+ template_notify(tmpl, gensym("select"), 1, &at);
+ gpointer_unset(&gp);
+
scalar_getrect(z, owner, &x1, &y1, &x2, &y2);
x1--; x2++; y1--; y2++;
sys_vgui(".x%lx.c create line %d %d %d %d %d %d %d %d %d %d \
diff --git a/pd/src/g_template.c b/pd/src/g_template.c
index 74926ecb..3654b678 100644
--- a/pd/src/g_template.c
+++ b/pd/src/g_template.c
@@ -336,7 +336,7 @@ static void template_conformarray(t_template *tfrom, t_template *tto,
int *conformaction, t_array *a)
{
int i, j;
- t_template *scalartemplate;
+ t_template *scalartemplate = 0;
if (a->a_templatesym == tfrom->t_sym)
{
/* the array elements must all be conformed */
@@ -358,6 +358,7 @@ static void template_conformarray(t_template *tfrom, t_template *tto,
a->a_vec = newarray;
freebytes(oldarray, oldelemsize * a->a_n);
}
+ else scalartemplate = template_findbyname(a->a_templatesym);
/* convert all arrays and sublist fields in each element of the array */
for (i = 0; i < a->a_n; i++)
{
@@ -448,16 +449,15 @@ void template_conform(t_template *tfrom, t_template *tto)
if (doit)
{
t_glist *gl;
- /* post("conforming template '%s' to new structure",
+ post("conforming template '%s' to new structure",
tfrom->t_sym->s_name);
for (i = 0; i < nto; i++)
- post("... %d", conformaction[i]); */
+ post("... %d", conformaction[i]);
for (gl = canvas_list; gl; gl = gl->gl_next)
template_conformglist(tfrom, tto, gl, conformaction);
}
freebytes(conformaction, sizeof(int) * nto);
freebytes(conformedfrom, sizeof(int) * nfrom);
- canvas_redrawallfortemplate(tto);
}
t_template *template_findbyname(t_symbol *s)
@@ -476,6 +476,12 @@ t_canvas *template_findcanvas(t_template *template)
/* return ((t_canvas *)pd_findbyclass(template->t_sym, canvas_class)); */
}
+void template_notify(t_template *template, t_symbol *s, int argc, t_atom *argv)
+{
+ if (template->t_list)
+ outlet_anything(template->t_list->x_obj.ob_outlet, s, argc, argv);
+}
+
/* call this when reading a patch from a file to declare what templates
we'll need. If there's already a template, check if it matches.
If it doesn't it's still OK as long as there are no "struct" (gtemplate)
@@ -581,6 +587,7 @@ static void *gtemplate_donew(t_symbol *sym, int argc, t_atom *argv)
/* if there's none, we just replace the template with
our own and conform it. */
t_template *y = template_new(&s_, argc, argv);
+ canvas_redrawallfortemplate(t, 2);
/* Unless the new template is different from the old one,
there's nothing to do. */
if (!template_match(t, y))
@@ -592,6 +599,7 @@ static void *gtemplate_donew(t_symbol *sym, int argc, t_atom *argv)
}
pd_free(&y->t_pdobj);
t->t_list = x;
+ canvas_redrawallfortemplate(t, 1);
}
}
else
@@ -600,12 +608,12 @@ static void *gtemplate_donew(t_symbol *sym, int argc, t_atom *argv)
x->x_template = t = template_new(sym, argc, argv);
t->t_list = x;
}
+ outlet_new(&x->x_obj, 0);
return (x);
}
static void *gtemplate_new(t_symbol *s, int argc, t_atom *argv)
{
- t_gtemplate *x = (t_gtemplate *)pd_new(gtemplate_class);
t_symbol *sym = atom_getsymbolarg(0, argc, argv);
if (argc >= 1)
argc--; argv++;
@@ -615,7 +623,6 @@ static void *gtemplate_new(t_symbol *s, int argc, t_atom *argv)
/* old version (0.34) -- delete 2003 or so */
static void *gtemplate_new_old(t_symbol *s, int argc, t_atom *argv)
{
- t_gtemplate *x = (t_gtemplate *)pd_new(gtemplate_class);
t_symbol *sym = canvas_makebindsym(canvas_getcurrent()->gl_name);
static int warned;
if (!warned)
@@ -638,6 +645,7 @@ static void gtemplate_free(t_gtemplate *x)
t_template *t = x->x_template;
if (x == t->t_list)
{
+ canvas_redrawallfortemplate(t, 2);
if (x->x_next)
{
/* if we were first on the list, and there are others on
@@ -651,6 +659,7 @@ static void gtemplate_free(t_gtemplate *x)
z->t_list = x->x_next;
}
else t->t_list = 0;
+ canvas_redrawallfortemplate(t, 1);
}
else
{
@@ -684,7 +693,7 @@ want to cache the offset of the field so we don't have to search for it
every single time we draw the object.
*/
-typedef struct _fielddesc
+struct _fielddesc
{
char fd_type; /* LATER consider removing this? */
char fd_var;
@@ -694,14 +703,76 @@ typedef struct _fielddesc
t_symbol *fd_symbol; /* the field is a constant symbol */
t_symbol *fd_varsym; /* the field is variable and this is the name */
} fd_un;
-} t_fielddesc;
+ float fd_v1; /* min and max values */
+ float fd_v2;
+ float fd_screen1; /* min and max screen values */
+ float fd_screen2;
+ float fd_quantum; /* quantization in value */
+};
+
+static void fielddesc_setfloat_const(t_fielddesc *fd, float f)
+{
+ fd->fd_type = A_FLOAT;
+ fd->fd_var = 0;
+ fd->fd_un.fd_float = f;
+ fd->fd_v1 = fd->fd_v2 = fd->fd_screen1 = fd->fd_screen2 =
+ fd->fd_quantum = 0;
+}
+
+static void fielddesc_setsymbol_const(t_fielddesc *fd, t_symbol *s)
+{
+ fd->fd_type = A_SYMBOL;
+ fd->fd_var = 0;
+ fd->fd_un.fd_symbol = s;
+ fd->fd_v1 = fd->fd_v2 = fd->fd_screen1 = fd->fd_screen2 =
+ fd->fd_quantum = 0;
+}
-#define FIELDDESC_SETFLOAT(x, f) \
- ((x)->fd_type = A_FLOAT, (x)->fd_var = 0, (x)->fd_un.fd_float = (f))
-#define FIELDDESC_SETSYMBOL(x, s) \
- ((x)->fd_type = A_SYMBOL, (x)->fd_var = 0, (x)->fd_un.fd_symbol = (s))
-#define FIELDDESC_SETVAR(x, s, type) \
- ((x)->fd_type = type, (x)->fd_var = 1, (x)->fd_un.fd_varsym = (s))
+static void fielddesc_setfloat_var(t_fielddesc *fd, t_symbol *s)
+{
+ char *s1, *s2, *s3, strbuf[MAXPDSTRING];
+ int i;
+ fd->fd_type = A_FLOAT;
+ fd->fd_var = 1;
+ if (!(s1 = strchr(s->s_name, '(')) || !(s2 = strchr(s->s_name, ')'))
+ || (s1 > s2))
+ {
+ fd->fd_un.fd_varsym = s;
+ fd->fd_v1 = fd->fd_v2 = fd->fd_screen1 = fd->fd_screen2 =
+ fd->fd_quantum = 0;
+ }
+ else
+ {
+ int cpy = s1 - s->s_name, got;
+ if (cpy > MAXPDSTRING-5)
+ cpy = MAXPDSTRING-5;
+ strncpy(strbuf, s->s_name, cpy);
+ strbuf[cpy] = 0;
+ fd->fd_un.fd_varsym = gensym(strbuf);
+ got = sscanf(s1, "(%f:%f)(%f:%f)(%f)",
+ &fd->fd_v1, &fd->fd_v2, &fd->fd_screen1, &fd->fd_screen2,
+ &fd->fd_quantum);
+ if (got < 2)
+ goto fail;
+ if (got == 3 || (got < 4 && strchr(s2, '(')))
+ goto fail;
+ if (got < 5 && (s3 = strchr(s2, '(')) && strchr(s3+1, '('))
+ goto fail;
+ if (got == 4)
+ fd->fd_quantum = 0;
+ else if (got == 2)
+ {
+ fd->fd_quantum = 0;
+ fd->fd_screen1 = fd->fd_v1;
+ fd->fd_screen2 = fd->fd_v2;
+ }
+ return;
+ fail:
+ post("parse error: %s", s->s_name);
+ fd->fd_v1 = fd->fd_screen1 = fd->fd_v2 = fd->fd_screen2 =
+ fd->fd_quantum = 0;
+ }
+}
#define CLOSED 1
#define BEZ 2
@@ -709,20 +780,26 @@ typedef struct _fielddesc
static void fielddesc_setfloatarg(t_fielddesc *fd, int argc, t_atom *argv)
{
- if (argc <= 0) FIELDDESC_SETFLOAT(fd, 0);
+ if (argc <= 0) fielddesc_setfloat_const(fd, 0);
else if (argv->a_type == A_SYMBOL)
- FIELDDESC_SETVAR(fd, argv->a_w.w_symbol, A_FLOAT);
- else FIELDDESC_SETFLOAT(fd, argv->a_w.w_float);
+ fielddesc_setfloat_var(fd, argv->a_w.w_symbol);
+ else fielddesc_setfloat_const(fd, argv->a_w.w_float);
}
static void fielddesc_setarrayarg(t_fielddesc *fd, int argc, t_atom *argv)
{
- if (argc <= 0) FIELDDESC_SETFLOAT(fd, 0);
+ if (argc <= 0) fielddesc_setfloat_const(fd, 0);
else if (argv->a_type == A_SYMBOL)
- FIELDDESC_SETVAR(fd, argv->a_w.w_symbol, A_ARRAY);
- else FIELDDESC_SETFLOAT(fd, argv->a_w.w_float);
+ {
+ fd->fd_type = A_ARRAY;
+ fd->fd_var = 1;
+ fd->fd_un.fd_varsym = argv->a_w.w_symbol;
+ }
+ else fielddesc_setfloat_const(fd, argv->a_w.w_float);
}
+ /* getting and setting values via fielddescs -- note confusing names;
+ the above are setting up the fielddesc itself. */
static t_float fielddesc_getfloat(t_fielddesc *f, t_template *template,
t_word *wp, int loud)
{
@@ -740,6 +817,47 @@ static t_float fielddesc_getfloat(t_fielddesc *f, t_template *template,
}
}
+ /* convert a variable's value to a screen coordinate via its fielddesc */
+t_float fielddesc_cvttocoord(t_fielddesc *f, float val)
+{
+ float coord, pix, extreme, div;
+ if (f->fd_v2 == f->fd_v1)
+ return (val);
+ div = (f->fd_screen2 - f->fd_screen1)/(f->fd_v2 - f->fd_v1);
+ coord = f->fd_screen1 + (val - f->fd_v1) * div;
+ extreme = (f->fd_screen1 < f->fd_screen2 ?
+ f->fd_screen1 : f->fd_screen2);
+ if (coord < extreme)
+ coord = extreme;
+ extreme = (f->fd_screen1 > f->fd_screen2 ?
+ f->fd_screen1 : f->fd_screen2);
+ if (coord > extreme)
+ coord = extreme;
+ return (coord);
+}
+
+ /* read a variable via fielddesc and convert to screen coordinate */
+t_float fielddesc_getcoord(t_fielddesc *f, t_template *template,
+ t_word *wp, int loud)
+{
+ if (f->fd_type == A_FLOAT)
+ {
+ if (f->fd_var)
+ {
+ float val = template_getfloat(template,
+ f->fd_un.fd_varsym, wp, loud);
+ return (fielddesc_cvttocoord(f, val));
+ }
+ else return (f->fd_un.fd_float);
+ }
+ else
+ {
+ if (loud)
+ error("symbolic data field used as number");
+ return (0);
+ }
+}
+
static t_symbol *fielddesc_getsymbol(t_fielddesc *f, t_template *template,
t_word *wp, int loud)
{
@@ -757,6 +875,45 @@ static t_symbol *fielddesc_getsymbol(t_fielddesc *f, t_template *template,
}
}
+ /* convert from a screen coordinate to a variable value */
+float fielddesc_cvtfromcoord(t_fielddesc *f, float coord)
+{
+ float val;
+ if (f->fd_screen2 == f->fd_screen1)
+ val = coord;
+ else
+ {
+ float div = (f->fd_v2 - f->fd_v1)/(f->fd_screen2 - f->fd_screen1);
+ float extreme;
+ val = f->fd_v1 + (coord - f->fd_screen1) * div;
+ if (f->fd_quantum != 0)
+ val = ((int)((val/f->fd_quantum) + 0.5)) * f->fd_quantum;
+ extreme = (f->fd_v1 < f->fd_v2 ?
+ f->fd_v1 : f->fd_v2);
+ if (val < extreme) val = extreme;
+ extreme = (f->fd_v1 > f->fd_v2 ?
+ f->fd_v1 : f->fd_v2);
+ if (val > extreme) val = extreme;
+ }
+ return (val);
+ }
+
+void fielddesc_setcoord(t_fielddesc *f, t_template *template,
+ t_word *wp, float coord, int loud)
+{
+ if (f->fd_type == A_FLOAT && f->fd_var)
+ {
+ float val = fielddesc_cvtfromcoord(f, coord);
+ template_setfloat(template,
+ f->fd_un.fd_varsym, wp, val, loud);
+ }
+ else
+ {
+ if (loud)
+ error("attempt to set constant or symbolic data field to a number");
+ }
+}
+
/* ---------------- curves and polygons (joined segments) ---------------- */
/*
@@ -790,22 +947,22 @@ static void *curve_new(t_symbol *classsym, t_int argc, t_atom *argv)
classname += 6;
flags |= CLOSED;
if (argc) fielddesc_setfloatarg(&x->x_fillcolor, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_outlinecolor, 0);
+ else fielddesc_setfloat_const(&x->x_outlinecolor, 0);
}
else classname += 4;
if (classname[0] == 'c') flags |= BEZ;
x->x_flags = flags;
if (argc) fielddesc_setfloatarg(&x->x_outlinecolor, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_outlinecolor, 0);
+ else fielddesc_setfloat_const(&x->x_outlinecolor, 0);
if (argc) fielddesc_setfloatarg(&x->x_width, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_width, 1);
+ else fielddesc_setfloat_const(&x->x_width, 1);
if (argc < 0) argc = 0;
nxy = (argc + (argc & 1));
x->x_npoints = (nxy>>1);
x->x_vec = (t_fielddesc *)t_getbytes(nxy * sizeof(t_fielddesc));
for (i = 0, fd = x->x_vec; i < argc; i++, fd++, argv++)
fielddesc_setfloatarg(fd, 1, argv);
- if (argc & 1) FIELDDESC_SETFLOAT(fd, 0);
+ if (argc & 1) fielddesc_setfloat_const(fd, 0);
return (x);
}
@@ -823,9 +980,9 @@ static void curve_getrect(t_gobj *z, t_glist *glist,
for (i = 0, f = x->x_vec; i < n; i++, f += 2)
{
int xloc = glist_xtopixels(glist,
- basex + fielddesc_getfloat(f, template, data, 0));
+ basex + fielddesc_getcoord(f, template, data, 0));
int yloc = glist_ytopixels(glist,
- basey + fielddesc_getfloat(f+1, template, data, 0));
+ basey + fielddesc_getcoord(f+1, template, data, 0));
if (xloc < x1) x1 = xloc;
if (xloc > x2) x2 = xloc;
if (yloc < y1) y1 = yloc;
@@ -892,6 +1049,20 @@ static void curve_vis(t_gobj *z, t_glist *glist,
int flags = x->x_flags, closed = (flags & CLOSED);
float width = fielddesc_getfloat(&x->x_width, template, data, 1);
char outline[20], fill[20];
+ int pix[200];
+ if (n > 100)
+ n = 100;
+ /* calculate the pixel values before we start printing
+ out the TK message so that "error" printout won't be
+ interspersed with it. Only show up to 100 points so we don't
+ have to allocate memory here. */
+ for (i = 0, f = x->x_vec; i < n; i++, f += 2)
+ {
+ pix[2*i] = glist_xtopixels(glist,
+ basex + fielddesc_getcoord(f, template, data, 1));
+ pix[2*i+1] = glist_ytopixels(glist,
+ basey + fielddesc_getcoord(f+1, template, data, 1));
+ }
if (width < 1) width = 1;
numbertocolor(
fielddesc_getfloat(&x->x_outlinecolor, template, data, 1),
@@ -904,18 +1075,10 @@ static void curve_vis(t_gobj *z, t_glist *glist,
sys_vgui(".x%lx.c create polygon\\\n",
glist_getcanvas(glist));
}
- else sys_vgui(".x%lx.c create line\\\n",
- glist_getcanvas(glist));
- for (i = 0, f = x->x_vec; i < n; i++, f += 2)
- {
- float xloc = glist_xtopixels(glist,
- basex + fielddesc_getfloat(f, template, data, 1));
- float yloc = glist_ytopixels(glist,
- basey + fielddesc_getfloat(f+1, template, data, 1));
- sys_vgui("%d %d\\\n", (int)xloc, (int)yloc);
- }
- sys_vgui("-width %f\\\n",
- fielddesc_getfloat(&x->x_width, template, data, 1));
+ else sys_vgui(".x%lx.c create line\\\n", glist_getcanvas(glist));
+ for (i = 0; i < n; i++)
+ sys_vgui("%d %d\\\n", pix[2*i], pix[2*i+1]);
+ sys_vgui("-width %f\\\n", width);
if (flags & CLOSED) sys_vgui("-fill %s -outline %s\\\n",
fill, outline);
else sys_vgui("-fill %s\\\n", outline);
@@ -953,21 +1116,17 @@ static void curve_motion(void *z, t_floatarg dx, t_floatarg dy)
t_fielddesc *f = x->x_vec + curve_motion_field;
curve_motion_xcumulative += dx;
curve_motion_ycumulative += dy;
- if (f->fd_var)
+ if (f->fd_var && (dx != 0))
{
- template_setfloat(curve_motion_template,
- f->fd_un.fd_varsym,
- curve_motion_wp,
+ fielddesc_setcoord(f, curve_motion_template, curve_motion_wp,
curve_motion_xbase + curve_motion_xcumulative * curve_motion_xper,
- 1);
+ 1);
}
- if ((f+1)->fd_var)
+ if ((f+1)->fd_var && (dy != 0))
{
- template_setfloat(curve_motion_template,
- (f+1)->fd_un.fd_varsym,
- curve_motion_wp,
+ fielddesc_setcoord(f+1, curve_motion_template, curve_motion_wp,
curve_motion_ybase + curve_motion_ycumulative * curve_motion_yper,
- 1);
+ 1);
}
if (curve_motion_scalar)
glist_redrawitem(curve_motion_glist, &curve_motion_scalar->sc_gobj);
@@ -984,13 +1143,13 @@ static int curve_click(t_gobj *z, t_glist *glist,
int i, n = x->x_npoints;
int bestn = -1;
int besterror = 0x7fffffff;
- t_fielddesc *f = x->x_vec;
+ t_fielddesc *f;
for (i = 0, f = x->x_vec; i < n; i++, f += 2)
{
- int xloc = glist_xtopixels(glist,
- basex + fielddesc_getfloat(f, template, data, 0));
- int yloc = glist_ytopixels(glist,
- basey + fielddesc_getfloat(f+1, template, data, 0));
+ int xval = fielddesc_getcoord(f, template, data, 0),
+ xloc = glist_xtopixels(glist, basex + xval);
+ int yval = fielddesc_getcoord(f+1, template, data, 0),
+ yloc = glist_ytopixels(glist, basey + yval);
int xerr = xloc - xpix, yerr = yloc - ypix;
if (!f->fd_var && !(f+1)->fd_var)
continue;
@@ -1002,10 +1161,10 @@ static int curve_click(t_gobj *z, t_glist *glist,
xerr = yerr;
if (xerr < besterror)
{
+ curve_motion_xbase = xval;
+ curve_motion_ybase = yval;
besterror = xerr;
bestn = i;
- curve_motion_xbase = fielddesc_getfloat(f, template, data, 0);
- curve_motion_ybase = fielddesc_getfloat(f+1, template, data, 0);
}
}
if (besterror > 10)
@@ -1016,7 +1175,8 @@ static int curve_click(t_gobj *z, t_glist *glist,
- glist_pixelstox(glist, 0);
curve_motion_yper = glist_pixelstoy(glist, 1)
- glist_pixelstoy(glist, 0);
- curve_motion_xcumulative = curve_motion_ycumulative = 0;
+ curve_motion_xcumulative = 0;
+ curve_motion_ycumulative = 0;
curve_motion_glist = glist;
curve_motion_scalar = sc;
curve_motion_array = ap;
@@ -1064,6 +1224,8 @@ t_class *plot_class;
typedef struct _plot
{
t_object x_obj;
+ int x_vis;
+ t_canvas *x_canvas;
t_fielddesc x_outlinecolor;
t_fielddesc x_width;
t_fielddesc x_xloc;
@@ -1071,37 +1233,79 @@ typedef struct _plot
t_fielddesc x_xinc;
t_fielddesc x_style;
t_fielddesc x_data;
+ t_fielddesc x_xpoints;
+ t_fielddesc x_ypoints;
+ t_fielddesc x_wpoints;
} t_plot;
static void *plot_new(t_symbol *classsym, t_int argc, t_atom *argv)
{
t_plot *x = (t_plot *)pd_new(plot_class);
int defstyle = PLOTSTYLE_POLY;
- int nxy, i;
- t_fielddesc *fd;
- t_symbol *firstarg = atom_getsymbolarg(0, argc, argv);
- if (!strcmp(firstarg->s_name, "curve"))
+ x->x_vis = 1;
+ x->x_canvas = canvas_getcurrent();
+
+ fielddesc_setfloat_var(&x->x_xpoints, gensym("x"));
+ fielddesc_setfloat_var(&x->x_ypoints, gensym("y"));
+ fielddesc_setfloat_var(&x->x_wpoints, gensym("w"));
+
+ while (1)
{
- defstyle = PLOTSTYLE_BEZ;
- argc--, argv++;
+ t_symbol *firstarg = atom_getsymbolarg(0, argc, argv);
+ if (!strcmp(firstarg->s_name, "curve") ||
+ !strcmp(firstarg->s_name, "-c"))
+ {
+ defstyle = PLOTSTYLE_BEZ;
+ argc--, argv++;
+ }
+ else if (!strcmp(firstarg->s_name, "-n"))
+ {
+ x->x_vis = 0;
+ argc--; argv++;
+ }
+ else if (!strcmp(firstarg->s_name, "-x") && argc > 1)
+ {
+ fielddesc_setfloatarg(&x->x_xpoints, 1, argv+1);
+ argc -= 2; argv += 2;
+ }
+ else if (!strcmp(firstarg->s_name, "-y") && argc > 1)
+ {
+ fielddesc_setfloatarg(&x->x_ypoints, 1, argv+1);
+ argc -= 2; argv += 2;
+ }
+ else if (!strcmp(firstarg->s_name, "-w") && argc > 1)
+ {
+ fielddesc_setfloatarg(&x->x_wpoints, 1, argv+1);
+ argc -= 2; argv += 2;
+ }
+ else break;
}
if (argc) fielddesc_setarrayarg(&x->x_data, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_data, 1);
+ else fielddesc_setfloat_const(&x->x_data, 1);
if (argc) fielddesc_setfloatarg(&x->x_outlinecolor, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_outlinecolor, 0);
+ else fielddesc_setfloat_const(&x->x_outlinecolor, 0);
if (argc) fielddesc_setfloatarg(&x->x_width, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_width, 1);
+ else fielddesc_setfloat_const(&x->x_width, 1);
if (argc) fielddesc_setfloatarg(&x->x_xloc, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_xloc, 1);
+ else fielddesc_setfloat_const(&x->x_xloc, 1);
if (argc) fielddesc_setfloatarg(&x->x_yloc, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_yloc, 1);
+ else fielddesc_setfloat_const(&x->x_yloc, 1);
if (argc) fielddesc_setfloatarg(&x->x_xinc, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_xinc, 1);
+ else fielddesc_setfloat_const(&x->x_xinc, 1);
if (argc) fielddesc_setfloatarg(&x->x_style, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_style, defstyle);
+ else fielddesc_setfloat_const(&x->x_style, defstyle);
return (x);
}
+void plot_float(t_plot *x, t_floatarg f)
+{
+ if ((f != 0 && x->x_vis) || (f == 0 && !x->x_vis))
+ return;
+ canvas_redrawallfortemplatecanvas(x->x_canvas, 2);
+ x->x_vis = (f!= 0);
+ canvas_redrawallfortemplatecanvas(x->x_canvas, 1);
+}
+
/* -------------------- widget behavior for plot ------------ */
@@ -1110,7 +1314,8 @@ static void *plot_new(t_symbol *classsym, t_int argc, t_atom *argv)
static int plot_readownertemplate(t_plot *x,
t_word *data, t_template *ownertemplate,
t_symbol **elemtemplatesymp, t_array **arrayp,
- float *linewidthp, float *xlocp, float *xincp, float *ylocp, float *stylep)
+ float *linewidthp, float *xlocp, float *xincp, float *ylocp, float *stylep,
+ t_fielddesc **xfield, t_fielddesc **yfield, t_fielddesc **wfield)
{
int arrayonset, type;
t_symbol *elemtemplatesym;
@@ -1141,6 +1346,9 @@ static int plot_readownertemplate(t_plot *x,
*stylep = fielddesc_getfloat(&x->x_style, ownertemplate, data, 1);
*elemtemplatesymp = elemtemplatesym;
*arrayp = array;
+ *xfield = &x->x_xpoints;
+ *yfield = &x->x_ypoints;
+ *wfield = &x->x_wpoints;
return (0);
}
@@ -1149,11 +1357,12 @@ static int plot_readownertemplate(t_plot *x,
int array_getfields(t_symbol *elemtemplatesym,
t_canvas **elemtemplatecanvasp,
t_template **elemtemplatep, int *elemsizep,
+ t_fielddesc *xfielddesc, t_fielddesc *yfielddesc, t_fielddesc *wfielddesc,
int *xonsetp, int *yonsetp, int *wonsetp)
{
int arrayonset, elemsize, yonset, wonset, xonset, type;
t_template *elemtemplate;
- t_symbol *dummy;
+ t_symbol *dummy, *varname;
t_canvas *elemtemplatecanvas = 0;
/* the "float" template is special in not having to have a canvas;
@@ -1172,13 +1381,22 @@ int array_getfields(t_symbol *elemtemplatesym,
return (-1);
}
elemsize = elemtemplate->t_n * sizeof(t_word);
- if (!template_find_field(elemtemplate, gensym("y"), &yonset, &type, &dummy)
+ if (yfielddesc && yfielddesc->fd_var)
+ varname = yfielddesc->fd_un.fd_varsym;
+ else varname = gensym("y");
+ if (!template_find_field(elemtemplate, varname, &yonset, &type, &dummy)
|| type != DT_FLOAT)
yonset = -1;
- if (!template_find_field(elemtemplate, gensym("x"), &xonset, &type, &dummy)
+ if (xfielddesc && xfielddesc->fd_var)
+ varname = xfielddesc->fd_un.fd_varsym;
+ else varname = gensym("x");
+ if (!template_find_field(elemtemplate, varname, &xonset, &type, &dummy)
|| type != DT_FLOAT)
xonset = -1;
- if (!template_find_field(elemtemplate, gensym("w"), &wonset, &type, &dummy)
+ if (wfielddesc && wfielddesc->fd_var)
+ varname = wfielddesc->fd_un.fd_varsym;
+ else varname = gensym("w");
+ if (!template_find_field(elemtemplate, varname, &wonset, &type, &dummy)
|| type != DT_FLOAT)
wonset = -1;
@@ -1203,14 +1421,17 @@ static void plot_getrect(t_gobj *z, t_glist *glist,
t_symbol *elemtemplatesym;
float linewidth, xloc, xinc, yloc, style, xsum, yval;
t_array *array;
- float x1 = 0x7fffffff, y1 = 0x7fffffff, x2 = -0x7fffffff, y2 = -0x7fffffff;
+ int x1 = 0x7fffffff, y1 = 0x7fffffff, x2 = -0x7fffffff, y2 = -0x7fffffff;
int i;
float xpix, ypix, wpix;
-
- if (!plot_readownertemplate(x, data, template,
- &elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style) &&
+ t_fielddesc *xfielddesc, *yfielddesc, *wfielddesc;
+ if (x->x_vis && !plot_readownertemplate(x, data, template,
+ &elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style,
+ &xfielddesc, &yfielddesc, &wfielddesc) &&
!array_getfields(elemtemplatesym, &elemtemplatecanvas,
- &elemtemplate, &elemsize, &xonset, &yonset, &wonset))
+ &elemtemplate, &elemsize,
+ xfielddesc, yfielddesc, wfielddesc,
+ &xonset, &yonset, &wonset))
{
for (i = 0, xsum = 0; i < array->a_n; i++)
{
@@ -1219,7 +1440,7 @@ static void plot_getrect(t_gobj *z, t_glist *glist,
/* get the coords of the point proper */
array_getcoordinate(glist, (char *)(array->a_vec) + i * elemsize,
xonset, yonset, wonset, i, basex + xloc, basey + yloc, xinc,
- &xpix, &ypix, &wpix);
+ xfielddesc, yfielddesc, wfielddesc, &xpix, &ypix, &wpix);
if (xpix < x1)
x1 = xpix;
if (xpix > x2)
@@ -1231,14 +1452,15 @@ static void plot_getrect(t_gobj *z, t_glist *glist,
/* check also the drawing instructions for the scalar */
if (xonset >= 0)
- usexloc = basex + xloc +
- *(float *)(((char *)(array->a_vec) + elemsize * i) + xonset);
+ usexloc = basex + xloc + fielddesc_cvttocoord(xfielddesc,
+ *(float *)(((char *)(array->a_vec) + elemsize * i)
+ + xonset));
else usexloc = basex + xsum, xsum += xinc;
if (yonset >= 0)
yval = *(float *)(((char *)(array->a_vec) + elemsize * i)
+ yonset);
else yval = 0;
- useyloc = basey + yloc + yval;
+ useyloc = basey + yloc + fielddesc_cvttocoord(yfielddesc, yval);
for (y = elemtemplatecanvas->gl_list; y; y = y->g_next)
{
int xx1, xx2, yy1, yy2;
@@ -1300,10 +1522,16 @@ static void plot_vis(t_gobj *z, t_glist *glist,
t_array *array;
int nelem;
char *elem;
+ t_fielddesc *xfielddesc, *yfielddesc, *wfielddesc;
+
+ if (!x->x_vis)
+ return;
if (plot_readownertemplate(x, data, template,
- &elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style) ||
+ &elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style,
+ &xfielddesc, &yfielddesc, &wfielddesc) ||
array_getfields(elemtemplatesym, &elemtemplatecanvas,
- &elemtemplate, &elemsize, &xonset, &yonset, &wonset))
+ &elemtemplate, &elemsize, xfielddesc, yfielddesc, wfielddesc,
+ &xonset, &yonset, &wonset))
return;
nelem = array->a_n;
elem = (char *)array->a_vec;
@@ -1323,20 +1551,22 @@ static void plot_vis(t_gobj *z, t_glist *glist,
{
usexloc = basex + xloc +
*(float *)((elem + elemsize * i) + xonset);
- ixpix = glist_xtopixels(glist, usexloc);
+ ixpix = glist_xtopixels(glist,
+ fielddesc_cvttocoord(xfielddesc, usexloc));
inextx = ixpix + 2;
}
else
{
usexloc = xsum;
xsum += xinc;
- ixpix = glist_xtopixels(glist, usexloc);
- inextx = glist_xtopixels(glist, xsum);
+ ixpix = glist_xtopixels(glist,
+ fielddesc_cvttocoord(xfielddesc, usexloc));
+ inextx = glist_xtopixels(glist,
+ fielddesc_cvttocoord(xfielddesc, xsum));
}
if (yonset >= 0)
- yval = basey + yloc +
- *(float *)((elem + elemsize * i) + yonset);
+ yval = yloc + *(float *)((elem + elemsize * i) + yonset);
else yval = 0;
if (yval > maxyval)
maxyval = yval;
@@ -1347,9 +1577,11 @@ static void plot_vis(t_gobj *z, t_glist *glist,
sys_vgui(
".x%lx.c create rectangle %d %d %d %d -fill black -width 0 -tags plot%lx\n",
glist_getcanvas(glist),
- ixpix, (int)glist_ytopixels(glist, minyval),
- inextx, (int)(glist_ytopixels(glist, maxyval)
- + linewidth), data);
+ ixpix, (int)glist_ytopixels(glist,
+ basey + fielddesc_cvttocoord(yfielddesc, minyval)),
+ inextx, (int)(glist_ytopixels(glist,
+ basey + fielddesc_cvttocoord(yfielddesc, maxyval))
+ + linewidth), data);
ndrawn++;
minyval = 1e20;
maxyval = -1e20;
@@ -1383,13 +1615,16 @@ static void plot_vis(t_gobj *z, t_glist *glist,
yval = *(float *)((elem + elemsize * i) + yonset);
else yval = 0;
wval = *(float *)((elem + elemsize * i) + wonset);
- xpix = glist_xtopixels(glist, basex + usexloc);
+ xpix = glist_xtopixels(glist,
+ basex + fielddesc_cvttocoord(xfielddesc, usexloc));
ixpix = xpix + 0.5;
if (xonset >= 0 || ixpix != lastpixel)
{
sys_vgui("%d %f \\\n", ixpix,
glist_ytopixels(glist,
- basey + yloc + yval - wval));
+ basey + fielddesc_cvttocoord(yfielddesc,
+ yloc + yval) -
+ fielddesc_cvttocoord(wfielddesc,wval)));
ndrawn++;
}
lastpixel = ixpix;
@@ -1407,12 +1642,15 @@ static void plot_vis(t_gobj *z, t_glist *glist,
yval = *(float *)((elem + elemsize * i) + yonset);
else yval = 0;
wval = *(float *)((elem + elemsize * i) + wonset);
- xpix = glist_xtopixels(glist, basex + usexloc);
+ xpix = glist_xtopixels(glist,
+ basex + fielddesc_cvttocoord(xfielddesc, usexloc));
ixpix = xpix + 0.5;
if (xonset >= 0 || ixpix != lastpixel)
{
sys_vgui("%d %f \\\n", ixpix, glist_ytopixels(glist,
- basey + yloc + yval + wval));
+ basey + fielddesc_cvttocoord(yfielddesc,
+ yloc + yval) +
+ fielddesc_cvttocoord(wfielddesc, wval)));
ndrawn++;
}
lastpixel = ixpix;
@@ -1423,9 +1661,13 @@ static void plot_vis(t_gobj *z, t_glist *glist,
if (ndrawn < 4)
{
sys_vgui("%d %f \\\n", ixpix + 10, glist_ytopixels(glist,
- basey + yloc + yval + wval));
+ basey + fielddesc_cvttocoord(yfielddesc,
+ yloc + yval) +
+ fielddesc_cvttocoord(wfielddesc, wval)));
sys_vgui("%d %f \\\n", ixpix + 10, glist_ytopixels(glist,
- basey + yloc + yval - wval));
+ basey + fielddesc_cvttocoord(yfielddesc,
+ yloc + yval) -
+ fielddesc_cvttocoord(wfielddesc, wval)));
}
ouch:
sys_vgui(" -width 1 -fill %s -outline %s\\\n",
@@ -1451,12 +1693,15 @@ static void plot_vis(t_gobj *z, t_glist *glist,
if (yonset >= 0)
yval = *(float *)((elem + elemsize * i) + yonset);
else yval = 0;
- xpix = glist_xtopixels(glist, basex + usexloc);
+ xpix = glist_xtopixels(glist,
+ basex + fielddesc_cvttocoord(xfielddesc, usexloc));
ixpix = xpix + 0.5;
if (xonset >= 0 || ixpix != lastpixel)
{
sys_vgui("%d %f \\\n", ixpix,
- glist_ytopixels(glist, basey + yloc + yval));
+ glist_ytopixels(glist,
+ basey + fielddesc_cvttocoord(yfielddesc,
+ yloc + yval)));
ndrawn++;
}
lastpixel = ixpix;
@@ -1465,7 +1710,8 @@ static void plot_vis(t_gobj *z, t_glist *glist,
/* TK will complain if there aren't at least 2 points... */
if (ndrawn == 0) sys_vgui("0 0 0 0 \\\n");
else if (ndrawn == 1) sys_vgui("%d %f \\\n", ixpix + 10,
- glist_ytopixels(glist, basey + yloc + yval));
+ glist_ytopixels(glist, basey +
+ fielddesc_cvttocoord(yfielddesc, yloc + yval)));
sys_vgui("-width %f\\\n", linewidth);
sys_vgui("-fill %s\\\n", outline);
@@ -1489,7 +1735,7 @@ static void plot_vis(t_gobj *z, t_glist *glist,
if (yonset >= 0)
yval = *(float *)((elem + elemsize * i) + yonset);
else yval = 0;
- useyloc = basey + yloc + yval;
+ useyloc = basey + fielddesc_cvttocoord(yfielddesc, yloc + yval);
for (y = elemtemplatecanvas->gl_list; y; y = y->g_next)
{
t_parentwidgetbehavior *wb = pd_getparentwidget(&y->g_pd);
@@ -1522,7 +1768,6 @@ static void plot_vis(t_gobj *z, t_glist *glist,
}
}
-
static int plot_click(t_gobj *z, t_glist *glist,
t_word *data, t_template *template, t_scalar *sc, t_array *ap,
float basex, float basey,
@@ -1532,13 +1777,16 @@ static int plot_click(t_gobj *z, t_glist *glist,
t_symbol *elemtemplatesym;
float linewidth, xloc, xinc, yloc, style;
t_array *array;
+ t_fielddesc *xfielddesc, *yfielddesc, *wfielddesc;
if (!plot_readownertemplate(x, data, template,
- &elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style))
+ &elemtemplatesym, &array, &linewidth, &xloc, &xinc, &yloc, &style,
+ &xfielddesc, &yfielddesc, &wfielddesc))
{
return (array_doclick(array, glist, sc, ap,
elemtemplatesym,
linewidth, basex + xloc, xinc, basey + yloc,
+ xfielddesc, yfielddesc, wfielddesc,
xpix, ypix, shift, alt, dbl, doit));
}
else return (0);
@@ -1557,8 +1805,9 @@ t_parentwidgetbehavior plot_widgetbehavior =
static void plot_setup(void)
{
plot_class = class_new(gensym("plot"), (t_newmethod)plot_new, 0,
- sizeof(t_plot), CLASS_NOINLET, A_GIMME, 0);
+ sizeof(t_plot), 0, A_GIMME, 0);
class_setdrawcommand(plot_class);
+ class_addfloat(plot_class, plot_float);
class_setparentwidget(plot_class, &plot_widgetbehavior);
}
@@ -1577,12 +1826,14 @@ t_class *drawnumber_class;
typedef struct _drawnumber
{
t_object x_obj;
+ int x_vis; /* LATER incorporate into flags field below? */
t_fielddesc x_value;
t_fielddesc x_xloc;
t_fielddesc x_yloc;
t_fielddesc x_color;
t_symbol *x_label;
int x_flags;
+ t_canvas *x_canvas;
} t_drawnumber;
static void *drawnumber_new(t_symbol *classsym, t_int argc, t_atom *argv)
@@ -1590,17 +1841,30 @@ static void *drawnumber_new(t_symbol *classsym, t_int argc, t_atom *argv)
t_drawnumber *x = (t_drawnumber *)pd_new(drawnumber_class);
char *classname = classsym->s_name;
int flags = 0;
+
if (classname[4] == 's')
flags |= DRAW_SYMBOL;
x->x_flags = flags;
+ x->x_vis = 1;
+ x->x_canvas = canvas_getcurrent();
+ while (1)
+ {
+ t_symbol *firstarg = atom_getsymbolarg(0, argc, argv);
+ if (!strcmp(firstarg->s_name, "-n"))
+ {
+ x->x_vis = 0;
+ argc--; argv++;
+ }
+ else break;
+ }
if (argc) fielddesc_setfloatarg(&x->x_value, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_value, 0);
+ else fielddesc_setfloat_const(&x->x_value, 0);
if (argc) fielddesc_setfloatarg(&x->x_xloc, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_xloc, 0);
+ else fielddesc_setfloat_const(&x->x_xloc, 0);
if (argc) fielddesc_setfloatarg(&x->x_yloc, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_yloc, 0);
+ else fielddesc_setfloat_const(&x->x_yloc, 0);
if (argc) fielddesc_setfloatarg(&x->x_color, argc--, argv++);
- else FIELDDESC_SETFLOAT(&x->x_color, 1);
+ else fielddesc_setfloat_const(&x->x_color, 1);
if (argc)
x->x_label = atom_getsymbolarg(0, argc, argv);
else x->x_label = &s_;
@@ -1608,6 +1872,15 @@ static void *drawnumber_new(t_symbol *classsym, t_int argc, t_atom *argv)
return (x);
}
+void drawnumber_float(t_drawnumber *x, t_floatarg f)
+{
+ if ((f != 0 && x->x_vis) || (f == 0 && !x->x_vis))
+ return;
+ canvas_redrawallfortemplatecanvas(x->x_canvas, 2);
+ x->x_vis = (f!= 0);
+ canvas_redrawallfortemplatecanvas(x->x_canvas, 1);
+}
+
/* -------------------- widget behavior for drawnumber ------------ */
#define DRAWNUMBER_BUFSIZE 80
@@ -1626,6 +1899,12 @@ static void drawnumber_getrect(t_gobj *z, t_glist *glist,
{
t_drawnumber *x = (t_drawnumber *)z;
t_atom at;
+ if (!x->x_vis)
+ {
+ *xp1 = *yp1 = 0x7fffffff;
+ *xp2 = *yp2 = -0x7fffffff;
+ return;
+ }
int xloc = glist_xtopixels(glist,
basex + fielddesc_getfloat(&x->x_xloc, template, data, 0));
int yloc = glist_ytopixels(glist,
@@ -1671,6 +1950,8 @@ static void drawnumber_vis(t_gobj *z, t_glist *glist,
{
t_drawnumber *x = (t_drawnumber *)z;
+ if (!x->x_vis)
+ return;
if (vis)
{
t_atom at;
@@ -1768,8 +2049,9 @@ static void drawnumber_setup(void)
{
drawnumber_class = class_new(gensym("drawnumber"),
(t_newmethod)drawnumber_new, (t_method)drawnumber_free,
- sizeof(t_drawnumber), CLASS_NOINLET, A_GIMME, 0);
+ sizeof(t_drawnumber), 0, A_GIMME, 0);
class_setdrawcommand(drawnumber_class);
+ class_addfloat(drawnumber_class, drawnumber_float);
class_addcreator((t_newmethod)drawnumber_new, gensym("drawsymbol"),
A_GIMME, 0);
class_setparentwidget(drawnumber_class, &drawnumber_widgetbehavior);
diff --git a/pd/src/g_text.c b/pd/src/g_text.c
index cabe22d7..30735918 100644
--- a/pd/src/g_text.c
+++ b/pd/src/g_text.c
@@ -752,12 +752,10 @@ static void gatom_vis(t_gobj *z, t_glist *glist, int vis)
sys_hostfontsize(glist_getfont(glist)),
"black");
}
- else
- {
- sys_vgui(".x%lx.c delete %lx.l\n", glist_getcanvas(glist), x);
- sys_unqueuegui(x);
- }
+ else sys_vgui(".x%lx.c delete %lx.l\n", glist_getcanvas(glist), x);
}
+ if (!vis)
+ sys_unqueuegui(x);
}
void canvas_atom(t_glist *gl, t_atomtype type,
diff --git a/pd/src/m_obj.c b/pd/src/m_obj.c
index b5839003..ff2ff249 100644
--- a/pd/src/m_obj.c
+++ b/pd/src/m_obj.c
@@ -62,6 +62,13 @@ t_inlet *inlet_new(t_object *owner, t_pd *dest, t_symbol *s1, t_symbol *s2)
return (x);
}
+t_inlet *signalinlet_new(t_object *owner, t_float f)
+{
+ t_inlet *x = inlet_new(owner, &owner->ob_pd, &s_signal, &s_signal);
+ x->i_un.iu_floatsignalvalue = f;
+ return (x);
+}
+
static void inlet_wrong(t_inlet *x, t_symbol *s)
{
pd_error(x->i_owner, "inlet: expected '%s' but got '%s'",
diff --git a/pd/src/m_pd.h b/pd/src/m_pd.h
index e2c1972c..234ee3d7 100644
--- a/pd/src/m_pd.h
+++ b/pd/src/m_pd.h
@@ -337,6 +337,7 @@ EXTERN t_inlet *inlet_new(t_object *owner, t_pd *dest, t_symbol *s1,
EXTERN t_inlet *pointerinlet_new(t_object *owner, t_gpointer *gp);
EXTERN t_inlet *floatinlet_new(t_object *owner, t_float *fp);
EXTERN t_inlet *symbolinlet_new(t_object *owner, t_symbol **sp);
+EXTERN t_inlet *signalinlet_new(t_object *owner, t_float f);
EXTERN void inlet_free(t_inlet *x);
EXTERN t_outlet *outlet_new(t_object *owner, t_symbol *s);
@@ -436,6 +437,7 @@ EXTERN void postfloat(float f);
EXTERN void postatom(int argc, t_atom *argv);
EXTERN void endpost(void);
EXTERN void error(const char *fmt, ...);
+EXTERN void verbose(int level, const char *fmt, ...);
EXTERN void bug(const char *fmt, ...);
EXTERN void pd_error(void *object, const char *fmt, ...);
EXTERN void sys_logerror(const char *object, const char *s);
diff --git a/pd/src/m_sched.c b/pd/src/m_sched.c
index 7a82b3eb..82c4c5d7 100644
--- a/pd/src/m_sched.c
+++ b/pd/src/m_sched.c
@@ -412,8 +412,18 @@ int m_scheduler( void)
waitfortick:
if (sched_usedacs)
{
+#ifdef THREAD_LOCKING
+ /* T.Grill - send_dacs may sleep ->
+ unlock thread lock make that time available
+ - could messaging do any harm while sys_send_dacs is running?
+ */
+ sys_unlock();
+#endif
timeforward = sys_send_dacs();
-
+#ifdef THREAD_LOCKING
+ /* T.Grill - done */
+ sys_unlock();
+#endif
/* if dacs remain "idle" for 1 sec, they're hung up. */
if (timeforward != 0)
idlecount = 0;
diff --git a/pd/src/makefile b/pd/src/makefile
index e591f2c2..a2a70c79 100644
--- a/pd/src/makefile
+++ b/pd/src/makefile
@@ -19,7 +19,7 @@ GLIB = -ltk8.4 -ltcl8.4 -lX11 -L/usr/X11R6/lib -lrt
LDFLAGS = -Wl,-export-dynamic -lasound
LIB = -ldl -lpthread -lasound
-OPT_CFLAGS = -g
+OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
WARN_CFLAGS = -Wall -W -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch
ARCH_CFLAGS = -DPD
@@ -162,7 +162,9 @@ distclean: clean
tags: $(SRC) $(GSRC); ctags *.[ch]
-depend:
+depend: makefile.dependencies
+
+makefile.dependencies: makefile
$(CC) $(INCLUDE) $(CFLAGS) -M $(SRC) > makefile.dependencies
uninstall:
diff --git a/pd/src/makefile.dependencies b/pd/src/makefile.dependencies
index 6a895c1a..e69de29b 100644
--- a/pd/src/makefile.dependencies
+++ b/pd/src/makefile.dependencies
@@ -1,938 +0,0 @@
-g_canvas.o: g_canvas.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
- m_imp.h s_stuff.h g_canvas.h /usr/include/string.h g_all_guis.h
-g_graph.o: g_graph.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h m_pd.h t_tk.h \
- g_canvas.h /usr/include/stdio.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h
-g_text.o: g_text.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h m_pd.h m_imp.h \
- s_stuff.h t_tk.h g_canvas.h /usr/include/stdio.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-g_rtext.o: g_rtext.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h s_stuff.h g_canvas.h t_tk.h
-g_array.o: g_array.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
- g_canvas.h /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-g_template.o: g_template.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
- s_stuff.h g_canvas.h
-g_io.o: g_io.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h g_canvas.h \
- /usr/include/string.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h
-g_scalar.o: g_scalar.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
- g_canvas.h
-g_traversal.o: g_traversal.c /usr/include/stdlib.h \
- /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
- g_canvas.h
-g_guiconnect.o: g_guiconnect.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h g_canvas.h
-g_readwrite.o: g_readwrite.c /usr/include/stdlib.h \
- /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
- g_canvas.h /usr/include/string.h
-g_editor.o: g_editor.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/stdio.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h \
- m_imp.h s_stuff.h g_canvas.h /usr/include/string.h
-g_all_guis.o: g_all_guis.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_bang.o: g_bang.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_hdial.o: g_hdial.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_hslider.o: g_hslider.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_mycanvas.o: g_mycanvas.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_numbox.o: g_numbox.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_toggle.o: g_toggle.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_vdial.o: g_vdial.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-g_vslider.o: g_vslider.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-g_vumeter.o: g_vumeter.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/ctype.h m_pd.h g_canvas.h t_tk.h g_all_guis.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-m_pd.o: m_pd.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h m_pd.h m_imp.h
-m_class.o: m_class.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h m_imp.h \
- s_stuff.h /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/string.h
-m_obj.o: m_obj.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h m_imp.h
-m_atom.o: m_atom.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h
-m_memory.o: m_memory.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- m_pd.h m_imp.h
-m_binbuf.o: m_binbuf.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h m_pd.h s_stuff.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h /usr/include/fcntl.h \
- /usr/include/bits/fcntl.h /usr/include/string.h
-m_conf.o: m_conf.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h
-m_glob.o: m_glob.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h m_imp.h
-m_sched.o: m_sched.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h m_imp.h \
- s_stuff.h /usr/include/pthread.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h /usr/include/sched.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/time.h \
- /usr/include/bits/sched.h /usr/include/bits/time.h \
- /usr/include/signal.h /usr/include/bits/sigset.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/initspin.h \
- /usr/include/bits/sigthread.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h
-s_main.o: s_main.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h m_imp.h \
- s_stuff.h /usr/include/sys/types.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/sys/stat.h /usr/include/bits/stat.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/limits.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h \
- /usr/include/limits.h /usr/include/bits/posix1_lim.h \
- /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
- /usr/include/bits/posix2_lim.h /usr/include/string.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/stdlib.h \
- /usr/include/alloca.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h
-s_inter.o: s_inter.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h \
- m_imp.h g_canvas.h /usr/include/unistd.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/bits/confname.h /usr/include/getopt.h \
- /usr/include/sys/socket.h /usr/include/sys/uio.h \
- /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/bits/uio.h /usr/include/bits/socket.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/limits.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h \
- /usr/include/limits.h /usr/include/bits/posix1_lim.h \
- /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
- /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
- /usr/include/asm/socket.h /usr/include/asm/sockios.h \
- /usr/include/netinet/in.h /usr/include/stdint.h \
- /usr/include/bits/wchar.h /usr/include/bits/in.h \
- /usr/include/bits/byteswap.h /usr/include/netinet/tcp.h \
- /usr/include/netdb.h /usr/include/rpc/netdb.h /usr/include/bits/netdb.h \
- /usr/include/stdlib.h /usr/include/alloca.h /usr/include/sys/time.h \
- /usr/include/sys/mman.h /usr/include/bits/mman.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/signal.h /usr/include/bits/signum.h \
- /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
- /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
- /usr/include/bits/sigstack.h /usr/include/bits/sigthread.h \
- /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/errno.h \
- /usr/include/bits/errno.h /usr/include/linux/errno.h \
- /usr/include/asm/errno.h /usr/include/string.h /usr/include/stdio.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/gconv.h /usr/include/bits/stdio_lim.h \
- /usr/include/bits/sys_errlist.h /usr/include/sched.h
-s_file.o: s_file.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h \
- /usr/include/string.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/stdlib.h /usr/include/sys/types.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/errno.h /usr/include/bits/errno.h \
- /usr/include/linux/errno.h /usr/include/asm/errno.h \
- /usr/include/sys/stat.h /usr/include/bits/stat.h /usr/include/fcntl.h \
- /usr/include/bits/fcntl.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h
-s_print.o: s_print.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/sys/types.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h /usr/include/errno.h /usr/include/bits/errno.h \
- /usr/include/linux/errno.h /usr/include/asm/errno.h s_stuff.h
-s_loader.o: s_loader.c /usr/include/dlfcn.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/bits/dlfcn.h /usr/include/stdlib.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h /usr/include/string.h m_pd.h s_stuff.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
-s_path.o: s_path.c /usr/include/stdlib.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h /usr/include/sys/stat.h /usr/include/bits/stat.h \
- /usr/include/string.h m_pd.h m_imp.h s_stuff.h /usr/include/stdio.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/ctype.h
-s_entry.o: s_entry.c
-s_audio.o: s_audio.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h \
- /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h \
- /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/sys/resource.h \
- /usr/include/bits/resource.h /usr/include/stdlib.h \
- /usr/include/sys/types.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/alloca.h /usr/include/string.h /usr/include/errno.h \
- /usr/include/bits/errno.h /usr/include/linux/errno.h \
- /usr/include/asm/errno.h
-s_midi.o: s_midi.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h \
- m_imp.h /usr/include/unistd.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/bits/confname.h /usr/include/getopt.h \
- /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/string.h /usr/include/stdio.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/signal.h /usr/include/bits/signum.h \
- /usr/include/bits/siginfo.h /usr/include/bits/sigaction.h \
- /usr/include/bits/sigcontext.h /usr/include/asm/sigcontext.h \
- /usr/include/bits/sigstack.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/bits/sigthread.h
-d_ugen.o: d_ugen.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h m_imp.h \
- /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/sys/types.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/alloca.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h
-d_ctl.o: d_ctl.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-d_arithmetic.o: d_arithmetic.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h
-d_osc.o: d_osc.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h
-d_filter.o: d_filter.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-d_dac.o: d_dac.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h
-d_misc.o: d_misc.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h
-d_math.o: d_math.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-d_fft.o: d_fft.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h
-d_mayer_fft.o: d_mayer_fft.c
-d_fftroutine.o: d_fftroutine.c /usr/include/stdio.h \
- /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/math.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h m_pd.h
-d_array.o: d_array.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/endian.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/endian.h \
- /usr/include/sys/types.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/time.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h
-d_global.o: d_global.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/string.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h
-d_delay.o: d_delay.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h
-d_resample.o: d_resample.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h
-x_arithmetic.o: x_arithmetic.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-x_connective.o: x_connective.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/string.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/stdio.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
-x_interface.o: x_interface.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h
-x_midi.o: x_midi.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h
-x_misc.o: x_misc.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h \
- /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
- /usr/include/stdio.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h /usr/include/sys/types.h /usr/include/time.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/sys/time.h \
- /usr/include/sys/times.h /usr/include/sys/param.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/limits.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h \
- /usr/include/limits.h /usr/include/bits/posix1_lim.h \
- /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
- /usr/include/bits/posix2_lim.h /usr/include/linux/param.h \
- /usr/include/asm/param.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h
-x_time.o: x_time.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
-x_acoustics.o: x_acoustics.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/math.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/huge_val.h \
- /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h
-x_net.o: x_net.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h \
- /usr/include/sys/types.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/string.h /usr/include/sys/socket.h /usr/include/sys/uio.h \
- /usr/include/bits/uio.h /usr/include/bits/socket.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/limits.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/syslimits.h \
- /usr/include/limits.h /usr/include/bits/posix1_lim.h \
- /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
- /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
- /usr/include/asm/socket.h /usr/include/asm/sockios.h \
- /usr/include/netinet/in.h /usr/include/stdint.h \
- /usr/include/bits/wchar.h /usr/include/bits/in.h \
- /usr/include/bits/byteswap.h /usr/include/netinet/tcp.h \
- /usr/include/netdb.h /usr/include/rpc/netdb.h /usr/include/bits/netdb.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
-x_qlist.o: x_qlist.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/string.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/bits/confname.h /usr/include/getopt.h
-x_gui.o: x_gui.c m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
- /usr/include/getopt.h
-d_soundfile.o: d_soundfile.c /usr/include/unistd.h \
- /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/bits/typesizes.h /usr/include/bits/confname.h \
- /usr/include/getopt.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
- /usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
- /usr/include/bits/endian.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/pthread.h /usr/include/sched.h /usr/include/signal.h \
- /usr/include/bits/initspin.h /usr/include/bits/sigthread.h \
- /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
- /usr/include/wchar.h /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/string.h /usr/include/errno.h /usr/include/bits/errno.h \
- /usr/include/linux/errno.h /usr/include/asm/errno.h m_pd.h
-s_midi_oss.o: s_midi_oss.c /usr/include/stdio.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h \
- /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/sys/stat.h \
- /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
- /usr/include/errno.h /usr/include/bits/errno.h \
- /usr/include/linux/errno.h /usr/include/asm/errno.h m_pd.h s_stuff.h
-s_audio_oss.o: s_audio_oss.c /usr/include/linux/soundcard.h \
- /usr/include/linux/ioctl.h /usr/include/asm/ioctl.h m_pd.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h s_stuff.h \
- /usr/include/errno.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/errno.h \
- /usr/include/linux/errno.h /usr/include/asm/errno.h \
- /usr/include/stdio.h /usr/include/bits/types.h \
- /usr/include/bits/wordsize.h /usr/include/bits/typesizes.h \
- /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
- /usr/include/bits/wchar.h /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/unistd.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/confname.h /usr/include/getopt.h \
- /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/sys/time.h /usr/include/sys/stat.h \
- /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
- /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
- /usr/include/bits/ioctl-types.h /usr/include/sys/ttydefaults.h \
- /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/sched.h \
- /usr/include/sys/mman.h /usr/include/bits/mman.h
-s_audio_alsa.o: s_audio_alsa.c /usr/include/alsa/asoundlib.h \
- /usr/include/unistd.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/bits/typesizes.h /usr/include/bits/confname.h \
- /usr/include/getopt.h /usr/include/stdio.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/assert.h \
- /usr/include/sys/poll.h /usr/include/bits/poll.h /usr/include/errno.h \
- /usr/include/bits/errno.h /usr/include/linux/errno.h \
- /usr/include/asm/errno.h /usr/include/alsa/asoundef.h \
- /usr/include/alsa/version.h /usr/include/alsa/global.h \
- /usr/include/alsa/input.h /usr/include/alsa/output.h \
- /usr/include/alsa/error.h /usr/include/alsa/conf.h \
- /usr/include/alsa/pcm.h /usr/include/alsa/rawmidi.h \
- /usr/include/alsa/timer.h /usr/include/alsa/hwdep.h \
- /usr/include/alsa/control.h /usr/include/alsa/mixer.h \
- /usr/include/alsa/seq_event.h /usr/include/alsa/seq.h \
- /usr/include/alsa/seqmid.h /usr/include/alsa/seq_midi_event.h \
- /usr/include/alsa/conv.h /usr/include/alsa/instr.h m_pd.h s_stuff.h \
- /usr/include/sys/time.h /usr/include/sys/stat.h \
- /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
- /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
- /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
- /usr/include/sys/ttydefaults.h /usr/include/sched.h \
- /usr/include/sys/mman.h /usr/include/bits/mman.h s_audio_alsa.h
-s_audio_alsamm.o: s_audio_alsamm.c /usr/include/alsa/asoundlib.h \
- /usr/include/unistd.h /usr/include/features.h /usr/include/sys/cdefs.h \
- /usr/include/gnu/stubs.h /usr/include/bits/posix_opt.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stddef.h \
- /usr/include/bits/typesizes.h /usr/include/bits/confname.h \
- /usr/include/getopt.h /usr/include/stdio.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/time.h \
- /usr/include/endian.h /usr/include/bits/endian.h \
- /usr/include/sys/select.h /usr/include/bits/select.h \
- /usr/include/bits/sigset.h /usr/include/bits/time.h \
- /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
- /usr/include/bits/sched.h /usr/include/alloca.h /usr/include/string.h \
- /usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/assert.h \
- /usr/include/sys/poll.h /usr/include/bits/poll.h /usr/include/errno.h \
- /usr/include/bits/errno.h /usr/include/linux/errno.h \
- /usr/include/asm/errno.h /usr/include/alsa/asoundef.h \
- /usr/include/alsa/version.h /usr/include/alsa/global.h \
- /usr/include/alsa/input.h /usr/include/alsa/output.h \
- /usr/include/alsa/error.h /usr/include/alsa/conf.h \
- /usr/include/alsa/pcm.h /usr/include/alsa/rawmidi.h \
- /usr/include/alsa/timer.h /usr/include/alsa/hwdep.h \
- /usr/include/alsa/control.h /usr/include/alsa/mixer.h \
- /usr/include/alsa/seq_event.h /usr/include/alsa/seq.h \
- /usr/include/alsa/seqmid.h /usr/include/alsa/seq_midi_event.h \
- /usr/include/alsa/conv.h /usr/include/alsa/instr.h m_pd.h s_stuff.h \
- /usr/include/sys/time.h /usr/include/sys/stat.h \
- /usr/include/bits/stat.h /usr/include/sys/ioctl.h \
- /usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
- /usr/include/asm/ioctl.h /usr/include/bits/ioctl-types.h \
- /usr/include/sys/ttydefaults.h /usr/include/sched.h s_audio_alsa.h
diff --git a/pd/src/makefile.in b/pd/src/makefile.in
index ae8ccffc..f525bae3 100644
--- a/pd/src/makefile.in
+++ b/pd/src/makefile.in
@@ -162,7 +162,9 @@ distclean: clean
tags: $(SRC) $(GSRC); ctags *.[ch]
-depend:
+depend: makefile.dependencies
+
+makefile.dependencies: makefile
$(CC) $(INCLUDE) $(CFLAGS) -M $(SRC) > makefile.dependencies
uninstall:
diff --git a/pd/src/notes.txt b/pd/src/notes.txt
index 7e7e8569..c70616a2 100644
--- a/pd/src/notes.txt
+++ b/pd/src/notes.txt
@@ -1,62 +1,31 @@
---------------- dolist --------------------
-done:
-plug-in support
-atan2 inlets switched
-queued graphics updates for tables, number boxes
-cut/paste text (needs more testing)
-add standard bindings (ctl-o, etc) to dialogs
-separate audio on/off from nchans
-setuid flag in configure script
-settings saver (registry in Windows; .pdrc in linux; defaults system in OSX?)
- audio API
- MIDI -- fix to read MIDI on startup (rest works?)
- path
- startup flags
- libs
-better params:
- extra flag for path
- startup flags
- startup libraries
-printout to pd window
-startup from GUI
-%x to %lx in all "tags" to make 64-bit safe
-portaudio_pd files into src
-t_int to int in binbuf_addv
-64-bit fix to externs makefiles
-new filter objects: cpole~, fpole~, etc.
-put in Wini's RME ALSA code; there are still bugs...
-portaudio fixed for inchans != outchans, e.g., emi emagic (2/6)
-sprout inlets/outlets on objects whose creation failed.
-uploaded to CVS
-bug fix: click on minaturized subpatch fails to "vis" it
-bug fix: CK on Oct. 4 (crash changing font size)
-sched_idle hook
-fixed startup flags, path, etc. so that spaces, "," chars, etc., are allowed
-configure script fixed to handle enable- and disable- correctly
-
-0.39:
+done for 0.39:
arrays are now first-class data
array elements can be clicked on, etc
+fixed array onset bug
+At the source level, "regular" arrays and arrays withing data structures
+are now the same thing. The main user-visible effect of this is that now
+"arrays" may be graphed as "bezier curves".
-bug bandaids:
-d_delay.c confusion
-'$' and help broken in OSX?
+------------ 0.39 ---------
garray change:
make a gobj_redraw that schedules the redraw
put two radio button banks side by side
-re-range tables when arrays change size (again)
array_resize etc., should redraw the array directly? Or should "setsize"
and "garray_resize" do it instead? check it's queued correctly.
-
doc:
document env~ second argument (and why is it no less than 1/10 of first???)
vibrato example
block resampling arguments
+document tabwrite~_start
problems:
+check if there's a problem loading libs on startup if superuser
+tk errors for large tables?
+wierdly small hotspot on lines
'[' in numbox label breaks it (Yury Sept. 3)
soundfiles with 3-byte samples buzz for the first readsf buffer (bug/x.pd)
read xx.txt in "bad" gives warnings
@@ -65,21 +34,21 @@ Also writesf~ acts differently if DSP is off when "open" is sent?
qlist - 'next 1' seems not to work
Krzysztof's qlist_next reentrancy bug
don't draw in/outlets on gui objects in graph-on-parent
+reasonable font size default for GUIs
font size should depend on subpatch/abstraction
-moving a bang toward top of window creates problem
+moving a bang toward top of window creates problem (invisible label)
check what happens when going back and forth between graph-on-parent
get rid of messages causing renaming; try to prevent patches closing themselves.
dac~/ adc~/ block~ incompatibility
scofo reports error on reading score1.txt
rfft~ loses nyquist bin -- see "to hell with it" comment in d_fft.c
-open_via_path() followed by close() fails in windows? [can't reproduce]
loading e-mailed patches without removing headers crashes pd
pd $1 bug ($1 is saved as it was evaluated, not as '$1')
-data copy/paste doesn't check templates aren't changed
-figure out why Pd sometimes crashes when you close example after adding fields
check if _vsnprintf with zero argument in windows works any better...
-next release:
+features:
+flag to suppress printing array name above graph
+rename windowname-pd instead of pd-windowname
fix copyright notices
update portmusic to latest
IEM guis to use queued updates
@@ -94,7 +63,6 @@ tables:
object to get/set table size; random; quantile
flag to hide array names
queued graphics updates for IEMGUIs and scalars
-document tabwrite~_start
think of a way to embed abstractions in a patch
make watchdog work for MACOSX
GOP bounding box object
@@ -111,6 +79,8 @@ expr to parse exponential notation
data:
+data copy/paste doesn't check templates aren't changed
+figure out why Pd sometimes crashes when you close example after adding fields
arrays of non-existent templates crash
allow field(1,5,0,100) etc. in drawing commands
vget, vset traversal objects
@@ -157,7 +127,6 @@ check that -blocksize really reflects in audiobuf calc for Hammerfall
makefile to have make install depend on make local.
Float method for random
figure out list, message objects
-separate control over alsaindev and alsaoutdev
put in something for tilde order forcing
extensible "toolbar" so people can add external GUI objects
allow spaces in paths
diff --git a/pd/src/s_audio_alsa.c b/pd/src/s_audio_alsa.c
index 27188a72..eb9bdc10 100644
--- a/pd/src/s_audio_alsa.c
+++ b/pd/src/s_audio_alsa.c
@@ -63,19 +63,28 @@ static void check_error(int err, const char *why)
static int alsaio_canmmap(t_alsa_dev *dev)
{
snd_pcm_hw_params_t *hw_params;
- int err;
+ int err1, err2;
snd_pcm_hw_params_alloca(&hw_params);
- err = snd_pcm_hw_params_any(dev->a_handle, hw_params);
- if (err < 0) {
- check_error(err,"Broken configuration: no configurations available");
+ err1 = snd_pcm_hw_params_any(dev->a_handle, hw_params);
+ if (err1 < 0) {
+ check_error(err1,"Broken configuration: no configurations available");
return (0);
}
-
- err = snd_pcm_hw_params_set_access(dev->a_handle,
- hw_params, SND_PCM_ACCESS_MMAP_NONINTERLEAVED);
- return (err >= 0);
+ err1 = snd_pcm_hw_params_set_access(dev->a_handle,
+ hw_params, SND_PCM_ACCESS_RW_INTERLEAVED);
+ if (err1 < 0)
+ {
+ err2 = snd_pcm_hw_params_set_access(dev->a_handle,
+ hw_params, SND_PCM_ACCESS_MMAP_NONINTERLEAVED);
+ }
+ else err2 = -1;
+#if 0
+ post("err 1 %d (%s), err2 %d (%s)", err1, snd_strerror(err1),
+ err2, snd_strerror(err2));
+#endif
+ return ((err1 < 0) && (err2 >= 0));
}
static int alsaio_setup(t_alsa_dev *dev, int out, int *channels, int *rate,
diff --git a/pd/src/s_audio_alsamm.c b/pd/src/s_audio_alsamm.c
index 0378c4b4..33c44755 100644
--- a/pd/src/s_audio_alsamm.c
+++ b/pd/src/s_audio_alsamm.c
@@ -218,6 +218,8 @@ int alsamm_open_audio(int rate)
alsa_indev[i].a_synced=alsa_outdev[i].a_synced=0;
alsa_indev[i].a_channels=alsa_outdev[i].a_channels=0;
}
+ alsamm_inchannels = 0;
+ alsamm_outchannels = 0;
/* opening alsa debug channel */
err = snd_output_stdio_attach(&alsa_stdout, stdout, 0);
@@ -251,8 +253,6 @@ int alsamm_open_audio(int rate)
for(i=0;i<alsa_noutdev;i++)
{
-
-
/* post("open audio out %d, of %lx, %d",i,&alsa_device[i],
alsa_outdev[i].a_handle); */
if((err = set_hwparams(alsa_outdev[i].a_handle, hw_params,
@@ -357,6 +357,8 @@ int alsamm_open_audio(int rate)
fflush(stdout);
#endif
+ sys_setchsr(alsamm_inchannels, alsamm_outchannels, alsamm_sr);
+
alsamm_start();
/* report success */
@@ -773,9 +775,9 @@ static int set_swparams(snd_pcm_t *handle, snd_pcm_sw_params_t *swparams, int pl
#ifdef ALSAMM_DEBUG
if(sys_verbose)
post("set sw finished");
+#endif
#else
post("alsa: need version 1.0 or above for mmap operation");
-#endif
#endif /* ALSAAPI9 */
return 0;
}
diff --git a/pd/src/s_audio_pablio.c b/pd/src/s_audio_pablio.c
index 37b2ecd3..3bd626ee 100644
--- a/pd/src/s_audio_pablio.c
+++ b/pd/src/s_audio_pablio.c
@@ -1,5 +1,5 @@
/*
- * $Id: s_audio_pablio.c,v 1.5 2004-11-28 21:20:43 millerpuckette Exp $
+
* pablio.c
* Portable Audio Blocking Input/Output utility.
*
diff --git a/pd/src/s_file.c b/pd/src/s_file.c
index 34992e01..9705bac3 100644
--- a/pd/src/s_file.c
+++ b/pd/src/s_file.c
@@ -152,38 +152,30 @@ static void sys_donesavepreferences( void)
static void sys_initloadpreferences( void)
{
- fprintf(stderr, "here 1\n");
}
static int sys_getpreference(const char *key, char *value, int size)
{
- HKEY **hkey;
+ HKEY hkey;
DWORD bigsize = size;
- char *val2 = value;
LONG err = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
"Software\\Pd", 0, KEY_QUERY_VALUE, &hkey);
if (err != ERROR_SUCCESS)
{
- fprintf(stderr, "here 3\n");
- return (0);
+ return (0);
}
err = RegQueryValueEx(hkey, key, 0, 0, value, &bigsize);
if (err != ERROR_SUCCESS)
{
- fprintf(stderr, "here 4\n");
- RegCloseKey(hkey);
+ RegCloseKey(hkey);
return (0);
}
- fprintf(stderr, "here 5\n");
- if (val2 != value)
- fprintf(stderr, "string moved for registry key %s", key);
- RegCloseKey(hkey);
+ RegCloseKey(hkey);
return (1);
}
static void sys_doneloadpreferences( void)
{
- fprintf(stderr, "here 2\n");
}
static void sys_initsavepreferences( void)
@@ -192,7 +184,7 @@ static void sys_initsavepreferences( void)
static void sys_putpreference(const char *key, const char *value)
{
- HKEY **hkey;
+ HKEY hkey;
LONG err = RegCreateKeyEx(HKEY_LOCAL_MACHINE,
"Software\\Pd", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE,
NULL, &hkey, NULL);
@@ -362,11 +354,11 @@ void sys_loadpreferences( void)
if (sys_getpreference("defeatrt", prefbuf, MAXPDSTRING))
sscanf(prefbuf, "%d", &sys_defeatrt);
if (sys_getpreference("flags", prefbuf, MAXPDSTRING))
- {
- if (strcmp(prefbuf, "."))
- sys_flags = gensym(prefbuf);
+ {
+ if (strcmp(prefbuf, "."))
+ sys_flags = gensym(prefbuf);
}
- sys_doflags();
+ sys_doflags();
if (sys_defeatrt)
sys_hipriority = 0;
diff --git a/pd/src/s_inter.c b/pd/src/s_inter.c
index 15d7e11c..3a659080 100644
--- a/pd/src/s_inter.c
+++ b/pd/src/s_inter.c
@@ -27,6 +27,7 @@ that didn't really belong anywhere. */
#include <fcntl.h>
#include <process.h>
#include <winsock.h>
+#include <windows.h>
typedef int pid_t;
typedef int socklen_t;
#define EADDRINUSE WSAEADDRINUSE
@@ -85,6 +86,7 @@ struct _socketreceiver
extern char pd_version[];
extern int sys_guisetportnumber;
+extern char sys_font[]; /* tb: typeface */
static int sys_nfdpoll;
static t_fdpoll *sys_fdpoll;
@@ -162,6 +164,11 @@ static int sys_domicrosleep(int microsec, int pollem)
FD_ZERO(&exceptset);
for (fp = sys_fdpoll, i = sys_nfdpoll; i--; fp++)
FD_SET(fp->fdp_fd, &readset);
+#ifdef MSW
+ if (sys_maxfd == 0)
+ Sleep(microsec/1000);
+ else
+#endif
select(sys_maxfd+1, &readset, &writeset, &exceptset, &timout);
for (i = 0; i < sys_nfdpoll; i++)
if (FD_ISSET(sys_fdpoll[i].fdp_fd, &readset))
@@ -173,6 +180,11 @@ static int sys_domicrosleep(int microsec, int pollem)
}
else
{
+#ifdef MSW
+ if (sys_maxfd == 0)
+ Sleep(microsec/1000);
+ else
+#endif
select(0, 0, 0, 0, &timout);
return (0);
}
@@ -617,6 +629,11 @@ void sys_vgui(char *fmt, ...)
msglen = vsnprintf(sys_guibuf + sys_guibufhead,
sys_guibufsize - sys_guibufhead, fmt, ap);
va_end(ap);
+ if(msglen < 0)
+ {
+ fprintf(stderr, "Pd: buffer space wasn't sufficient for long GUI string\n");
+ return;
+ }
if (msglen >= sys_guibufsize - sys_guibufhead)
{
int msglen2, newsize = sys_guibufsize + 1 +
@@ -777,7 +794,7 @@ void sys_unqueuegui(void *client)
if (gq2->gq_client == client)
{
gq->gq_next = gq2->gq_next;
- t_freebytes(gq, sizeof(*gq));
+ t_freebytes(gq2, sizeof(*gq2));
break;
}
}
@@ -1183,7 +1200,8 @@ int sys_startgui(const char *guidir)
sys_gui("pdtk_watchdog\n");
#endif
sys_get_audio_apis(buf);
- sys_vgui("pdtk_pd_startup {%s} %s\n", pd_version, buf);
+ sys_vgui("pdtk_pd_startup {%s} %s {%s}\n", pd_version, buf,
+ sys_font);
}
return (0);
diff --git a/pd/src/s_loader.c b/pd/src/s_loader.c
index 75f638f1..461b9a97 100644
--- a/pd/src/s_loader.c
+++ b/pd/src/s_loader.c
@@ -134,8 +134,18 @@ int sys_load_lib(char *dirname, char *classname)
return 0;
}
ret = NSLinkModule( image, filename,
- NSLINKMODULE_OPTION_BINDNOW + NSLINKMODULE_OPTION_PRIVATE);
-
+ NSLINKMODULE_OPTION_BINDNOW |
+ //NSLINKMODULE_OPTION_PRIVATE |
+ NSLINKMODULE_OPTION_RETURN_ON_ERROR);
+
+ if (ret == NULL) {
+ int err;
+ const char *fname, *errt;
+ NSLinkEditErrors c;
+ NSLinkEditError(&c, &err, &fname, &errt);
+ post("link error %d %s %s", err, fname, errt);
+ return 0;
+ }
s = NSLookupSymbolInModule(ret, symname);
if (s)
diff --git a/pd/src/s_main.c b/pd/src/s_main.c
index 8e818a79..82fc48e4 100644
--- a/pd/src/s_main.c
+++ b/pd/src/s_main.c
@@ -2,7 +2,7 @@
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
-char pd_version[] = "Pd version 0.39 TEST 0\n";
+char pd_version[] = "Pd version 0.39 TEST 2\n";
char pd_compiletime[] = __TIME__;
char pd_compiledate[] = __DATE__;
@@ -60,6 +60,7 @@ int sys_nmidiin = 1;
int sys_midiindevlist[MAXMIDIINDEV] = {1};
int sys_midioutdevlist[MAXMIDIOUTDEV] = {1};
+char sys_font[] = "courier"; /* tb: font name */
static int sys_main_srate;
static int sys_main_advance;
@@ -254,7 +255,7 @@ int sys_main(int argc, char **argv)
#ifndef MSW
sys_rcfile(); /* parse the startup file */
#endif
- if (sys_argparse(argc, argv)) /* parse cmd line */
+ if (sys_argparse(argc-1, argv+1)) /* parse cmd line */
return (1);
sys_afterargparse(); /* post-argparse settings */
if (sys_verbose || sys_version) fprintf(stderr, "%scompiled %s %s\n",
@@ -358,6 +359,7 @@ static char *(usagemessage[]) = {
"-open <file> -- open file(s) on startup\n",
"-lib <file> -- load object library(s)\n",
"-font <n> -- specify default font size in points\n",
+"-typeface <name> -- specify default font (default: courier)\n",
"-verbose -- extra printout on startup and when searching for files\n",
"-version -- don't run Pd; just print out which version it is \n",
"-d <n> -- specify debug level\n",
@@ -507,7 +509,6 @@ int sys_argparse(int argc, char **argv)
{
char sbuf[MAXPDSTRING];
int i;
- argc--; argv++;
while ((argc > 0) && **argv == '-')
{
if (!strcmp(*argv, "-r") && argc > 1 &&
@@ -712,9 +713,17 @@ int sys_argparse(int argc, char **argv)
argc -= 2;
argv += 2;
}
+ /* tb: font name { */
+ else if (!strcmp(*argv, "-typeface") && argc > 1)
+ {
+ strcpy(sys_font,*(argv+1));
+ argc -= 2;
+ argv += 2;
+ }
+ /* } tb */
else if (!strcmp(*argv, "-verbose"))
{
- sys_verbose = 1;
+ sys_verbose++;
argc--; argv++;
}
else if (!strcmp(*argv, "-version"))
diff --git a/pd/src/s_path.c b/pd/src/s_path.c
index bce151f6..076f2822 100644
--- a/pd/src/s_path.c
+++ b/pd/src/s_path.c
@@ -359,13 +359,13 @@ void open_via_helppath(const char *name, const char *dir)
/* Startup file reading for linux and MACOSX. As of 0.38 this will be
deprecated in favor of the "settings" mechanism */
+int sys_argparse(int argc, char **argv);
+
#ifndef MSW
#define STARTUPNAME ".pdrc"
#define NUMARGS 1000
-int sys_argparse(int argc, char **argv);
-
int sys_rcfile(void)
{
FILE* file;
@@ -420,7 +420,7 @@ int sys_rcfile(void)
}
else post("no RC file arguments found");
}
- if (sys_argparse(rcargc, rcargv))
+ if (sys_argparse(rcargc-1, rcargv+1))
{
post("error parsing RC arguments");
return (1);
@@ -434,13 +434,12 @@ void sys_doflags( void)
int i, beginstring = 0, state = 0, len = strlen(sys_flags->s_name);
int rcargc = 0;
char *rcargv[MAXPDSTRING];
-
if (len > MAXPDSTRING)
{
post("flags: %s: too long", sys_flags->s_name);
return;
}
- for (i = 0; i < len; i++)
+ for (i = 0; i < len+1; i++)
{
int c = sys_flags->s_name[i];
if (state == 0)
@@ -464,11 +463,12 @@ void sys_doflags( void)
rcargc++;
if (rcargc >= MAXPDSTRING)
break;
+ state = 0;
}
}
}
if (sys_argparse(rcargc, rcargv))
- post("error parsing RC arguments");
+ post("error parsing startup arguments");
}
/* undo pdtl_encodedialog. This allows dialogs to send spaces, commas,
@@ -480,7 +480,7 @@ t_symbol *sys_decodedialog(t_symbol *s)
if (*sp != '+')
bug("sys_decodedialog: %s", sp);
else sp++;
- for (i = 0; i < MAXPDSTRING-1; i++)
+ for (i = 0; i < MAXPDSTRING-1; i++, sp++)
{
if (!sp[0])
break;
@@ -497,8 +497,8 @@ t_symbol *sys_decodedialog(t_symbol *s)
else if (sp[1] == 'd')
buf[i] = '$', sp++;
else buf[i] = sp[0];
- sp++;
}
+ else buf[i] = sp[0];
}
buf[i] = 0;
return (gensym(buf));
diff --git a/pd/src/s_print.c b/pd/src/s_print.c
index aefd89ba..1d7695d1 100644
--- a/pd/src/s_print.c
+++ b/pd/src/s_print.c
@@ -110,6 +110,24 @@ void error(const char *fmt, ...)
dopost(buf);
}
+void verbose(int level, const char *fmt, ...)
+{
+ char buf[MAXPDSTRING];
+ va_list ap;
+ t_int arg[8];
+ int i;
+ if(level>sys_verbose)return;
+ dopost("verbose(");
+ postfloat((float)level);
+ dopost("):");
+
+ va_start(ap, fmt);
+ vsnprintf(buf, MAXPDSTRING-1, fmt, ap);
+ va_end(ap);
+ strcat(buf, "\n");
+ dopost(buf);
+}
+
/* here's the good way to log errors -- keep a pointer to the
offending or offended object around so the user can search for it
later. */
diff --git a/pd/src/u_main.tk b/pd/src/u_main.tk
index dcb1e31b..7e11b5f3 100644
--- a/pd/src/u_main.tk
+++ b/pd/src/u_main.tk
@@ -50,6 +50,18 @@ if {$pd_nt == 2} {
set pd_guidir $pd_gui2/..
load $pd_guidir/bin/pdtcl
set pd_tearoff 0
+
+ # tk::mac::OpenDocument is called with the filenames put into the
+ # var args whenever docs are either dropped on the Pd.app icon or
+ # opened from the Finder.
+ # It uses menu_doc_open so it can handles numerous file types.
+ proc tk::mac::OpenDocument {args} {
+ foreach file $args {
+ pd [concat pd open [pdtk_enquote [file tail $file]] \
+ [pdtk_enquote [file dirname $file]] \;]
+ menu_doc_open [file dirname $file] [file tail $file]
+ }
+ }
}
# hack so you can easily test-run this script in linux... define pd_guidir
@@ -74,6 +86,8 @@ bind Text <Control-s> {}
# puts stderr [bind all]
################## set up main window #########################
+# the menus are instantiated here for the main window
+# for the patch windows, they are created by pdtk_canvas_new
menu .mbar
canvas .dummy -height 2p -width 6c
@@ -88,13 +102,25 @@ menu .mbar.audio -tearoff $pd_tearoff
if {$pd_nt != 2} {
.mbar add cascade -label "Windows" -menu .mbar.windows
.mbar add cascade -label "Media" -menu .mbar.audio
+# a menu on the main menubar named $whatever.help while be treated
+# as a special menu with specific behaviors on different platforms.
+# See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
+ menu .mbar.help -tearoff $pd_tearoff
+ .mbar add cascade -label "Help" -menu .mbar.help
} else {
-# Perhaps this is silly, but Mac HIG want "Window Help" as the last menus
+ menu .mbar.apple -tearoff 0
+ .mbar add cascade -label "Apple" -menu .mbar.apple
+# arrange menus according to Apple HIG
.mbar add cascade -label "Media" -menu .mbar.audio
- .mbar add cascade -label "Windows" -menu .mbar.windows
+ .mbar add cascade -label "Window" -menu .mbar.windows
+# a menu on the main menubar named "$whatever.help" while be treated
+# as a special menu with specific behaviors on different platforms.
+# See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
+# Apple doesn't allow cascading menus in their Help so I had to call this
+# one $mbar.docs # <hans@at.or.at>
+ menu .mbar.docs -tearoff $pd_tearoff
+ .mbar add cascade -label "Help" -menu .mbar.docs
}
-menu .mbar.help -tearoff $pd_tearoff
-.mbar add cascade -label "Help" -menu .mbar.help
set ctrls_audio_on 0
set ctrls_meter_on 0
@@ -263,22 +289,26 @@ proc menu_new {} {
proc menu_open {} {
global pd_opendir
-
set filename [tk_getOpenFile -defaultextension .pd \
-filetypes { {{pd files} {.pd}} {{max files} {.pat}}} \
-initialdir $pd_opendir]
+ if {$filename != ""} {open_file $filename}
+}
- if {$filename != ""} {
- set directory [string range $filename 0 \
- [expr [string last / $filename ] - 1]]
- set pd_opendir $directory
- set basename [string range $filename \
- [expr [string last / $filename ] + 1] end]
-
-# pd_debug [concat file $filename base $basename dir $directory]
+proc open_file {filename} {
+ global pd_opendir
+ set directory [string range $filename 0 [expr [string last / $filename] - 1]]
+ set pd_opendir $directory
+ set basename [string range $filename [expr [string last / $filename] + 1] end]
+ if {[string last .pd $filename] >= 0} {
+ pd "pd open [pdtk_enquote $basename] [pdtk_enquote $directory] ;"
+ }
+}
- pd [concat pd open [pdtk_enquote $basename] \
- [pdtk_enquote $directory]\;]
+catch {
+ package require tkdnd
+ dnd bindtarget . text/uri-list <Drop> {
+ foreach file %D {open_file $file}
}
}
@@ -311,13 +341,15 @@ proc menu_audio {flag} {pd [concat pd dsp $flag \;]}
set doc_number 1
+# open text docs in a Pd window
proc menu_opentext {filename} {
global doc_number
global pd_guidir
global pd_myversion
+ global pd_font3
set name [format ".help%d" $doc_number]
toplevel $name
- text $name.text -relief raised -bd 2 -font -*-courier-bold--normal--12-* \
+ text $name.text -relief raised -bd 2 -font $pd_font3 \
-yscrollcommand "$name.scroll set" -background white
scrollbar $name.scroll -command "$name.text yview"
pack $name.scroll -side right -fill y
@@ -334,15 +366,34 @@ proc menu_opentext {filename} {
set doc_number [expr $doc_number + 1]
}
+# open HTML docs from the menu using the OS-default HTML viewer
+proc menu_openhtml {filename} {
+ global pd_nt
+
+ if {$pd_nt == 0} {
+ exec sh -c \
+ [format "firefox file:%s || mozilla file:%s &\n" \
+ $filename $filename]
+ } elseif {$pd_nt == 2} {
+ puts stderr [format "open %s" $filename]
+ exec sh -c [format "open %s" $filename]
+ } else {
+ exec rundll32 url.dll,FileProtocolHandler \
+ [format "file:%s" $filename] &
+ }
+}
+
set help_directory $pd_guidir/doc
+set help_top_directory $pd_guidir/doc
proc menu_documentation {} {
global help_directory
global pd_nt
+ global pd_guidir
if {$pd_nt == 2} {
exec rm -rf /tmp/pd-documentation
- exec cp -pr $help_directory /tmp/pd-documentation
+ exec cp -pr $pd_guidir/doc /tmp/pd-documentation
set filename [tk_getOpenFile -defaultextension .pd \
-filetypes { {{documentation} {.pd .txt .htm}} } \
-initialdir /tmp/pd-documentation]
@@ -355,18 +406,7 @@ proc menu_documentation {} {
if {[string first .txt $filename] >= 0} {
menu_opentext $filename
} elseif {[string first .htm $filename] >= 0} {
- if {$pd_nt == 0} {
- exec sh -c \
- [format "mozilla file:%s || netscape file:%s &\n" \
- $filename $filename]
- } elseif {$pd_nt == 2} {
- puts stderr [format "open %s" $filename]
- exec sh -c \
- [format "open %s" $filename]
- } else {
- exec rundll32 url.dll,FileProtocolHandler \
- [format "file:%s" $filename] &
- }
+ menu_openhtml $filename
} else {
set help_directory [string range $filename 0 \
[expr [string last / $filename ] - 1]]
@@ -383,18 +423,43 @@ proc menu_doc_open {subdir basename} {
set dirname $pd_guidir/$subdir
- if {[string first .txt $basename] >= 0} {
+ if {[regexp ".*\.(txt|c)$" $basename]} {
menu_opentext $dirname/$basename
+ } elseif {[regexp ".*\.html?$" $basename]} {
+ menu_openhtml $dirname/$basename
} else {
pd [concat pd open [pdtk_enquote $basename] \
[pdtk_enquote $dirname] \;]
}
}
-############# routine to add audio and help menus ###############
+proc doc_submenu {helpmenu subdir} {
+ global help_top_directory pd_tearoff
+
+ set menudir $help_top_directory/$subdir
+
+ regsub -all "\\\." $subdir "" submenu
+
+ menu $helpmenu.$submenu -tearoff $pd_tearoff
+ regsub -all "\\\." $subdir " " submenuname
+ $helpmenu add cascade -label $submenuname \
+ -menu $helpmenu.$submenu
+ catch {
+# use this glob pattern to exclude the supporting files
+# foreach file [ lsort [ glob -dir $menudir {*[0-9][0-9]*} ] ]
+ foreach file [ lsort [ glob -dir $menudir * ] ] {
+ set filename ""
+ regsub {.*/(.*\..+$)} $file {\1} filename
+ $helpmenu.$submenu add command -label $filename \
+ -command "menu_doc_open doc/$subdir $filename"
+ }
+ }
+}
+
+############# routine to add media, help, and apple menu items ###############
proc menu_addstd {mbar} {
- global pd_apilist
+ global pd_apilist pd_nt pd_tearoff
# the "Audio" menu
$mbar.audio add command -label {audio ON} -accelerator [accel_munge "Ctrl+/"] \
-command {menu_audio 1}
@@ -406,21 +471,66 @@ proc menu_addstd {mbar} {
-value [lindex [lindex $pd_apilist $x] 1]\
-command {pd [concat pd audio-setapi $pd_whichapi \;]}
}
+ if {$pd_nt != 2} {
$mbar.audio add command -label {Audio settings...} \
-command {pd pd audio-properties \;}
-
$mbar.audio add command -label {MIDI settings...} \
-command {pd pd midi-properties \;}
+ }
+
$mbar.audio add command -label {Test Audio and MIDI} \
-command {menu_doc_open doc/7.stuff/tools testtone.pd}
$mbar.audio add command -label {Load Meter} \
-command {menu_doc_open doc/7.stuff/tools load-meter.pd}
+# the MacOS X app menu
+
+# The menu on the main menubar named $whatever.apple while be treated
+# as a special menu on MacOS X. Tcl/Tk assigns the $whatever.apple menu
+# to the app-specific menu in MacOS X that is named after the app,
+# so in our case, the Pd menu. <hans@at.or.at>
+# See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
+ if {$pd_nt == 2} {
+ $mbar.apple add command -label "About Pd..." -command \
+ {menu_doc_open doc/1.manual 1.introduction.txt}
+ menu $mbar.apple.preferences -tearoff 0
+ $mbar.apple add cascade -label "Preferences" -menu $mbar.apple.preferences
+ $mbar.apple.preferences add command -label "Path..." \
+ -command {pd pd start-path-dialog \;}
+ $mbar.apple.preferences add command -label "Startup..." \
+ -command {pd pd start-startup-dialog \;}
+ $mbar.apple.preferences add command -label "Audio Settings..." \
+ -command {pd pd audio-properties \;}
+ $mbar.apple.preferences add command -label "MIDI settings..." \
+ -command {pd pd midi-properties \;}
+ }
+
+
# the "Help" menu
+ if {$pd_nt != 2} {
+# a menu on the main menubar named "$whatever.help" while be treated
+# as a special menu with specific behaviors on different platforms.
+# See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
$mbar.help add command -label {About Pd} \
-command {menu_doc_open doc/1.manual 1.introduction.txt}
$mbar.help add command -label {Pure Documentation...} \
-command {menu_documentation}
+ # add menu items for each section instead of using Pd patches
+ $mbar.help add separator
+ set helpmenuname help
+ } else {
+# Apple doesn't allow cascading menus in their Help so I had to call this
+# one "docs" <hans@at.or.at>
+ set helpmenuname docs
+ }
+
+ $mbar.$helpmenuname add command -label {1 manual...} \
+ -command {menu_doc_open doc/1.manual index.htm}
+ doc_submenu $mbar.$helpmenuname 2.control.examples
+ doc_submenu $mbar.$helpmenuname 3.audio.examples
+ doc_submenu $mbar.$helpmenuname 4.fft.examples
+ doc_submenu $mbar.$helpmenuname 5.reference
+ doc_submenu $mbar.$helpmenuname 6.externs
}
#################### the "File" menu for the Pd window ##############
@@ -432,16 +542,20 @@ proc menu_addstd {mbar} {
.mbar.file add separator
.mbar.file add command -label Message -command {menu_send} \
-accelerator [accel_munge "Ctrl+m"]
+# On MacOS X, these are in the standard HIG locations
+# i.e. the Preferences menu under "Pd"
+if {$pd_nt != 2} {
.mbar.file add command -label Path... \
-command {pd pd start-path-dialog \;}
.mbar.file add command -label Startup... \
-command {pd pd start-startup-dialog \;}
+}
.mbar.file add separator
.mbar.file add command -label Quit -command {menu_quit} \
-accelerator [accel_munge "Ctrl+q"]
#################### the "Find" menu for the Pd window ##############
-.mbar.find add command -label {last error?} -command {menu_finderror}
+.mbar.find add command -label {Find last error} -command {menu_finderror}
########### functions for menu functions on document windows ########
@@ -466,6 +580,7 @@ proc menu_print {name} {
}
proc menu_close {name} {
+ pdtk_canvas_checkgeometry $name
pd [concat $name menuclose \;]
}
@@ -721,8 +836,22 @@ proc pdtk_canvas_new {name width height geometry editable} {
global pd_nt
toplevel $name -menu $name.m
-# puts stderr [concat geometry: $geometry]
- wm geometry $name $geometry
+
+# slide offscreen windows into view
+ set geometry [split $geometry +]
+ set i 1
+ foreach geo {width height} {
+ set screen($geo) [winfo screen$geo .]
+ if {[expr [lindex $geometry $i] + [set $geo]] > $screen($geo)} {
+ set pos($geo) [expr $screen($geo) - [set $geo]]
+ if {$pos($geo) < 0} {set pos($geo) 0}
+ lset geometry $i $pos($geo)
+ }
+ incr i
+ }
+ set geometry [join $geometry +]
+
+ wm geometry $name $geometry
canvas $name.c -width $width -height $height -background white \
-yscrollcommand "$name.scrollvert set" \
-xscrollcommand "$name.scrollhort set" \
@@ -739,6 +868,9 @@ proc pdtk_canvas_new {name width height geometry editable} {
wm geometry $name $geometry
# the file menu
+# The menus are instantiated here for the patch windows.
+# For the main window, they are created on load, at the
+# top of this file.
menu $name.m
menu $name.m.file -tearoff $pd_tearoff
$name.m add cascade -label File -menu $name.m.file
@@ -753,11 +885,15 @@ proc pdtk_canvas_new {name width height geometry editable} {
$name.m.file add command -label Message -command {menu_send} \
-accelerator [accel_munge "Ctrl+m"]
+ # arrange menus according to Apple HIG
+ # these are now part of Preferences...
+ if {$pd_nt != 2 } {
$name.m.file add command -label Path... \
-command {pd pd start-path-dialog \;}
$name.m.file add command -label Startup... \
-command {pd pd start-startup-dialog \;}
+ }
$name.m.file add separator
$name.m.file add command -label Close \
@@ -823,6 +959,18 @@ proc pdtk_canvas_new {name width height geometry editable} {
$name.m.edit add separator
+# Apple, Microsoft, and others put find functions in the Edit menu.
+ $name.m.edit add command -label {Find...} \
+ -accelerator [accel_munge "Ctrl+f"] \
+ -command [concat menu_findobject $name]
+ $name.m.edit add command -label {Find Again} \
+ -accelerator [accel_munge "Ctrl+g"] \
+ -command [concat menu_findagain $name]
+ $name.m.edit add command -label {Find last error} \
+ -command [concat menu_finderror]
+
+ $name.m.edit add separator
+
############iemlib##################
# instead of "red = #BC3C60" we take "grey85", so there is no difference,
# if widget is selected or not.
@@ -834,9 +982,242 @@ proc pdtk_canvas_new {name width height geometry editable} {
if { $editable == 0 } {
$name.m.edit entryconfigure "Edit mode" -indicatoron false }
+
############iemlib##################
+
+# the put menu
+ menu $name.m.put -tearoff $pd_tearoff
+ $name.m add cascade -label Put -menu $name.m.put
+
+ $name.m.put add command -label Object \
+ -command [concat menu_object $name 0] \
+ -accelerator [accel_munge "Ctrl+1"]
+
+ $name.m.put add command -label Message \
+ -command [concat menu_message $name 0] \
+ -accelerator [accel_munge "Ctrl+2"]
+
+ $name.m.put add command -label Number \
+ -command [concat menu_floatatom $name 0] \
+ -accelerator [accel_munge "Ctrl+3"]
+
+ $name.m.put add command -label Symbol \
+ -command [concat menu_symbolatom $name 0] \
+ -accelerator [accel_munge "Ctrl+4"]
+
+ $name.m.put add command -label Comment \
+ -command [concat menu_comment $name 0] \
+ -accelerator [accel_munge "Ctrl+5"]
+
+ $name.m.put add separator
+
+############iemlib##################
+
+ $name.m.put add command -label Bang \
+ -command [concat menu_bng $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+b"]
+
+ $name.m.put add command -label Toggle \
+ -command [concat menu_toggle $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+t"]
+
+ $name.m.put add command -label Number2 \
+ -command [concat menu_numbox $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+n"]
+
+ $name.m.put add command -label Vslider \
+ -command [concat menu_vslider $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+v"]
+
+ $name.m.put add command -label Hslider \
+ -command [concat menu_hslider $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+h"]
+
+ $name.m.put add command -label Vradio \
+ -command [concat menu_vradio $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+d"]
+
+ $name.m.put add command -label Hradio \
+ -command [concat menu_hradio $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+i"]
+
+ $name.m.put add command -label VU \
+ -command [concat menu_vumeter $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+u"]
+
+ $name.m.put add command -label Canvas \
+ -command [concat menu_mycnv $name 0] \
+ -accelerator [accel_munge "Shift+Ctrl+c"]
+
+############iemlib##################
+
+ $name.m.put add separator
+
+ $name.m.put add command -label Graph \
+ -command [concat menu_graph $name]
+
+ $name.m.put add command -label Array \
+ -command [concat menu_array $name]
+
+# the find menu
+# Apple, Microsoft, and others put find functions in the Edit menu.
+# But in order to move these items to the Edit menu, the Find menu
+# handling needs to be dealt with, including this line in g_canvas.c:
+# sys_vgui(".mbar.find delete %d\n", i);
+# <hans@at.or.at>
+ menu $name.m.find -tearoff $pd_tearoff
+ $name.m add cascade -label Find -menu $name.m.find
+
+ $name.m.find add command -label {Find...} \
+ -accelerator [accel_munge "Ctrl+f"] \
+ -command [concat menu_findobject $name]
+ $name.m.find add command -label {Find Again} \
+ -accelerator [accel_munge "Ctrl+g"] \
+ -command [concat menu_findagain $name]
+ $name.m.find add command -label {Find last error} \
+ -command [concat menu_finderror]
+
+# the window menu
+ menu $name.m.windows -postcommand [concat menu_fixwindowmenu $name] \
+ -tearoff $pd_tearoff
+
+ $name.m.windows add command -label {parent window}\
+ -command [concat menu_windowparent $name]
+ $name.m.windows add command -label {Pd window} -command menu_pop_pd
+ $name.m.windows add separator
+
+# the audio menu
+ menu $name.m.audio -tearoff $pd_tearoff
+
+ if {$pd_nt != 2} {
+ $name.m add cascade -label Windows -menu $name.m.windows
+ $name.m add cascade -label Media -menu $name.m.audio
+ } else {
+ $name.m add cascade -label Media -menu $name.m.audio
+ $name.m add cascade -label Window -menu $name.m.windows
+# the MacOS X app menu
+ menu $name.m.apple -tearoff $pd_tearoff
+ $name.m add cascade -label "Apple" -menu $name.m.apple
+ }
+
+# the help menu
+
+# a menu on the main menubar named "$whatever.help" while be treated
+# as a special menu with specific behaviors on different platforms.
+# See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
+ if {$pd_nt != 2} {
+ menu $name.m.help -tearoff $pd_tearoff
+ $name.m add cascade -label Help -menu $name.m.help
+ } else {
+ # Apple doesn't allow cascading menus in their Help
+ # so I had to call this one "docs". <hans@at.or.at>
+ menu $name.m.docs -tearoff $pd_tearoff
+ $name.m add cascade -label Help -menu $name.m.docs
+ }
+
+ menu_addstd $name.m
+
+# the popup menu
+ menu $name.popup -tearoff false
+ $name.popup add command -label {Properties} \
+ -command [concat popup_action $name 0]
+ $name.popup add command -label {Open} \
+ -command [concat popup_action $name 1]
+ $name.popup add command -label {Help} \
+ -command [concat popup_action $name 2]
+
+# WM protocol
+ wm protocol $name WM_DELETE_WINDOW [concat menu_close $name]
+
+# bindings.
+# this is idiotic -- how do you just sense what mod keys are down and
+# pass them on? I can't find it anywhere.
+# Here we encode shift as 1, control 2, alt 4, in agreement
+# with definitions in g_canvas.c. The third button gets "8" but we don't
+# bother with modifiers there.
+# We don't handle multiple clicks yet.
+
+ bind $name.c <Button> {pdtk_canvas_click %W %x %y %b 0}
+ bind $name.c <Shift-Button> {pdtk_canvas_click %W %x %y %b 1}
+ bind $name.c <Control-Shift-Button> {pdtk_canvas_click %W %x %y %b 3}
+ # Alt key is called Option on the Mac
+ if {$pd_nt == 2} {
+ bind $name.c <Option-Button> {pdtk_canvas_click %W %x %y %b 4}
+ bind $name.c <Option-Shift-Button> {pdtk_canvas_click %W %x %y %b 5}
+ bind $name.c <Option-Control-Button> {pdtk_canvas_click %W %x %y %b 6}
+ bind $name.c <Option-Control-Shift-Button> \
+ {pdtk_canvas_click %W %x %y %b 7}
+ } else {
+ bind $name.c <Alt-Button> {pdtk_canvas_click %W %x %y %b 4}
+ bind $name.c <Alt-Shift-Button> {pdtk_canvas_click %W %x %y %b 5}
+ bind $name.c <Alt-Control-Button> {pdtk_canvas_click %W %x %y %b 6}
+ bind $name.c <Alt-Control-Shift-Button> \
+ {pdtk_canvas_click %W %x %y %b 7}
+ }
+ global pd_nt
+# button 2 is the right button on Mac; on other platforms it's button 3.
+ if {$pd_nt == 2} {
+ bind $name.c <Button-2> {pdtk_canvas_click %W %x %y %b 8}
+ bind $name.c <Control-Button> {pdtk_canvas_click %W %x %y %b 8}
+ } else {
+ bind $name.c <Button-3> {pdtk_canvas_click %W %x %y %b 8}
+ bind $name.c <Control-Button> {pdtk_canvas_click %W %x %y %b 2}
+ }
+#on linux, button 2 "pastes" from the X windows clipboard
+ if {$pd_nt == 0} {
+ bind $name.c <Button-2> {\
+ pdtk_canvas_click %W %x %y %b 0;\
+ pdtk_canvas_mouseup %W %x %y %b;\
+ pdtk_pastetext}
+ }
+
+ bind $name.c <ButtonRelease> {pdtk_canvas_mouseup %W %x %y %b}
+ bind $name.c <Control-Key> {pdtk_canvas_ctrlkey %W %K 0}
+ bind $name.c <Control-Shift-Key> {pdtk_canvas_ctrlkey %W %K 1}
+# bind $name.c <Mod1-Key> {puts stderr [concat mod1 %W %K %A]}
+ if {$pd_nt == 2} {
+ bind $name.c <Mod1-Key> {pdtk_canvas_ctrlkey %W %K 0}
+ bind $name.c <Mod1-Shift-Key> {pdtk_canvas_ctrlkey %W %K 1}
+ }
+ bind $name.c <Key> {pdtk_canvas_key %W %K %A 0}
+ bind $name.c <Shift-Key> {pdtk_canvas_key %W %K %A 1}
+ bind $name.c <KeyRelease> {pdtk_canvas_keyup %W %K %A}
+ bind $name.c <Motion> {pdtk_canvas_motion %W %x %y 0}
+ bind $name.c <Control-Motion> {pdtk_canvas_motion %W %x %y 2}
+ if {$pd_nt == 2} {
+ bind $name.c <Option-Motion> {pdtk_canvas_motion %W %x %y 4}
+ } else {
+ bind $name.c <Alt-Motion> {pdtk_canvas_motion %W %x %y 4}
+ }
+ bind $name.c <Map> {pdtk_canvas_map %W}
+ bind $name.c <Unmap> {pdtk_canvas_unmap %W}
+ focus $name.c
+
+ switch $pd_nt { 0 {
+ bind $name.c <Button-4> "pdtk_canvas_scroll $name.c y -1"
+ bind $name.c <Button-5> "pdtk_canvas_scroll $name.c y +1"
+ bind $name.c <Shift-Button-4> "pdtk_canvas_scroll $name.c x -1"
+ bind $name.c <Shift-Button-5> "pdtk_canvas_scroll $name.c x +1"
+ } default {
+ bind $name.c <MouseWheel> \
+ "pdtk_canvas_scroll $name.c y \[expr -abs(%D)/%D\]"
+ bind $name.c <Shift-MouseWheel> \
+ "pdtk_canvas_scroll $name.c x \[expr -abs(%D)/%D\]"
+ }}
+
+ catch {
+ dnd bindtarget $name.c text/uri-list <Drop> \
+ "pdtk_canvas_makeobjs $name %D %x %y"
+ }
+
+# puts stderr "all done"
+# after 1 [concat raise $name]
+ global pdtk_canvas_mouseup_name
+ set pdtk_canvas_mouseup_name ""
+}
+
#### jsarlo #####
proc pdtk_array_listview_setpage {arrayName page} {
global pd_array_listview_page
@@ -1041,203 +1422,6 @@ proc pdtk_array_listview_close {id arrayName} {
}
##### end jsarlo #####
-# the put menu
- menu $name.m.put -tearoff $pd_tearoff
- $name.m add cascade -label Put -menu $name.m.put
-
- $name.m.put add command -label Object \
- -command [concat menu_object $name 0] \
- -accelerator [accel_munge "Ctrl+1"]
-
- $name.m.put add command -label Message \
- -command [concat menu_message $name 0] \
- -accelerator [accel_munge "Ctrl+2"]
-
- $name.m.put add command -label Number \
- -command [concat menu_floatatom $name 0] \
- -accelerator [accel_munge "Ctrl+3"]
-
- $name.m.put add command -label Symbol \
- -command [concat menu_symbolatom $name 0] \
- -accelerator [accel_munge "Ctrl+4"]
-
- $name.m.put add command -label Comment \
- -command [concat menu_comment $name 0] \
- -accelerator [accel_munge "Ctrl+5"]
-
- $name.m.put add separator
-
-############iemlib##################
-
- $name.m.put add command -label Bang \
- -command [concat menu_bng $name 0] \
- -accelerator [accel_munge "Alt+b"]
-
- $name.m.put add command -label Toggle \
- -command [concat menu_toggle $name 0] \
- -accelerator [accel_munge "Alt+t"]
-
- $name.m.put add command -label Number2 \
- -command [concat menu_numbox $name 0] \
- -accelerator [accel_munge "Alt+n"]
-
- $name.m.put add command -label Vslider \
- -command [concat menu_vslider $name 0] \
- -accelerator [accel_munge "Alt+v"]
-
- $name.m.put add command -label Hslider \
- -command [concat menu_hslider $name 0] \
- -accelerator [accel_munge "Alt+h"]
-
- $name.m.put add command -label Vradio \
- -command [concat menu_vradio $name 0] \
- -accelerator [accel_munge "Alt+d"]
-
- $name.m.put add command -label Hradio \
- -command [concat menu_hradio $name 0] \
- -accelerator [accel_munge "Alt+i"]
-
- $name.m.put add command -label VU \
- -command [concat menu_vumeter $name 0] \
- -accelerator [accel_munge "Alt+u"]
-
- $name.m.put add command -label Canvas \
- -command [concat menu_mycnv $name 0] \
- -accelerator [accel_munge "Alt+c"]
-
-############iemlib##################
-
- $name.m.put add separator
-
- $name.m.put add command -label Graph \
- -command [concat menu_graph $name]
-
- $name.m.put add command -label Array \
- -command [concat menu_array $name]
-
-# the find menu
- menu $name.m.find -tearoff $pd_tearoff
- $name.m add cascade -label Find -menu $name.m.find
-
- $name.m.find add command -label {Find...} \
- -accelerator [accel_munge "Ctrl+f"] \
- -command [concat menu_findobject $name]
- $name.m.find add command -label {Find Again} \
- -accelerator [accel_munge "Ctrl+g"] \
- -command [concat menu_findagain $name]
- $name.m.find add command -label {Find last error} \
- -command [concat menu_finderror]
-
-# the window menu
- menu $name.m.windows -postcommand [concat menu_fixwindowmenu $name] \
- -tearoff $pd_tearoff
-
- $name.m.windows add command -label {parent window}\
- -command [concat menu_windowparent $name]
- $name.m.windows add command -label {Pd window} -command menu_pop_pd
- $name.m.windows add separator
-
-# the audio menu
- menu $name.m.audio -tearoff $pd_tearoff
-
- if {$pd_nt != 2} {
- $name.m add cascade -label Windows -menu $name.m.windows
- $name.m add cascade -label Media -menu $name.m.audio
- } else {
- $name.m add cascade -label Media -menu $name.m.audio
- $name.m add cascade -label Window -menu $name.m.windows
- }
-
-# the help menu
- menu $name.m.help -tearoff $pd_tearoff
- $name.m add cascade -label Help -menu $name.m.help
-
- menu_addstd $name.m
-
-# the popup menu
- menu $name.popup -tearoff false
- $name.popup add command -label {Properties} \
- -command [concat popup_action $name 0]
- $name.popup add command -label {Open} \
- -command [concat popup_action $name 1]
- $name.popup add command -label {Help} \
- -command [concat popup_action $name 2]
-
-# WM protocol
- wm protocol $name WM_DELETE_WINDOW [concat menu_close $name]
-
-# bindings.
-# this is idiotic -- how do you just sense what mod keys are down and
-# pass them on? I can't find it anywhere.
-# Here we encode shift as 1, control 2, alt 4, in agreement
-# with definitions in g_canvas.c. The third button gets "8" but we don't
-# bother with modifiers there.
-# We don't handle multiple clicks yet.
-
- bind $name.c <Button> {pdtk_canvas_click %W %x %y %b 0}
- bind $name.c <Shift-Button> {pdtk_canvas_click %W %x %y %b 1}
- bind $name.c <Control-Shift-Button> {pdtk_canvas_click %W %x %y %b 3}
- # Alt key is called Option on the Mac
- if {$pd_nt == 2} {
- bind $name.c <Option-Button> {pdtk_canvas_click %W %x %y %b 4}
- bind $name.c <Option-Shift-Button> {pdtk_canvas_click %W %x %y %b 5}
- bind $name.c <Option-Control-Button> {pdtk_canvas_click %W %x %y %b 6}
- bind $name.c <Option-Control-Shift-Button> \
- {pdtk_canvas_click %W %x %y %b 7}
- } else {
- bind $name.c <Alt-Button> {pdtk_canvas_click %W %x %y %b 4}
- bind $name.c <Alt-Shift-Button> {pdtk_canvas_click %W %x %y %b 5}
- bind $name.c <Alt-Control-Button> {pdtk_canvas_click %W %x %y %b 6}
- bind $name.c <Alt-Control-Shift-Button> \
- {pdtk_canvas_click %W %x %y %b 7}
- }
- global pd_nt
-# button 2 is the right button on Mac; on other platforms it's button 3.
- if {$pd_nt == 2} {
- bind $name.c <Button-2> {pdtk_canvas_click %W %x %y %b 8}
- bind $name.c <Control-Button> {pdtk_canvas_click %W %x %y %b 8}
- } else {
- bind $name.c <Button-3> {pdtk_canvas_click %W %x %y %b 8}
- bind $name.c <Control-Button> {pdtk_canvas_click %W %x %y %b 2}
- }
-#on linux, button 2 "pastes" from the X windows clipboard
- if {$pd_nt == 0} {
- bind $name.c <Button-2> {\
- pdtk_canvas_click %W %x %y %b 0;\
- pdtk_canvas_mouseup %W %x %y %b;\
- pdtk_pastetext}
- }
-
- bind $name.c <ButtonRelease> {pdtk_canvas_mouseup %W %x %y %b}
- bind $name.c <Control-Key> {pdtk_canvas_ctrlkey %W %K 0}
- bind $name.c <Control-Shift-Key> {pdtk_canvas_ctrlkey %W %K 1}
- if {$pd_nt == 2} {
- bind $name.c <Option-Key> {pdtk_canvas_altkey %W %K %A}
- } else {
- bind $name.c <Alt-Key> {pdtk_canvas_altkey %W %K %A}
- }
-# bind $name.c <Mod1-Key> {puts stderr [concat mod1 %W %K %A]}
- if {$pd_nt == 2} {
- bind $name.c <Mod1-Key> {pdtk_canvas_ctrlkey %W %K 0}
- bind $name.c <Mod1-Shift-Key> {pdtk_canvas_ctrlkey %W %K 1}
- }
- bind $name.c <Key> {pdtk_canvas_key %W %K %A 0}
- bind $name.c <Shift-Key> {pdtk_canvas_key %W %K %A 1}
- bind $name.c <KeyRelease> {pdtk_canvas_keyup %W %K %A}
- bind $name.c <Motion> {pdtk_canvas_motion %W %x %y 0}
- bind $name.c <Control-Motion> {pdtk_canvas_motion %W %x %y 2}
- if {$pd_nt == 2} {
- bind $name.c <Option-Motion> {pdtk_canvas_motion %W %x %y 4}
- } else {
- bind $name.c <Alt-Motion> {pdtk_canvas_motion %W %x %y 4}
- }
- bind $name.c <Map> {pdtk_canvas_map %W}
- bind $name.c <Unmap> {pdtk_canvas_unmap %W}
- focus $name.c
-# puts stderr "all done"
-# after 1 [concat raise $name]
-}
-
#################### event binding procedures ################
#get the name of the toplevel window for a canvas; this is also
@@ -1376,49 +1560,11 @@ proc pdtk_canvas_keyup {name key iso} {
}
}
-proc pdtk_canvas_altkey {name key iso} {
-# puts stderr [concat alt-key $iso]
-############iemlib##################
- set topname [string trimright $name .c]
- if {$key == "b" || $key == "B"} {menu_bng $topname 1}
- if {$key == "t" || $key == "T"} {menu_toggle $topname 1}
- if {$key == "n" || $key == "N"} {menu_numbox $topname 1}
- if {$key == "v" || $key == "V"} {menu_vslider $topname 1}
- if {$key == "h" || $key == "H"} {menu_hslider $topname 1}
- if {$key == "i" || $key == "I"} {menu_hradio $topname 1}
- if {$key == "d" || $key == "D"} {menu_vradio $topname 1}
- if {$key == "u" || $key == "U"} {menu_vumeter $topname 1}
- if {$key == "c" || $key == "C"} {menu_mycnv $topname 1}
-############iemlib##################
-}
-
proc pdtk_canvas_ctrlkey {name key shift} {
# first get rid of ".c" suffix; we'll refer to the toplevel instead
set topname [string trimright $name .c]
# puts stderr [concat ctrl-key $key $topname]
- if {$key == "n" || $key == "N"} {menu_new}
- if {$key == "o" || $key == "O"} {menu_open}
- if {$key == "m" || $key == "M"} {menu_send}
- if {$key == "q" || $key == "Q"} {
- if {$shift == 1} {menu_really_quit} else {menu_quit}
- }
- if {$key == "s" || $key == "S"} {
- if {$shift == 1} {menu_saveas $topname} else {menu_save $topname}
- }
- if {$key == "z" || $key == "Z"} {
- if {$shift == 1} {menu_redo $topname} else {menu_undo $topname}
- }
- if {$key == "w" || $key == "W"} {menu_close $topname}
- if {$key == "p" || $key == "P"} {menu_print $topname}
- if {$key == "x" || $key == "X"} {menu_cut $topname}
- if {$key == "c" || $key == "C"} {menu_copy $topname}
- if {$key == "v" || $key == "V"} {menu_paste $topname}
- if {$key == "d" || $key == "D"} {menu_duplicate $topname}
- if {$key == "a" || $key == "A"} {menu_selectall $topname}
- if {$key == "t" || $key == "T"} {menu_texteditor $topname}
- if {$key == "f" || $key == "F"} {menu_findobject $topname}
- if {$key == "g" || $key == "G"} {menu_findagain $topname}
if {$key == "1"} {menu_object $topname 1}
if {$key == "2"} {menu_message $topname 1}
if {$key == "3"} {menu_floatatom $topname 1}
@@ -1426,7 +1572,42 @@ proc pdtk_canvas_ctrlkey {name key shift} {
if {$key == "5"} {menu_comment $topname 1}
if {$key == "slash"} {menu_audio 1}
if {$key == "period"} {menu_audio 0}
- if {$key == "e" || $key == "E"} {menu_editmode $topname}
+ if {$shift == 1} {
+ if {$key == "q" || $key == "Q"} {menu_really_quit}
+ if {$key == "s" || $key == "S"} {menu_saveas $topname}
+ if {$key == "z" || $key == "Z"} {menu_redo $topname}
+ if {$key == "b" || $key == "B"} {menu_bng $topname 1}
+ if {$key == "t" || $key == "T"} {menu_toggle $topname 1}
+ if {$key == "n" || $key == "N"} {menu_numbox $topname 1}
+ if {$key == "v" || $key == "V"} {menu_vslider $topname 1}
+ if {$key == "h" || $key == "H"} {menu_hslider $topname 1}
+ if {$key == "i" || $key == "I"} {menu_hradio $topname 1}
+ if {$key == "d" || $key == "D"} {menu_vradio $topname 1}
+ if {$key == "u" || $key == "U"} {menu_vumeter $topname 1}
+ if {$key == "c" || $key == "C"} {menu_mycnv $topname 1}
+ } else {
+ if {$key == "e" || $key == "E"} {menu_editmode $topname}
+ if {$key == "q" || $key == "Q"} {menu_quit}
+ if {$key == "s" || $key == "S"} {menu_save $topname}
+ if {$key == "z" || $key == "Z"} {menu_undo $topname}
+ if {$key == "n" || $key == "N"} {menu_new}
+ if {$key == "o" || $key == "O"} {menu_open}
+ if {$key == "m" || $key == "M"} {menu_send}
+ if {$key == "w" || $key == "W"} {menu_close $topname}
+ if {$key == "p" || $key == "P"} {menu_print $topname}
+ if {$key == "x" || $key == "X"} {menu_cut $topname}
+ if {$key == "c" || $key == "C"} {menu_copy $topname}
+ if {$key == "v" || $key == "V"} {menu_paste $topname}
+ if {$key == "d" || $key == "D"} {menu_duplicate $topname}
+ if {$key == "a" || $key == "A"} {menu_selectall $topname}
+ if {$key == "t" || $key == "T"} {menu_texteditor $topname}
+ if {$key == "f" || $key == "F"} {menu_findobject $topname}
+ if {$key == "g" || $key == "G"} {menu_findagain $topname}
+ }
+}
+
+proc pdtk_canvas_scroll {canvas xy distance} {
+ $canvas [list $xy]view scroll $distance units
}
proc pdtk_canvas_motion {name x y mods} {
@@ -1447,6 +1628,16 @@ proc pdtk_canvas_unmap {name} {
pd [canvastosym $name] map 0 \;
}
+proc pdtk_canvas_makeobjs {name files x y} {
+ set c 0
+ for {set n 0} {$n < [llength $files]} {incr n} {
+ if {[regexp {.*/(.+).pd$} [lindex $files $n] file obj] == 1} {
+ pd $name obj $x [expr $y + ($c * 30)] [pdtk_enquote $obj] \;
+ incr c
+ }
+ }
+}
+
set saveas_dir nowhere
############ pdtk_canvas_saveas -- run a saveas dialog ##############
@@ -2908,7 +3099,7 @@ proc dodata_ok {name} {
}
proc pdtk_data_dialog {name stuff} {
-
+ global pd_font3
toplevel $name
wm title $name {Atom}
wm protocol $name WM_DELETE_WINDOW [concat dodata_cancel $name]
@@ -2923,7 +3114,7 @@ proc pdtk_data_dialog {name stuff} {
pack $name.buttonframe.ok -side left -expand 1
text $name.text -relief raised -bd 2 -height 40 -width 60 \
- -yscrollcommand "$name.scroll set" -font -*-courier-bold--normal--12-*
+ -yscrollcommand "$name.scroll set" -font pd_font3
scrollbar $name.scroll -command "$name.text yview"
pack $name.scroll -side right -fill y
pack $name.text -side left -fill both -expand 1
@@ -2948,8 +3139,20 @@ proc pdtk_canvas_editval {name value} {
proc pdtk_text_new {canvasname myname x y text font color} {
# if {$font < 13} {set fontname [format -*-courier-bold----%d-* $font]}
# 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 }
+ }
+
$canvasname create text $x $y \
- -font [format -*-courier-bold--normal--%d-* $font] \
+ -font $typeface \
-tags $myname -text $text -fill $color -anchor nw
# pd [concat $myname size [$canvasname bbox $myname] \;]
}
@@ -2980,31 +3183,36 @@ proc pdtk_pd_ctrlkey {name key shift} {
# asked pd to open something. Also, get character width and height for
# font sizes 8, 10, 12, 14, 16, and 24.
-proc pdtk_pd_startup {version apilist} {
+# tb: user defined typefaces
+proc pdtk_pd_startup {version apilist fontname} {
+# puts stderr [concat $version $apilist $fontname]
global pd_myversion pd_apilist
set pd_myversion $version
set pd_apilist $apilist
-
- set width1 [font measure -*-courier-bold--normal--8-* x]
- set height1 [lindex [font metrics -*-courier-bold--normal--8-*] 5]
-
- set width2 [font measure -*-courier-bold--normal--10-* x]
- set height2 [lindex [font metrics -*-courier-bold--normal--10-*] 5]
-
- set width3 [font measure -*-courier-bold--normal--12-* x]
- set height3 [lindex [font metrics -*-courier-bold--normal--12-*] 5]
-
- set width4 [font measure -*-courier-bold--normal--14-* x]
- set height4 [lindex [font metrics -*-courier-bold--normal--14-*] 5]
-
- set width5 [font measure -*-courier-bold--normal--16-* x]
- set height5 [lindex [font metrics -*-courier-bold--normal--16-*] 5]
-
- set width6 [font measure -*-courier-bold--normal--24-* x]
- set height6 [lindex [font metrics -*-courier-bold--normal--24-*] 5]
-
- set width7 [font measure -*-courier-bold--normal--36-* x]
- set height7 [lindex [font metrics -*-courier-bold--normal--36-*] 5]
+ 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" || \
@@ -3088,7 +3296,7 @@ proc texteditor_ok {name} {
proc pdtk_pd_texteditor {stuff} {
- global edit_number
+ global edit_number pd_font3
set name [format ".text%d" $edit_number]
set edit_number [expr $edit_number + 1]
@@ -3105,7 +3313,7 @@ proc pdtk_pd_texteditor {stuff} {
pack $name.buttons.ok -side left -expand 1
text $name.text -relief raised -bd 2 -height 12 -width 60 \
- -yscrollcommand "$name.scroll set" -font -*-courier-bold--normal--12-*
+ -yscrollcommand "$name.scroll set" -font $pd_font3
scrollbar $name.scroll -command "$name.text yview"
pack $name.scroll -side right -fill y
pack $name.text -side left -fill both -expand 1