Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wynn
purr-data
Commits
9887d05d
Commit
9887d05d
authored
Apr 13, 2011
by
Ivica Bukvic
Committed by
Hans-Christoph Steiner
Nov 02, 2011
Browse files
Pd-0.42.5-extended-l2ork-dev-20110413.tar.bz2
parent
bd1372ba
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/g_canvas.c
View file @
9887d05d
...
...
@@ -376,6 +376,7 @@ t_canvas *canvas_new(void *dummy, t_symbol *sel, int argc, t_atom *argv)
we keep a list of these redundant allocations and destroy them when pd quits */
//if (x->gl_owner && x->gl_env) {
/*
t_redundant_mem *new_rm = (t_redundant_mem *)t_getbytes(sizeof(*new_rm));
new_rm->rm_what = (int)getbytes(1);
if (rm_start == NULL) {
...
...
@@ -393,12 +394,13 @@ t_canvas *canvas_new(void *dummy, t_symbol *sel, int argc, t_atom *argv)
rm_end->rm_next = new_rm;
rm_end = new_rm;
}
*/
//}
t_canvas
*
x
=
(
t_canvas
*
)
pd_new
(
canvas_class
);
/* now that we've created a new canvas, add canvas info to the new_rm */
new_rm
->
rm_canvas
=
x
;
//
new_rm->rm_canvas = x;
t_canvas
*
owner
=
canvas_getcurrent
();
t_symbol
*
s
=
&
s_
;
...
...
src/g_canvas.h
View file @
9887d05d
...
...
@@ -45,6 +45,8 @@ extern "C" {
instantiated inside canvas_new since the bug only affects new
canvases/abstractions rather than individual objects. the queue
is destructed in m_glob.c quit call (when pd exits) */
/*
typedef struct _redundant_mem
{
int rm_what;
...
...
@@ -54,7 +56,8 @@ typedef struct _redundant_mem
t_redundant_mem *rm_start;
t_redundant_mem *rm_end;
*/
/* --------------------- geometry ---------------------------- */
#define IOWIDTH 7
/* width of an inlet/outlet in pixels */
#define IOMIDDLE ((IOWIDTH-1)/2)
...
...
src/g_numbox.c
View file @
9887d05d
...
...
@@ -236,7 +236,7 @@ static void my_numbox_draw_new(t_my_numbox *x, t_glist *glist)
x
->
x_gui
.
x_lcol
,
x
,
x
);
my_numbox_ftoa
(
x
);
sys_vgui
(
".x%lx.c create text %d %d -text {%s} -anchor w \
-font {{%s} %d %s} -fill #%6.6x -tags {%lxNUMBER %lxNUM}
\n
"
,
-font {{%s} %d %s} -fill #%6.6x -tags {%lxNUMBER %lxNUM
noscroll
}
\n
"
,
canvas
,
xpos
+
half
+
2
,
ypos
+
half
+
d
,
x
->
x_buf
,
x
->
x_gui
.
x_font
,
x
->
x_gui
.
x_fontsize
,
sys_fontweight
,
x
->
x_gui
.
x_fcol
,
x
,
x
);
...
...
src/m_memory.c
View file @
9887d05d
...
...
@@ -82,6 +82,7 @@ void freebytes(void *fatso, size_t nbytes)
totalmem
-=
nbytes
;
#endif
free
(
fatso
);
fatso
=
NULL
;
}
#ifdef DEBUGMEM
...
...
src/m_pd.c
View file @
9887d05d
...
...
@@ -36,7 +36,8 @@ t_pd *pd_new(t_class *c)
1 found a duplicate
*/
int
duplicate
=
-
1
;
/*
int duplicate = 0; //change to -1 to enable redundant_mem resizing
int random_extra = 0;
while (duplicate != 0) {
...
...
@@ -76,6 +77,7 @@ t_pd *pd_new(t_class *c)
x = (t_pd *)t_resizebytes(x, c->c_size+random_extra, c->c_size);
}
}
*/
x
=
(
t_pd
*
)
t_getbytes
(
c
->
c_size
);
*
x
=
c
;
...
...
@@ -101,6 +103,7 @@ void pd_free(t_pd *x)
binbuf_free
(((
t_object
*
)
x
)
->
ob_binbuf
);
}
if
(
c
->
c_size
)
t_freebytes
(
x
,
c
->
c_size
);
x
=
NULL
;
}
void
gobj_save
(
t_gobj
*
x
,
t_binbuf
*
b
)
...
...
src/m_pd.h
View file @
9887d05d
...
...
@@ -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-201104
04
"
#define PD_TEST_VERSION "extended-l2ork-201104
13
"
/* 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/s_inter.c
View file @
9887d05d
...
...
@@ -1314,13 +1314,14 @@ void sys_bail(int n)
void
glob_quit
(
void
*
dummy
)
{
/* deallocate rendundant memory (see g_canvas.c canvas_new and g_canvas.h for struct declaration */
/*
if (rm_start) {
while (rm_start->rm_next) {
t_redundant_mem *tmp = rm_start;
rm_start = rm_start->rm_next;
/
*
we can also explicitly look for deallocating per-canvas settings here, if such proves necessary
to do so, look at rm_start->rm_canvas
*/
/
/
we can also explicitly look for deallocating per-canvas settings here, if such proves necessary
//
to do so, look at rm_start->rm_canvas
//fprintf(stderr,".x%lx\n", tmp->rm_canvas);
t_freebytes(tmp, sizeof(*tmp));
//fprintf(stderr,"dealloc\n");
...
...
@@ -1330,6 +1331,7 @@ void glob_quit(void *dummy)
//fprintf(stderr,"last dealloc\n");
}
}
*/
sys_vgui
(
"exit
\n
"
);
if
(
!
sys_nogui
)
...
...
src/x_connective.c
View file @
9887d05d
...
...
@@ -971,6 +971,18 @@ static void *trigger_new(t_symbol *s, int argc, t_atom *argv)
if
(
thistype
==
TR_SYMBOL
)
{
if
(
strlen
(
ap
->
a_w
.
w_symbol
->
s_name
)
==
1
)
c
=
ap
->
a_w
.
w_symbol
->
s_name
[
0
];
else
if
(
strcmp
(
ap
->
a_w
.
w_symbol
->
s_name
,
"anything"
)
==
0
)
c
=
'a'
;
else
if
(
strcmp
(
ap
->
a_w
.
w_symbol
->
s_name
,
"bang"
)
==
0
)
c
=
'b'
;
else
if
(
strcmp
(
ap
->
a_w
.
w_symbol
->
s_name
,
"float"
)
==
0
)
c
=
'f'
;
else
if
(
strcmp
(
ap
->
a_w
.
w_symbol
->
s_name
,
"list"
)
==
0
)
c
=
'l'
;
else
if
(
strcmp
(
ap
->
a_w
.
w_symbol
->
s_name
,
"pointer"
)
==
0
)
c
=
'p'
;
else
if
(
strcmp
(
ap
->
a_w
.
w_symbol
->
s_name
,
"symbol"
)
==
0
)
c
=
's'
;
else
c
=
'S'
;
}
else
if
(
thistype
==
TR_FLOAT
)
...
...
@@ -1059,7 +1071,7 @@ static void trigger_anything(t_trigger *x, t_symbol *s, int argc, t_atom *argv)
{
outlet_symbol
(
u
->
u_outlet
,
&
u
->
u_sym
);
}
else
pd_error
(
x
,
"trigger: can only convert '
s
' to 'b' or 'a'"
);
else
pd_error
(
x
,
"trigger: can only convert '
a
' to 'b' or 'a'"
);
}
}
...
...
Write
Preview
Markdown
is supported
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