Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wynn
purr-data
Commits
405e51d7
Commit
405e51d7
authored
Mar 11, 2011
by
Ivica Bukvic
Committed by
Hans-Christoph Steiner
Nov 02, 2011
Browse files
Pd-0.42.5-extended-l2ork-dev-20110310.tar.bz2
parent
913a00ae
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/d_delay.c
View file @
405e51d7
...
...
@@ -5,6 +5,7 @@
/* send~, delread~, throw~, catch~ */
#include
"m_pd.h"
#include
<string.h>
extern
int
ugen_getsortno
(
void
);
#define DEFDELVS 64
/* LATER get this from canvas at DSP time */
...
...
@@ -121,6 +122,11 @@ static void sigdelwrite_free(t_sigdelwrite *x)
(
x
->
x_cspace
.
c_n
+
XTRASAMPS
)
*
sizeof
(
t_sample
));
}
static
void
sigdelwrite_clear
(
t_sigdelwrite
*
x
)
{
int
n
=
XTRASAMPS
+
x
->
x_cspace
.
c_n
;
memset
(
x
->
x_cspace
.
c_vec
,
0
,
n
*
sizeof
(
t_sample
));
}
static
void
sigdelwrite_setup
(
void
)
{
sigdelwrite_class
=
class_new
(
gensym
(
"delwrite~"
),
...
...
@@ -129,6 +135,8 @@ static void sigdelwrite_setup(void)
CLASS_MAINSIGNALIN
(
sigdelwrite_class
,
t_sigdelwrite
,
x_f
);
class_addmethod
(
sigdelwrite_class
,
(
t_method
)
sigdelwrite_dsp
,
gensym
(
"dsp"
),
0
);
class_addmethod
(
sigdelwrite_class
,
(
t_method
)
sigdelwrite_clear
,
gensym
(
"clear"
),
0
);
}
/* ----------------------------- delread~ ----------------------------- */
...
...
src/m_atom.c
View file @
405e51d7
...
...
@@ -94,10 +94,13 @@ void atom_string(t_atom *a, char *buf, unsigned int bufsize)
char
*
sp
;
unsigned
int
len
;
int
quote
;
for
(
sp
=
a
->
a_w
.
w_symbol
->
s_name
,
len
=
0
,
quote
=
0
;
*
sp
;
sp
++
,
len
++
)
if
(
*
sp
==
';'
||
*
sp
==
','
||
*
sp
==
'\\'
||
(
*
sp
==
'$'
&&
sp
[
1
]
>=
'0'
&&
sp
[
1
]
<=
'9'
))
quote
=
1
;
if
(
!
strcmp
(
a
->
a_w
.
w_symbol
->
s_name
,
"$@"
))
/* JMZ: #@ quoting */
quote
=
1
;
else
for
(
sp
=
a
->
a_w
.
w_symbol
->
s_name
,
len
=
0
,
quote
=
0
;
*
sp
;
sp
++
,
len
++
)
if
(
*
sp
==
';'
||
*
sp
==
','
||
*
sp
==
'\\'
||
(
*
sp
==
'$'
&&
sp
[
1
]
>=
'0'
&&
sp
[
1
]
<=
'9'
))
quote
=
1
;
if
(
quote
)
{
char
*
bp
=
buf
,
*
ep
=
buf
+
(
bufsize
-
2
);
...
...
@@ -105,7 +108,7 @@ void atom_string(t_atom *a, char *buf, unsigned int bufsize)
while
(
bp
<
ep
&&
*
sp
)
{
if
(
*
sp
==
';'
||
*
sp
==
','
||
*
sp
==
'\\'
||
(
*
sp
==
'$'
&&
sp
[
1
]
>=
'0'
&&
sp
[
1
]
<=
'9'
))
(
*
sp
==
'$'
&&
((
sp
[
1
]
>=
'0'
&&
sp
[
1
]
<=
'9'
)
||
sp
[
1
]
==
'@'
))
)
*
bp
++
=
'\\'
;
*
bp
++
=
*
sp
++
;
}
...
...
@@ -125,7 +128,11 @@ void atom_string(t_atom *a, char *buf, unsigned int bufsize)
}
break
;
case
A_DOLLAR
:
sprintf
(
buf
,
"$%d"
,
a
->
a_w
.
w_index
);
if
(
a
->
a_w
.
w_symbol
==
gensym
(
"@"
))
{
/* JMZ: $@ expansion */
sprintf
(
buf
,
"$@"
);
}
else
{
sprintf
(
buf
,
"$%d"
,
a
->
a_w
.
w_index
);
}
break
;
case
A_DOLLSYM
:
strncpy
(
buf
,
a
->
a_w
.
w_symbol
->
s_name
,
bufsize
);
...
...
src/m_binbuf.c
View file @
405e51d7
...
...
@@ -146,7 +146,8 @@ void binbuf_text(t_binbuf *x, char *text, size_t size)
}
}
if
(
!
lastslash
&&
c
==
'$'
&&
(
textp
!=
etext
&&
textp
[
0
]
>=
'0'
&&
textp
[
0
]
<=
'9'
))
((
textp
[
0
]
>=
'0'
&&
textp
[
0
]
<=
'9'
)
||
textp
[
0
]
==
'@'
)))
/* JMZ: $@ and $# expansion */
dollar
=
1
;
if
(
!
slash
)
bufp
++
;
}
...
...
@@ -155,7 +156,7 @@ void binbuf_text(t_binbuf *x, char *text, size_t size)
&&
*
textp
!=
'\t'
&&*
textp
!=
','
&&
*
textp
!=
';'
)));
*
bufp
=
0
;
#if 0
post("binbuf_text: buf %s
", buf
);
post("binbuf_text: buf %s
, dollar=%d", buf, dollar
);
#endif
if
(
floatstate
==
2
||
floatstate
==
4
||
floatstate
==
5
||
floatstate
==
8
)
...
...
@@ -166,14 +167,27 @@ void binbuf_text(t_binbuf *x, char *text, size_t size)
was. */
else
if
(
dollar
)
{
if
(
buf
[
0
]
!=
'$'
)
dollar
=
0
;
for
(
bufp
=
buf
+
1
;
*
bufp
;
bufp
++
)
if
(
*
bufp
<
'0'
||
*
bufp
>
'9'
)
dollar
=
0
;
if
(
dollar
)
SETDOLLAR
(
ap
,
atoi
(
buf
+
1
));
else
SETDOLLSYM
(
ap
,
gensym
(
buf
));
if
(
buf
[
1
]
==
'@'
)
/* JMZ: $@ expansion */
{
if
(
buf
[
2
]
==
0
)
/* only expand A_DOLLAR $@ */
{
ap
->
a_type
=
A_DOLLAR
;
ap
->
a_w
.
w_symbol
=
gensym
(
"@"
);
}
else
/* there is no A_DOLLSYM $@ */
{
SETSYMBOL
(
ap
,
gensym
(
buf
));
}
}
else
{
if
(
buf
[
0
]
!=
'$'
)
dollar
=
0
;
for
(
bufp
=
buf
+
1
;
*
bufp
;
bufp
++
)
if
(
*
bufp
<
'0'
||
*
bufp
>
'9'
)
dollar
=
0
;
if
(
dollar
)
SETDOLLAR
(
ap
,
atoi
(
buf
+
1
));
else
SETDOLLSYM
(
ap
,
gensym
(
buf
));
}
}
else
SETSYMBOL
(
ap
,
gensym
(
buf
));
}
...
...
@@ -337,8 +351,12 @@ void binbuf_addbinbuf(t_binbuf *x, t_binbuf *y)
break
;
case
A_DOLLAR
:
//fprintf(stderr,"addbinbuf: dollar\n");
sprintf
(
tbuf
,
"$%d"
,
ap
->
a_w
.
w_index
);
SETSYMBOL
(
ap
,
gensym
(
tbuf
));
if
(
ap
->
a_w
.
w_symbol
==
gensym
(
"@"
)){
/* JMZ: $@ expansion */
SETSYMBOL
(
ap
,
gensym
(
"$@"
));
}
else
{
sprintf
(
tbuf
,
"$%d"
,
ap
->
a_w
.
w_index
);
SETSYMBOL
(
ap
,
gensym
(
tbuf
));
}
break
;
case
A_DOLLSYM
:
//fprintf(stderr,"addbinbuf: dollsym\n");
...
...
@@ -392,6 +410,11 @@ void binbuf_restore(t_binbuf *x, int argc, t_atom *argv)
char
*
str
=
argv
->
a_w
.
w_symbol
->
s_name
,
*
str2
;
if
(
!
strcmp
(
str
,
";"
))
SETSEMI
(
ap
);
else
if
(
!
strcmp
(
str
,
","
))
SETCOMMA
(
ap
);
else
if
(
!
strcmp
(
str
,
"$@"
))
/* JMZ: $@ expansion */
{
ap
->
a_type
=
A_DOLLAR
;
ap
->
a_w
.
w_symbol
=
gensym
(
"@"
);
}
else
if
((
str2
=
strchr
(
str
,
'$'
))
&&
str2
[
1
]
>=
'0'
&&
str2
[
1
]
<=
'9'
)
{
...
...
@@ -585,7 +608,9 @@ void binbuf_eval(t_binbuf *x, t_pd *target, int argc, t_atom *argv)
t_atom
*
at
=
x
->
b_vec
;
int
ac
=
x
->
b_n
;
int
nargs
,
maxnargs
=
0
;
if
(
ac
<=
SMALLMSG
)
//if (ac <= SMALLMSG)
//IB added ac > argc check to allow for proper $@ arg (list) allocation
if
(
ac
<=
SMALLMSG
&&
ac
>
argc
)
mstack
=
smallstack
;
else
{
...
...
@@ -597,12 +622,16 @@ void binbuf_eval(t_binbuf *x, t_pd *target, int argc, t_atom *argv)
that the pd_objectmaker target can't come up via a named
destination in the message, only because the original "target"
points there. */
if
(
target
==
&
pd_objectmaker
)
maxnargs
=
ac
;
if
(
target
==
&
pd_objectmaker
)
{
//IB added ac > argc check to allow for proper $@ arg (list) allocation
maxnargs
=
(
ac
>
argc
?
ac
:
argc
+
1
);
//if (at && x->b_n)
// fprintf(stderr,"pd_objectmaker %s %d\n", at[0].a_w.w_symbol->s_name, maxnargs);
}
else
{
int
i
,
j
=
(
target
?
0
:
-
1
);
for
(
i
=
0
;
i
<
ac
;
i
++
)
for
(
i
=
0
;
i
<
(
ac
>
argc
?
ac
:
argc
)
;
i
++
)
{
if
(
at
[
i
].
a_type
==
A_SEMI
)
j
=
-
1
;
...
...
@@ -626,6 +655,8 @@ void binbuf_eval(t_binbuf *x, t_pd *target, int argc, t_atom *argv)
}
msp
=
mstack
;
//fprintf(stderr,"maxnargs=%d argc=%d\n", maxnargs, argc);
//static t_atom *ems = mstack+MSTACKSIZE;
while
(
1
)
{
t_pd
*
nexttarget
;
...
...
@@ -712,10 +743,27 @@ void binbuf_eval(t_binbuf *x, t_pd *target, int argc, t_atom *argv)
*
msp
=
*
at
;
break
;
case
A_DOLLAR
:
if
(
at
->
a_w
.
w_index
>
0
&&
at
->
a_w
.
w_index
<=
argc
)
*
msp
=
argv
[
at
->
a_w
.
w_index
-
1
];
else
if
(
at
->
a_w
.
w_index
==
0
)
SETFLOAT
(
msp
,
canvas_getdollarzero
());
if
(
at
->
a_w
.
w_symbol
==
gensym
(
"@"
))
{
/* JMZ: $@ expansion */
int
i
;
//if(msp+argc >= ems)
//{
// error("message stack overflow");
// goto broken;
//}
for
(
i
=
0
;
i
<
argc
;
i
++
)
{
*
msp
++=
argv
[
i
];
nargs
++
;
}
msp
--
;
nargs
--
;
//fprintf(stderr,"x->b_n=%d ac=%d maxnargs=%d nargs=%d argc=%d\n", x->b_n, ac, maxnargs, nargs, argc);
}
else
if
(
at
->
a_w
.
w_index
>
0
&&
at
->
a_w
.
w_index
<=
argc
)
*
msp
=
argv
[
at
->
a_w
.
w_index
-
1
];
else
if
(
at
->
a_w
.
w_index
==
0
)
SETFLOAT
(
msp
,
canvas_getdollarzero
());
else
{
if
(
target
==
&
pd_objectmaker
)
...
...
src/m_pd.h
View file @
405e51d7
...
...
@@ -11,7 +11,7 @@ extern "C" {
#define PD_MAJOR_VERSION 0
#define PD_MINOR_VERSION 42
#define PD_BUGFIX_VERSION 5
#define PD_TEST_VERSION "extended-l2ork-2011030
5
"
#define PD_TEST_VERSION "extended-l2ork-201103
1
0"
/* 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 */
...
...
src/makefile.dependencies
View file @
405e51d7
...
...
@@ -19,12 +19,13 @@ d_array.o: d_array.c m_pd.h \
/usr/include/bits/sigset.h /usr/include/bits/time.h
\
/usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h
d_delay.o
:
d_delay.c m_pd.h
\
/usr/lib/gcc/i486-linux-gnu/4.4.1/include/stddef.h /usr/include/st
dio
.h
\
/usr/lib/gcc/i486-linux-gnu/4.4.1/include/stddef.h /usr/include/st
ring
.h
\
/usr/include/features.h /usr/include/bits/predefs.h
\
/usr/include/sys/cdefs.h /usr/include/bits/wordsize.h
\
/usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h
\
/usr/include/bits/types.h /usr/include/bits/typesizes.h
\
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h
\
/usr/include/xlocale.h /usr/include/stdio.h /usr/include/bits/types.h
\
/usr/include/bits/typesizes.h /usr/include/libio.h
\
/usr/include/_G_config.h /usr/include/wchar.h
\
/usr/lib/gcc/i486-linux-gnu/4.4.1/include/stdarg.h
\
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h
d_filter.o
:
d_filter.c m_pd.h
\
...
...
src/pd.tk
View file @
405e51d7
...
...
@@ -652,7 +652,7 @@ pack .controls.dio -side right -padx 20
toplevel
.
printout
wm
title
.
printout
"Console"
#
initial
location
of
the
console
window
(+
x
+
y
)
wm
geometry
.
printout
+
10
+
1
6
0
wm
geometry
.
printout
+
10
+
1
7
0
wm
protocol
.
printout
WM_DELETE_WINDOW
{
.
controls
.
switches
.
console
invoke
}
match_linux_wm
[
list
frame
.
printout
.
frame
]
text
.
printout
.
frame
.
text
-
relief
sunken
-
bd
1
-
font
console_font
\
...
...
src/x_connective.c
View file @
405e51d7
...
...
@@ -1051,6 +1051,14 @@ static void trigger_anything(t_trigger *x, t_symbol *s, int argc, t_atom *argv)
outlet_bang
(
u
->
u_outlet
);
else
if
(
u
->
u_type
==
TR_ANYTHING
)
outlet_anything
(
u
->
u_outlet
,
s
,
argc
,
argv
);
else
if
(
u
->
u_type
==
TR_STATIC_FLOAT
)
{
outlet_float
(
u
->
u_outlet
,
u
->
u_float
);
}
else
if
(
u
->
u_type
==
TR_STATIC_SYMBOL
)
{
outlet_symbol
(
u
->
u_outlet
,
&
u
->
u_sym
);
}
else
pd_error
(
x
,
"trigger: can only convert 's' to 'b' or 'a'"
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment