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
Aayush
purr-data
Commits
c9b5d5e3
Commit
c9b5d5e3
authored
Aug 01, 2014
by
Mathieu L Bouchard
Browse files
remove unused vars
parent
e0531214
Changes
3
Hide whitespace changes
Inline
Side-by-side
pd/src/g_all_guis.h
View file @
c9b5d5e3
...
...
@@ -179,8 +179,6 @@ typedef struct _scalehandle
int
h_dragy
;
}
t_scalehandle
;
static
t_class
*
scalehandle_class
;
typedef
struct
_iemgui
{
t_object
x_obj
;
...
...
pd/src/g_array.c
View file @
c9b5d5e3
...
...
@@ -46,7 +46,6 @@ t_array *array_new(t_symbol *templatesym, t_gpointer *parent)
{
t_array
*
x
=
(
t_array
*
)
getbytes
(
sizeof
(
*
x
));
t_template
*
template
;
t_gpointer
*
gp
;
template
=
template_findbyname
(
templatesym
);
x
->
a_templatesym
=
templatesym
;
x
->
a_n
=
1
;
...
...
@@ -70,7 +69,6 @@ void array_resize(t_array *x, int n)
{
//fprintf(stderr,"array_resize\n");
int
elemsize
,
oldn
;
t_gpointer
*
gp
;
t_template
*
template
=
template_findbyname
(
x
->
a_templatesym
);
if
(
n
<
1
)
n
=
1
;
...
...
@@ -192,12 +190,8 @@ to save and create arrays this might get called more directly. */
static
t_garray
*
graph_scalar
(
t_glist
*
gl
,
t_symbol
*
s
,
t_symbol
*
templatesym
,
t_symbol
*
fill
,
t_symbol
*
outline
,
int
saveit
)
{
int
i
,
zz
;
t_garray
*
x
;
t_pd
*
x2
;
t_template
*
template
;
char
*
str
;
t_gpointer
gp
;
if
(
!
(
template
=
template_findbyname
(
templatesym
)))
return
(
0
);
x
=
(
t_garray
*
)
pd_new
(
garray_class
);
...
...
@@ -223,7 +217,7 @@ static t_garray *graph_scalar(t_glist *gl, t_symbol *s, t_symbol *templatesym,
/* get a garray's "array" structure. */
t_array
*
garray_getarray
(
t_garray
*
x
)
{
int
nwords
,
zonset
,
ztype
;
int
zonset
,
ztype
;
t_symbol
*
zarraytype
;
t_scalar
*
sc
=
x
->
x_scalar
;
t_symbol
*
templatesym
=
sc
->
sc_template
;
...
...
@@ -324,15 +318,13 @@ t_garray *graph_array(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
else
fill
=
gensym
(
"black"
);
if
(
argc
)
outline
=
atom_getsymbolarg
(
0
,
argc
--
,
argv
++
);
else
outline
=
gensym
(
"black"
);
int
n
=
fsize
,
i
,
zz
,
nwords
,
zonset
,
ztype
,
saveit
,
joc
;
int
n
=
fsize
,
zonset
,
ztype
,
saveit
;
t_symbol
*
zarraytype
;
t_garray
*
x
;
t_pd
*
x2
;
t_template
*
template
,
*
ztemplate
;
t_symbol
*
templatesym
;
char
*
str
;
int
flags
=
fflags
;
t_gpointer
gp
;
int
filestyle
=
((
flags
&
6
)
>>
1
);
//fprintf(stderr,"filestyle = %d\n", filestyle);
int
style
=
(
filestyle
==
0
?
PLOTSTYLE_POINTS
:
...
...
@@ -422,7 +414,6 @@ void garray_properties(t_garray *x, t_glist *canvas)
{
char
cmdbuf
[
200
];
t_array
*
a
=
garray_getarray
(
x
);
t_scalar
*
sc
=
x
->
x_scalar
;
if
(
!
a
)
return
;
gfxstub_deleteforkey
(
x
);
...
...
@@ -539,8 +530,6 @@ void garray_arraydialog(t_garray *x, t_symbol *s, int argc, t_atom *argv)
gensym("style"), x->x_scalar->sc_vec, 1);*/
int
size
;
int
styleonset
,
styletype
;
t_symbol
*
stylearraytype
;
t_symbol
*
argname
=
sharptodollar
(
name
);
t_array
*
a
=
garray_getarray
(
x
);
t_template
*
scalartemplate
;
...
...
@@ -613,10 +602,9 @@ void garray_arraydialog(t_garray *x, t_symbol *s, int argc, t_atom *argv)
/* jsarlo { */
void
garray_arrayviewlist_new
(
t_garray
*
x
)
{
int
i
,
xonset
=
0
,
yonset
=
0
,
type
=
0
,
elemsize
=
0
;
int
i
,
type
=
0
,
elemsize
=
0
;
t_float
yval
;
char
cmdbuf
[
200
];
t_symbol
*
arraytype
;
t_array
*
a
=
garray_getarray_floatonly
(
x
,
&
yonset
,
&
elemsize
);
if
(
!
a
)
...
...
@@ -647,10 +635,8 @@ void garray_arrayviewlist_fillpage(t_garray *x,
t_float
fTopItem
)
{
//fprintf(stderr,"garray_fillpage\n");
int
i
,
xonset
=
0
,
yonset
=
0
,
type
=
0
,
elemsize
=
0
,
topItem
;
int
i
,
yonset
=
0
,
elemsize
=
0
,
topItem
;
t_float
yval
;
char
cmdbuf
[
200
];
t_symbol
*
arraytype
;
t_array
*
a
=
garray_getarray_floatonly
(
x
,
&
yonset
,
&
elemsize
);
topItem
=
(
int
)
fTopItem
;
...
...
@@ -776,7 +762,7 @@ static t_word *array_motion_wp;
static
t_template
*
array_motion_template
;
static
int
array_motion_npoints
;
static
int
array_motion_elemsize
;
static
int
array_motion_altkey
;
//
static int array_motion_altkey;
static
t_float
array_motion_initx
;
static
t_float
array_motion_xperpix
;
static
t_float
array_motion_yperpix
;
...
...
@@ -1210,7 +1196,7 @@ static void array_getrect(t_array *array, t_glist *glist,
else
incr
=
array
->
a_n
/
300
;
for
(
i
=
0
;
i
<
array
->
a_n
;
i
+=
incr
)
{
t_float
pxpix1
,
pxpix2
,
pypix
,
pwpix
,
dx
,
dy
;
t_float
pxpix1
,
pxpix2
,
pypix
,
pwpix
;
array_getcoordinate
(
glist
,
(
char
*
)(
array
->
a_vec
)
+
i
*
elemsize
,
xonset
,
yonset
,
wonset
,
i
,
0
,
0
,
1
,
...
...
@@ -1302,7 +1288,7 @@ static int garray_click(t_gobj *z, t_glist *glist,
static
void
garray_save
(
t_gobj
*
z
,
t_binbuf
*
b
)
{
int
style
,
filestyle
;
int
filestyle
;
t_garray
*
x
=
(
t_garray
*
)
z
;
t_array
*
array
=
garray_getarray
(
x
);
t_template
*
scalartemplate
;
...
...
@@ -1452,7 +1438,7 @@ char *garray_vec(t_garray *x) /* get the contents */
int
garray_getfloatwords
(
t_garray
*
x
,
int
*
size
,
t_word
**
vec
)
{
int
yonset
,
type
,
elemsize
;
int
yonset
,
elemsize
;
t_array
*
a
=
garray_getarray_floatonly
(
x
,
&
yonset
,
&
elemsize
);
if
(
!
a
)
{
...
...
@@ -1587,7 +1573,7 @@ static void garray_cosinesum(t_garray *x, t_symbol *s, int argc, t_atom *argv)
static
void
garray_normalize
(
t_garray
*
x
,
t_float
f
)
{
int
type
,
npoints
,
i
;
int
i
;
double
maxv
,
renormer
;
int
yonset
,
elemsize
;
t_array
*
array
=
garray_getarray_floatonly
(
x
,
&
yonset
,
&
elemsize
);
...
...
@@ -1791,7 +1777,6 @@ int garray_ambigendian(void)
void
garray_resize
(
t_garray
*
x
,
t_floatarg
f
)
{
t_array
*
array
=
garray_getarray
(
x
);
t_glist
*
gl
=
x
->
x_glist
;
int
n
=
(
f
<
1
?
1
:
f
);
garray_fittograph
(
x
,
n
);
/*template_getfloat(
template_findbyname(x->x_scalar->sc_template),
...
...
pd/src/g_graph.c
View file @
c9b5d5e3
...
...
@@ -248,7 +248,7 @@ void glist_delete(t_glist *x, t_gobj *y)
/* remove every object from a glist. Experimental. */
void
glist_clear
(
t_glist
*
x
)
{
t_gobj
*
y
,
*
y2
;
t_gobj
*
y
;
int
dspstate
=
0
,
suspended
=
0
;
t_symbol
*
dspsym
=
gensym
(
"dsp"
);
while
(
y
=
x
->
gl_list
)
...
...
@@ -269,7 +269,6 @@ void glist_clear(t_glist *x)
void
glist_retext
(
t_glist
*
glist
,
t_text
*
y
)
{
t_canvas
*
c
=
glist_getcanvas
(
glist
);
/* check that we have built rtexts yet. LATER need a better test. */
if
(
glist
->
gl_editor
&&
glist
->
gl_editor
->
e_rtext
)
{
...
...
@@ -922,7 +921,6 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis)
t_float
f
;
t_gobj
*
g
;
t_symbol
*
arrayname
;
t_garray
*
ga
;
/* draw a rectangle around the graph */
/*sys_vgui(".x%lx.c create polyline %d %d %d %d %d %d %d %d %d %d "
"-stroke $pd_colors(graph_border) -tags {%sR %s graph}\n",
...
...
@@ -1167,15 +1165,12 @@ static void graph_getrect(t_gobj *z, t_glist *glist,
int
*
xp1
,
int
*
yp1
,
int
*
xp2
,
int
*
yp2
)
{
int
x1
=
0x7fffffff
,
y1
=
0x7fffffff
,
x2
=
-
0x7fffffff
,
y2
=
-
0x7fffffff
;
int
tx1
=
0x7fffffff
,
ty1
=
0x7fffffff
,
tx2
=
-
0x7fffffff
,
ty2
=
-
0x7fffffff
;
t_glist
*
x
=
(
t_glist
*
)
z
;
//fprintf(stderr,"graph_getrect %d\n", x->gl_isgraph);
if
(
x
->
gl_isgraph
)
{
int
hadwindow
;
t_gobj
*
g
;
t_text
*
ob
;
int
x21
,
y21
,
x22
,
y22
;
graph_graphrect
(
z
,
glist
,
&
x1
,
&
y1
,
&
x2
,
&
y2
);
...
...
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