aboutsummaryrefslogtreecommitdiff
path: root/pd
diff options
context:
space:
mode:
Diffstat (limited to 'pd')
-rw-r--r--pd/extra/expr~/makefile29
-rw-r--r--pd/extra/makefile5
-rw-r--r--pd/portaudio/pa_win_wdmks/pa_win_wdmks.c2
-rw-r--r--pd/portaudio/pablio/ringbuffer.c2
-rw-r--r--pd/portaudio/pablio/ringbuffer.h2
-rw-r--r--pd/portmidi/pm_mac/pmmacosxcm.c2
-rw-r--r--pd/src/configure.in1
-rw-r--r--pd/src/d_ugen.c2
-rw-r--r--pd/src/m_binbuf.c9
-rw-r--r--pd/src/m_pd.h2
-rw-r--r--pd/src/makefile.in4
-rw-r--r--pd/src/notes.txt2
-rw-r--r--pd/src/x_connective.c2
-rw-r--r--pd/src/x_list.c51
14 files changed, 84 insertions, 31 deletions
diff --git a/pd/extra/expr~/makefile b/pd/extra/expr~/makefile
index 88c1e839..dc408dd9 100644
--- a/pd/extra/expr~/makefile
+++ b/pd/extra/expr~/makefile
@@ -6,8 +6,6 @@ install: install_linux
clean: clean_linux
-clobber: clobber_linux
-
PDEXTERN=/usr/local/lib/pd/externs
# ----------------------- NT -----------------------
@@ -119,13 +117,11 @@ install_linux:
linux_clean:
rm -f *.pd_linux_o *.o
-linux_clobber: clean
- rm -f expr.pd_linux
-
# ----------------------- MAC OSX -----------------------
-MACOSXOBJ = vexp.d_ppc_o vexp_fun.d_ppc_o vexp_if.d_ppc_o
-.SUFFIXES: .d_ppc_o
+MACOSXOBJ3 = vexp.d_ppc_o vexp_fun.d_ppc_o vexp_if.d_ppc_o
+MACOSXOBJ = vexp.d_fat_o vexp_fun.d_fat_o vexp_if.d_fat_o
+.SUFFIXES: .d_ppc_o .d_fat_o
MACOSXCFLAGS = -DMACOSX -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch
@@ -152,13 +148,21 @@ fexpr~.d_ppc: expr.d_ppc
rm -f ../fexpr~.d_ppc
-ln -s expr~/fexpr~.d_ppc ..
+install_d_fat:
+ install expr.d_fat $(PDEXTERN)
+ rm -f $(PDEXTERN)/expr~.d_fat
+ rm -f $(PDEXTERN)/fexpr~.d_fat
+ cd $(PDEXTERN); \
+ -ln -s expr.d_fat expr~.d_fat; \
+ -ln -s expr.d_fat fexpr~.d_fat
+
d_fat: expr.d_fat expr~.d_fat fexpr~.d_fat
.c.d_fat_o:
$(CC) -g $(MACOSXCFLAGS) $(MACOSXINCLUDE) -arch i386 -arch ppc \
- -o $*.d_ppc_o -c $*.c
+ -o $*.d_fat_o -c $*.c
expr.d_fat: $(MACOSXOBJ)
- $(CC) -bundle -undefined suppress -flat_namespace \
+ $(CC) -arch i386 -arch ppc -bundle -undefined suppress -flat_namespace \
-o expr.d_fat $(MACOSXOBJ) -lm
rm -f ../expr.d_fat
-ln -s expr~/expr.d_fat ..
@@ -173,7 +177,7 @@ fexpr~.d_fat: expr.d_fat
rm -f ../fexpr~.d_fat
-ln -s expr~/fexpr~.d_fat ..
-install_darwin:
+install_d_ppc:
install expr.d_ppc $(PDEXTERN)
rm -f $(PDEXTERN)/expr~.d_ppc
rm -f $(PDEXTERN)/fexpr~.d_ppc
@@ -181,9 +185,6 @@ install_darwin:
-ln -s expr.d_ppc expr~.d_ppc; \
-ln -s expr.d_ppc fexpr~.d_ppc
-darwin_clean:
+clean_d_ppc:
rm -f *.d_ppc_o *.o
-darwin_clobber: clean
- rm -f expr.d_ppc
-
diff --git a/pd/extra/makefile b/pd/extra/makefile
index eb5cb403..c2f573a0 100644
--- a/pd/extra/makefile
+++ b/pd/extra/makefile
@@ -85,8 +85,9 @@ DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \
rm -f $*.o
.c.d_fat:
- $(CC) $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
- $(CC) -bundle -undefined suppress -flat_namespace -o $*.pd_imac $*.o
+ $(CC) -arch i386 -arch ppc $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
+ $(CC) -arch i386 -arch ppc -bundle -undefined suppress -flat_namespace \
+ -o $*.d_fat $*.o
rm -f $*.o
# ----------------------------------------------------------
diff --git a/pd/portaudio/pa_win_wdmks/pa_win_wdmks.c b/pd/portaudio/pa_win_wdmks/pa_win_wdmks.c
index b6e54e80..3b1cb08d 100644
--- a/pd/portaudio/pa_win_wdmks/pa_win_wdmks.c
+++ b/pd/portaudio/pa_win_wdmks/pa_win_wdmks.c
@@ -1,5 +1,5 @@
/*
- * $Id: pa_win_wdmks.c,v 1.9 2006-08-18 19:00:59 millerpuckette Exp $
+ * $Id: pa_win_wdmks.c,v 1.10 2006-08-24 15:23:51 millerpuckette Exp $
* PortAudio Windows WDM-KS interface
*
* Author: Andrew Baldwin
diff --git a/pd/portaudio/pablio/ringbuffer.c b/pd/portaudio/pablio/ringbuffer.c
index 0f014189..4f5c3cf9 100644
--- a/pd/portaudio/pablio/ringbuffer.c
+++ b/pd/portaudio/pablio/ringbuffer.c
@@ -1,5 +1,5 @@
/*
- * $Id: ringbuffer.c,v 1.8 2006-08-18 19:00:59 millerpuckette Exp $
+ * $Id: ringbuffer.c,v 1.9 2006-08-24 15:23:51 millerpuckette Exp $
* ringbuffer.c
* Ring Buffer utility..
*
diff --git a/pd/portaudio/pablio/ringbuffer.h b/pd/portaudio/pablio/ringbuffer.h
index 118e3a20..367e5fa2 100644
--- a/pd/portaudio/pablio/ringbuffer.h
+++ b/pd/portaudio/pablio/ringbuffer.h
@@ -6,7 +6,7 @@ extern "C"
#endif /* __cplusplus */
/*
- * $Id: ringbuffer.h,v 1.9 2006-08-18 19:00:59 millerpuckette Exp $
+ * $Id: ringbuffer.h,v 1.10 2006-08-24 15:23:51 millerpuckette Exp $
* ringbuffer.h
* Ring Buffer utility..
*
diff --git a/pd/portmidi/pm_mac/pmmacosxcm.c b/pd/portmidi/pm_mac/pmmacosxcm.c
index 20a23a72..f85dd7e8 100644
--- a/pd/portmidi/pm_mac/pmmacosxcm.c
+++ b/pd/portmidi/pm_mac/pmmacosxcm.c
@@ -5,7 +5,7 @@
* and subsequent work by Andrew Zeldis and Zico Kolter
* and Roger B. Dannenberg
*
- * $Id: pmmacosxcm.c,v 1.9 2006-08-18 19:00:59 millerpuckette Exp $
+ * $Id: pmmacosxcm.c,v 1.10 2006-08-24 15:23:51 millerpuckette Exp $
*/
/* Notes:
diff --git a/pd/src/configure.in b/pd/src/configure.in
index e0571a96..08ad6204 100644
--- a/pd/src/configure.in
+++ b/pd/src/configure.in
@@ -256,6 +256,7 @@ then
else
MORECFLAGS="-arch i386 -arch ppc -Wno-error"
EXTERNTARGET=d_fat
+ LDFLAGS=$LDFLAGS" -arch i386 -arch ppc"
fi
SYSSRC="s_midi_pm.c s_audio_pa.c \
s_audio_pablio.c \
diff --git a/pd/src/d_ugen.c b/pd/src/d_ugen.c
index 1edf5ccb..f7f27aa7 100644
--- a/pd/src/d_ugen.c
+++ b/pd/src/d_ugen.c
@@ -571,7 +571,7 @@ void ugen_start(void)
ugen_stop();
ugen_sortno++;
dsp_chain = (t_int *)getbytes(sizeof(*dsp_chain));
- dsp_chain[0] = 0;
+ dsp_chain[0] = (t_int)dsp_done;
dsp_chainsize = 1;
if (ugen_currentcontext) bug("ugen_start");
}
diff --git a/pd/src/m_binbuf.c b/pd/src/m_binbuf.c
index 4bea4942..3d417560 100644
--- a/pd/src/m_binbuf.c
+++ b/pd/src/m_binbuf.c
@@ -169,7 +169,7 @@ void binbuf_text(t_binbuf *x, char *text, size_t size)
dollar = 0;
if (dollar)
SETDOLLAR(ap, atoi(buf+1));
- else post("dollsym %s", buf), SETDOLLSYM(ap, gensym(buf));
+ else SETDOLLSYM(ap, gensym(buf));
}
else SETSYMBOL(ap, gensym(buf));
}
@@ -649,8 +649,11 @@ void binbuf_eval(t_binbuf *x, t_pd *target, int argc, t_atom *argv)
s9 = binbuf_realizedollsym(at->a_w.w_symbol, argc, argv,
target == &pd_objectmaker);
if (!s9)
- goto broken;
- SETSYMBOL(msp, s9);
+ {
+ error("%s: argument number out of range", at->a_w.w_symbol->s_name);
+ SETSYMBOL(msp, at->a_w.w_symbol);
+ }
+ else SETSYMBOL(msp, s9);
break;
default:
bug("bad item in binbuf");
diff --git a/pd/src/m_pd.h b/pd/src/m_pd.h
index 8369c73b..d6b6877f 100644
--- a/pd/src/m_pd.h
+++ b/pd/src/m_pd.h
@@ -11,7 +11,7 @@ extern "C" {
#define PD_MAJOR_VERSION 0
#define PD_MINOR_VERSION 40
#define PD_BUGFIX_VERSION 0
-#define PD_TEST_VERSION "test03"
+#define PD_TEST_VERSION "test05"
/* old name for "MSW" flag -- we have to take it for the sake of many old
"nmakefiles" for externs, which will define NT and not MSW */
diff --git a/pd/src/makefile.in b/pd/src/makefile.in
index d733547e..4339da57 100644
--- a/pd/src/makefile.in
+++ b/pd/src/makefile.in
@@ -101,7 +101,7 @@ $(BIN_DIR):
test -d $(BIN_DIR) || mkdir -p $(BIN_DIR)
$(BIN_DIR)/pd-watchdog: s_watchdog.c $(BIN_DIR)
- $(CC) -O2 $(STRIPFLAG) -o $(BIN_DIR)/pd-watchdog s_watchdog.c
+ $(CC) $(CFLAGS) $(STRIPFLAG) -o $(BIN_DIR)/pd-watchdog s_watchdog.c
$(BIN_DIR)/pdsend: u_pdsend.c $(BIN_DIR)
$(CC) $(CFLAGS) $(STRIPFLAG) -o $(BIN_DIR)/pdsend u_pdsend.c
@@ -122,7 +122,7 @@ $(BIN_DIR)/pd.tk: u_main.tk
#this is for Max OSX only...
$(BIN_DIR)/libPdTcl.dylib: $(GOBJ) $(GSRC)
- cd ../obj && $(CC) -dynamiclib -read_only_relocs warning \
+ cd ../obj && $(CC) $(CFLAGS) -dynamiclib -read_only_relocs warning \
-o $(BIN_DIR)/libPdTcl.dylib $(GOBJ) \
-F@TCLTK_FRAMEWORKS_PATH@ \
-framework Tcl -framework Tk -framework System \
diff --git a/pd/src/notes.txt b/pd/src/notes.txt
index f3deafe1..07067182 100644
--- a/pd/src/notes.txt
+++ b/pd/src/notes.txt
@@ -33,6 +33,8 @@ block resampling arguments
document tabwrite~_start
"list" to signal inlet (e.g., "*~") or float inlet (f) complains.
$-expansion changed
+list length
+send inlet
problems:
open_via_path call in d_soundfile.c isn't threadsafe
diff --git a/pd/src/x_connective.c b/pd/src/x_connective.c
index c50e27c8..3b2bbba5 100644
--- a/pd/src/x_connective.c
+++ b/pd/src/x_connective.c
@@ -234,6 +234,8 @@ static void send_anything(t_send *x, t_symbol *s, int argc, t_atom *argv)
static void *send_new(t_symbol *s)
{
t_send *x = (t_send *)pd_new(send_class);
+ if (!*s->s_name)
+ symbolinlet_new(&x->x_obj, &x->x_sym);
x->x_sym = s;
return (x);
}
diff --git a/pd/src/x_list.c b/pd/src/x_list.c
index 16de0286..be37a375 100644
--- a/pd/src/x_list.c
+++ b/pd/src/x_list.c
@@ -22,17 +22,19 @@ extern t_pd *newest;
list split - first n elements to first outlet, rest to second outlet
list trim - trim off "list" selector
list length - output number of items in list
- list nth - nth item in list, counting from zero
-Not sure we need these:
- list cat - build a list by accumulating elements
- list foreach - spit out elements of a list one by one
+Need to think more about:
+ list foreach - spit out elements of a list one by one (also in reverse?)
list array - get items from a named array as a list
list reverse - permute elements of a list back to front
list pack - synonym for 'pack'
list unpack - synonym for 'unpack'
+ list cat - build a list by accumulating elements
+
+Probably don't need:
list first - output first n elements.
list last - output last n elements
+ list nth - nth item in list, counting from zero
*/
/* -------------- utility functions: storage, copying -------------- */
@@ -383,6 +385,44 @@ static void list_trim_setup(void)
class_sethelpsymbol(list_trim_class, &s_list);
}
+/* ------------- list length --------------------- */
+
+t_class *list_length_class;
+
+typedef struct _list_length
+{
+ t_object x_obj;
+} t_list_length;
+
+static void *list_length_new( void)
+{
+ t_list_length *x = (t_list_length *)pd_new(list_length_class);
+ outlet_new(&x->x_obj, &s_float);
+ return (x);
+}
+
+static void list_length_list(t_list_length *x, t_symbol *s,
+ int argc, t_atom *argv)
+{
+ outlet_float(x->x_obj.ob_outlet, (float)argc);
+}
+
+static void list_length_anything(t_list_length *x, t_symbol *s,
+ int argc, t_atom *argv)
+{
+ outlet_float(x->x_obj.ob_outlet, (float)argc);
+}
+
+static void list_length_setup(void)
+{
+ list_length_class = class_new(gensym("list length"),
+ (t_newmethod)list_length_new, 0,
+ sizeof(t_list_length), 0, 0);
+ class_addlist(list_length_class, list_length_list);
+ class_addanything(list_length_class, list_length_anything);
+ class_sethelpsymbol(list_length_class, &s_list);
+}
+
/* ------------- list ------------------- */
static void *list_new(t_pd *dummy, t_symbol *s, int argc, t_atom *argv)
@@ -400,6 +440,8 @@ static void *list_new(t_pd *dummy, t_symbol *s, int argc, t_atom *argv)
newest = list_split_new(atom_getfloatarg(1, argc, argv));
else if (s2 == gensym("trim"))
newest = list_trim_new();
+ else if (s2 == gensym("length"))
+ newest = list_length_new();
else
{
error("list %s: unknown function", s2->s_name);
@@ -416,5 +458,6 @@ void x_list_setup(void)
list_prepend_setup();
list_split_setup();
list_trim_setup();
+ list_length_setup();
class_addcreator((t_newmethod)list_new, &s_list, A_GIMME, 0);
}