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
nerrons
purr-data
Commits
4a68207b
Commit
4a68207b
authored
Aug 01, 2014
by
Mathieu L Bouchard
Browse files
remove unused vars
parent
1c9da2a7
Changes
10
Hide whitespace changes
Inline
Side-by-side
pd/src/g_bang.c
View file @
4a68207b
...
...
@@ -520,7 +520,7 @@ static void bng__motionhook(t_scalehandle *sh,
if
(
properties
)
{
int
new_w
=
x
->
x_gui
.
x_w
-
x
->
x_gui
.
scale_offset_x
+
sh
->
h_dragx
;
int
new_h
=
x
->
x_gui
.
x_h
-
x
->
x_gui
.
scale_offset_y
+
sh
->
h_dragy
;
//
int new_h = x->x_gui.x_h - x->x_gui.scale_offset_y + sh->h_dragy;
sys_vgui
(
".gfxstub%lx.dim.w_ent delete 0 end
\n
"
,
properties
);
sys_vgui
(
".gfxstub%lx.dim.w_ent insert 0 %d
\n
"
,
properties
,
new_w
);
//sys_vgui(".gfxstub%lx.dim.h_ent delete 0 end\n", properties);
...
...
@@ -531,11 +531,6 @@ static void bng__motionhook(t_scalehandle *sh,
{
t_bng
*
x
=
(
t_bng
*
)(
sh
->
h_master
);
int
dx
=
(
int
)
f1
,
dy
=
(
int
)
f2
;
int
newx
,
newy
;
newx
=
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_w
-
x
->
x_gui
.
scale_offset_x
+
dx
;
newy
=
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_h
-
x
->
x_gui
.
scale_offset_y
+
dy
;
sh
->
h_dragx
=
dx
;
sh
->
h_dragy
=
dy
;
...
...
pd/src/g_editor.c
View file @
4a68207b
...
...
@@ -552,9 +552,9 @@ void glist_deselect(t_glist *x, t_gobj *y)
{
//fprintf(stderr, "deselect\n");
int
fixdsp
=
0
;
static
int
reenter
=
0
;
//
static int reenter = 0;
/* if (reenter) return; */
reenter
=
1
;
//
reenter = 1;
if
(
x
->
gl_editor
)
{
t_selection
*
sel
,
*
sel2
;
...
...
@@ -629,7 +629,7 @@ void glist_deselect(t_glist *x, t_gobj *y)
sys_vgui
(
"pdtk_canvas_update_edit_menu .x%lx 0
\n
"
,
x
);
canvas_draw_gop_resize_hooks
(
x
);
}
reenter
=
0
;
//
reenter = 0;
}
void
glist_noselect
(
t_glist
*
x
)
...
...
@@ -2649,7 +2649,7 @@ static void canvas_donecanvasdialog(t_glist *x,
{
t_float
xperpix
,
yperpix
,
x1
,
y1
,
x2
,
y2
,
xpix
,
ypix
,
xmargin
,
ymargin
;
int
rx1
=
0
,
ry1
=
0
,
rx2
=
0
,
ry2
=
0
;
//for getrect
int
graphme
,
redraw
=
0
;
int
graphme
;
xperpix
=
atom_getfloatarg
(
0
,
argc
,
argv
);
yperpix
=
atom_getfloatarg
(
1
,
argc
,
argv
);
...
...
@@ -2718,8 +2718,6 @@ static void canvas_donecanvasdialog(t_glist *x,
}
else
{
if
(
xperpix
!=
glist_dpixtodx
(
x
,
1
)
||
yperpix
!=
glist_dpixtody
(
x
,
1
))
redraw
=
1
;
if
(
xperpix
>
0
)
{
x
->
gl_x1
=
0
;
...
...
@@ -4814,7 +4812,7 @@ void canvas_mouseup(t_canvas *x,
void
canvas_mousedown_middle
(
t_canvas
*
x
,
t_floatarg
xpos
,
t_floatarg
ypos
,
t_floatarg
which
,
t_floatarg
mod
)
{
int
shiftmod
,
runmode
,
altmod
,
rightclick
,
middleclick
;
int
middleclick
;
// remove stale tooltips, if any
if
(
objtooltip
)
...
...
@@ -4824,10 +4822,6 @@ void canvas_mousedown_middle(t_canvas *x, t_floatarg xpos, t_floatarg ypos,
}
// read key and mouse button states
shiftmod
=
((
int
)
mod
&
SHIFTMOD
);
runmode
=
(((
int
)
mod
&
CTRLMOD
)
||
(
!
x
->
gl_edit
));
altmod
=
((
int
)
mod
&
ALTMOD
);
rightclick
=
((
int
)
mod
&
RIGHTCLICK
);
x
->
gl_editor
->
e_xwas
=
(
int
)
xpos
;
x
->
gl_editor
->
e_ywas
=
(
int
)
ypos
;
middleclick
=
(
which
==
2
?
1
:
0
);
...
...
@@ -5227,7 +5221,6 @@ void canvas_motion(t_canvas *x, t_floatarg xpos, t_floatarg ypos,
&
x11
,
&
y11
,
&
x12
,
&
y12
))
{
int
wantwidth
=
xpos
-
x11
;
t_gotfn
sizefn
;
t_object
*
ob
=
pd_checkobject
(
&
y1
->
g_pd
);
if
(
ob
&&
ob
->
te_pd
->
c_wb
==
&
text_widgetbehavior
||
(
ob
->
ob_pd
==
canvas_class
&&
...
...
@@ -6127,7 +6120,7 @@ static void canvas_dopaste(t_canvas *x, t_binbuf *b)
do_not_redraw
+=
1
;
int
was_dnr
=
do_not_redraw
;
t_gobj
*
newgobj
,
*
g2
;
t_gobj
*
g2
;
int
dspstate
=
canvas_suspend_dsp
(),
nbox
,
count
;
int
canvas_empty
=
0
;
int
offset
=
1
;
...
...
@@ -6448,8 +6441,8 @@ static void canvas_reselect(t_canvas *x)
if
((
gwas
=
x
->
gl_editor
->
e_selection
->
sel_what
)
&&
!
x
->
gl_editor
->
e_selection
->
sel_next
)
{
int
nobjwas
=
glist_getindex
(
x
,
0
)
,
indx
=
canvas_getindex
(
x
,
x
->
gl_editor
->
e_selection
->
sel_what
);
//
int nobjwas = glist_getindex(x, 0)
;
//int
indx = canvas_getindex(x, x->gl_editor->e_selection->sel_what);
glist_noselect
(
x
);
for
(
g
=
x
->
gl_list
;
g
;
g
=
g
->
g_next
)
if
(
g
==
gwas
)
...
...
@@ -7105,7 +7098,7 @@ static void canvas_tidy(t_canvas *x)
/* LATER might have to speed this up */
static
void
canvas_tidyold
(
t_canvas
*
x
)
{
t_gobj
*
y
,
*
y2
,
*
y3
;
t_gobj
*
y
,
*
y2
;
int
ax1
,
ay1
,
ax2
,
ay2
,
bx1
,
by1
,
bx2
,
by2
;
int
histogram
[
NHIST
],
*
ip
,
i
,
besthist
,
bestdist
;
/* if nobody is selected, this means do it to all boxes;
...
...
pd/src/g_hdial.c
View file @
4a68207b
...
...
@@ -553,12 +553,6 @@ static void hradio__motionhook(t_scalehandle *sh,
{
t_bng
*
x
=
(
t_bng
*
)(
sh
->
h_master
);
int
dx
=
(
int
)
f1
,
dy
=
(
int
)
f2
;
int
newx
,
newy
;
newx
=
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_w
-
x
->
x_gui
.
scale_offset_x
+
dx
;
newy
=
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_h
-
x
->
x_gui
.
scale_offset_y
+
dy
;
sh
->
h_dragx
=
dx
;
sh
->
h_dragy
=
dy
;
...
...
pd/src/g_hslider.c
View file @
4a68207b
...
...
@@ -535,12 +535,6 @@ static void hslider__motionhook(t_scalehandle *sh,
{
t_bng
*
x
=
(
t_bng
*
)(
sh
->
h_master
);
int
dx
=
(
int
)
f1
,
dy
=
(
int
)
f2
;
int
newx
,
newy
;
newx
=
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_w
-
x
->
x_gui
.
scale_offset_x
+
dx
;
newy
=
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_h
-
x
->
x_gui
.
scale_offset_y
+
dy
;
sh
->
h_dragx
=
dx
;
sh
->
h_dragy
=
dy
;
...
...
pd/src/g_mycanvas.c
View file @
4a68207b
...
...
@@ -427,12 +427,6 @@ static void my_canvas__motionhook(t_scalehandle *sh,
{
t_my_canvas
*
x
=
(
t_my_canvas
*
)(
sh
->
h_master
);
int
dx
=
(
int
)
f1
,
dy
=
(
int
)
f2
;
int
newx
,
newy
;
newx
=
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_ldx
-
x
->
x_gui
.
label_offset_x
+
dx
;
newy
=
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_ldy
-
x
->
x_gui
.
label_offset_y
+
dy
;
sh
->
h_dragx
=
dx
;
sh
->
h_dragy
=
dy
;
...
...
pd/src/g_numbox.c
View file @
4a68207b
...
...
@@ -783,12 +783,6 @@ static void my_numbox__motionhook(t_scalehandle *sh,
{
t_bng
*
x
=
(
t_bng
*
)(
sh
->
h_master
);
int
dx
=
(
int
)
f1
,
dy
=
(
int
)
f2
;
int
newx
,
newy
;
newx
=
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_w
-
x
->
x_gui
.
scale_offset_x
+
dx
;
newy
=
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_h
-
x
->
x_gui
.
scale_offset_y
+
dy
;
sh
->
h_dragx
=
dx
;
sh
->
h_dragy
=
dy
;
...
...
pd/src/g_scalar.c
View file @
4a68207b
...
...
@@ -139,6 +139,7 @@ int template_hasxy(t_template *template)
int
template_cancreate
(
t_template
*
template
)
{
//return 1;
int
i
,
type
,
nitems
=
template
->
t_n
;
t_dataslot
*
datatypes
=
template
->
t_vec
;
t_template
*
elemtemplate
;
...
...
@@ -175,6 +176,7 @@ t_scalar *scalar_new(t_glist *owner, t_symbol *templatesym)
}
if
(
!
template_cancreate
(
template
))
return
(
0
);
post
(
"ALLÔ"
);
x
=
(
t_scalar
*
)
getbytes
(
sizeof
(
t_scalar
)
+
(
template
->
t_n
-
1
)
*
sizeof
(
*
x
->
sc_vec
));
x
->
sc_gobj
.
g_pd
=
scalar_class
;
...
...
pd/src/g_toggle.c
View file @
4a68207b
...
...
@@ -538,7 +538,7 @@ static void toggle__motionhook(t_scalehandle *sh, t_floatarg f1, t_floatarg f2)
if
(
properties
)
{
int
new_w
=
x
->
x_gui
.
x_w
-
x
->
x_gui
.
scale_offset_x
+
sh
->
h_dragx
;
int
new_h
=
x
->
x_gui
.
x_h
-
x
->
x_gui
.
scale_offset_y
+
sh
->
h_dragy
;
//
int new_h = x->x_gui.x_h - x->x_gui.scale_offset_y + sh->h_dragy;
sys_vgui
(
".gfxstub%lx.dim.w_ent delete 0 end
\n
"
,
properties
);
sys_vgui
(
".gfxstub%lx.dim.w_ent insert 0 %d
\n
"
,
properties
,
new_w
);
//sys_vgui(".gfxstub%lx.dim.h_ent delete 0 end\n", properties);
...
...
@@ -549,12 +549,6 @@ static void toggle__motionhook(t_scalehandle *sh, t_floatarg f1, t_floatarg f2)
{
t_bng
*
x
=
(
t_bng
*
)(
sh
->
h_master
);
int
dx
=
(
int
)
f1
,
dy
=
(
int
)
f2
;
int
newx
,
newy
;
newx
=
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_w
-
x
->
x_gui
.
scale_offset_x
+
dx
;
newy
=
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_h
-
x
->
x_gui
.
scale_offset_y
+
dy
;
sh
->
h_dragx
=
dx
;
sh
->
h_dragy
=
dy
;
...
...
pd/src/g_vdial.c
View file @
4a68207b
...
...
@@ -155,8 +155,6 @@ void vradio_draw_move(t_vradio *x, t_glist *glist)
void
vradio_draw_erase
(
t_vradio
*
x
,
t_glist
*
glist
)
{
t_canvas
*
canvas
=
glist_getcanvas
(
glist
);
int
n
=
x
->
x_number
,
i
;
sys_vgui
(
".x%lx.c delete %lxVRDO
\n
"
,
canvas
,
x
);
sys_vgui
(
".x%lx.c dtag all %lxVRDO
\n
"
,
canvas
,
x
);
if
(
x
->
x_gui
.
x_fsf
.
x_selected
)
...
...
@@ -550,12 +548,6 @@ static void vradio__motionhook(t_scalehandle *sh,
{
t_bng
*
x
=
(
t_bng
*
)(
sh
->
h_master
);
int
dx
=
(
int
)
f1
,
dy
=
(
int
)
f2
;
int
newx
,
newy
;
newx
=
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_w
-
x
->
x_gui
.
scale_offset_x
+
dx
;
newy
=
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_h
-
x
->
x_gui
.
scale_offset_y
+
dy
;
sh
->
h_dragx
=
dx
;
sh
->
h_dragy
=
dy
;
...
...
pd/src/g_vslider.c
View file @
4a68207b
...
...
@@ -544,12 +544,6 @@ static void vslider__motionhook(t_scalehandle *sh,
{
t_bng
*
x
=
(
t_bng
*
)(
sh
->
h_master
);
int
dx
=
(
int
)
f1
,
dy
=
(
int
)
f2
;
int
newx
,
newy
;
newx
=
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_w
-
x
->
x_gui
.
scale_offset_x
+
dx
;
newy
=
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_h
-
x
->
x_gui
.
scale_offset_y
+
dy
;
sh
->
h_dragx
=
dx
;
sh
->
h_dragy
=
dy
;
...
...
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