aboutsummaryrefslogtreecommitdiff
path: root/desiredata/src
diff options
context:
space:
mode:
Diffstat (limited to 'desiredata/src')
-rw-r--r--desiredata/src/builtins.c5
-rw-r--r--desiredata/src/builtins_dsp.c1
-rw-r--r--desiredata/src/desire.c25
-rw-r--r--desiredata/src/s_main.c1
4 files changed, 24 insertions, 8 deletions
diff --git a/desiredata/src/builtins.c b/desiredata/src/builtins.c
index 8ee60324..3f20ba6c 100644
--- a/desiredata/src/builtins.c
+++ b/desiredata/src/builtins.c
@@ -6,7 +6,6 @@
#define PD_PLUSPLUS_FACE
#include "desire.h"
-#include "s_stuff.h"
#include <stdlib.h>
#include <stdarg.h>
#include <math.h>
@@ -1342,7 +1341,7 @@ static void receive_bang( t_receive *x) {
static void receive_float( t_receive *x, t_float v) { x->outlet->send(v);}
static void receive_symbol( t_receive *x, t_symbol *v) { x->outlet->send(v);}
static void receive_pointer( t_receive *x, t_gpointer *v) { x->outlet->send(v);}
-static void receive_list( t_receive *x, t_symbol *s, int argc, t_atom *argv) {x->outlet->send(argc,argv);}
+static void receive_list( t_receive *x, t_symbol *s, int argc, t_atom *argv) {x->outlet->send( argc,argv);}
static void receive_anything(t_receive *x, t_symbol *s, int argc, t_atom *argv) {x->outlet->send(s,argc,argv);}
static void *receive_new(t_symbol *s) {
t_receive *x = (t_receive *)pd_new(receive_class);
@@ -1725,7 +1724,7 @@ static void trigger_anything(t_trigger *x, t_symbol *s, int argc, t_atom *argv)
for (int i = x->n; u--, i--;) {
if (u->type == 'b') u->outlet->send();
else if (u->type == 'a') u->outlet->send(s,argc,argv);
- else error("trigger: can only convert 's' to 'b' or 'a'", s->name);
+ else error("trigger: can only convert 's' to 'b' or 'a'; got %s", s->name);
}
}
static void trigger_bang(t_trigger *x) {trigger_list(x,0,0,0 );}
diff --git a/desiredata/src/builtins_dsp.c b/desiredata/src/builtins_dsp.c
index fc4b9a1a..66573877 100644
--- a/desiredata/src/builtins_dsp.c
+++ b/desiredata/src/builtins_dsp.c
@@ -15,7 +15,6 @@ to reset the value.
#define PD_PLUSPLUS_FACE
#include "desire.h"
#include "m_simd.h"
-#include "s_stuff.h"
#include <math.h>
#include <stdio.h>
#include <string.h>
diff --git a/desiredata/src/desire.c b/desiredata/src/desire.c
index 6369fbde..4149eb69 100644
--- a/desiredata/src/desire.c
+++ b/desiredata/src/desire.c
@@ -12,7 +12,6 @@
#define PD_PLUSPLUS_FACE
#include "m_pd.h"
#include "desire.h"
-#include "s_stuff.h"
#include <ctype.h>
#include <math.h>
#include <stdarg.h>
@@ -515,7 +514,7 @@ char *canvas_makefilename(t_canvas *x, char *file, char *result, int resultsize)
}
static void canvas_rename(t_canvas *x, t_symbol *s, t_symbol *dir) {
- t_symbol *bs = canvas_makebindsym(x->name);
+ t_symbol *bs = canvas_makebindsym(s);
if (x->name!=s_Pd) pd_unbind(x, bs);
SET(name,s);
if (x->name!=s_Pd) pd_bind(x, bs);
@@ -781,12 +780,32 @@ extern "C" void canvas_popabstraction(t_canvas *x) {
void canvas_objfor(t_canvas *gl, t_text *x, int argc, t_atom *argv);
+const char *atomtype_name(t_atomtype i) {
+#define T(TYPE) case TYPE: return #TYPE;
+ switch (i) {
+ T(A_NULL)
+ T(A_FLOAT) T(A_SYMBOL) T(A_POINTER)
+ T(A_SEMI) T(A_COMMA)
+ T(A_DEFFLOAT) T(A_DEFSYM)
+ T(A_DOLLAR) T(A_DOLLSYM)
+ T(A_GIMME)
+ T(A_CANT)
+/* regular pd stops here, before #12 */
+ T(A_ATOM)
+ T(A_LIST)
+ T(A_GRID)
+ T(A_GRIDOUT)
+ default: return "A_UNKNOWN";
+ }
+}
+
void canvas_restore(t_canvas *x, t_symbol *s, int argc, t_atom *argv) {
if (argc > 3) {
t_atom *ap=argv+3;
if (ap->a_type == A_SYMBOL) {
t_canvasenvironment *e = canvas_getenv(canvas_getcurrent());
- canvas_rename(x, binbuf_realizedollsym(ap->a_symbol, e->argc, e->argv, 1), 0);
+ for (int i=0; i<e->argc; i++) post("restore: arg %d has type %s",i,atomtype_name(e->argv[i].a_type));
+ canvas_rename(x, binbuf_realizedollsym(ap->a_symbol,e->argc,e->argv,1), 0);
}
}
canvas_pop(x,0); /* 0 means "don't touch" here. */
diff --git a/desiredata/src/s_main.c b/desiredata/src/s_main.c
index 175b4c69..114305ae 100644
--- a/desiredata/src/s_main.c
+++ b/desiredata/src/s_main.c
@@ -5,7 +5,6 @@
/* Zmölnig added advanced multidevice-support (2001) */
#include "desire.h"
-#include "s_stuff.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <limits.h>