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
Jonathan Wilkes
purr-data
Commits
4a606afe
Commit
4a606afe
authored
Feb 17, 2018
by
Jonathan Wilkes
Browse files
remove more unused variables, add a declaration to the header
parent
0e86ff14
Changes
2
Hide whitespace changes
Inline
Side-by-side
pd/src/m_pd.h
View file @
4a606afe
...
...
@@ -356,6 +356,7 @@ EXTERN void binbuf_restore(t_binbuf *x, int argc, t_atom *argv);
EXTERN
void
binbuf_print
(
t_binbuf
*
x
);
EXTERN
int
binbuf_getnatom
(
t_binbuf
*
x
);
EXTERN
t_atom
*
binbuf_getvec
(
t_binbuf
*
x
);
EXTERN
int
binbuf_resize
(
t_binbuf
*
x
,
int
newsize
);
EXTERN
void
binbuf_eval
(
t_binbuf
*
x
,
t_pd
*
target
,
int
argc
,
t_atom
*
argv
);
EXTERN
int
binbuf_read
(
t_binbuf
*
b
,
char
*
filename
,
char
*
dirname
,
int
crflag
);
...
...
pd/src/x_text.c
View file @
4a606afe
...
...
@@ -246,7 +246,7 @@ static int text_nthline(int n, t_atom *vec, int line, int *startp, int *endp)
{
if
(
cnt
==
line
)
{
int
j
=
i
,
outc
,
k
;
int
j
=
i
;
while
(
j
<
n
&&
vec
[
j
].
a_type
!=
A_SEMI
&&
vec
[
j
].
a_type
!=
A_COMMA
)
j
++
;
...
...
@@ -343,7 +343,6 @@ static void text_define_frompointer(t_text_define *x, t_gpointer *gp,
gp
,
s
,
"text_frompointer"
);
if
(
b
)
{
t_gstub
*
gs
=
gp
->
gp_stub
;
binbuf_clear
(
x
->
x_textbuf
.
b_binbuf
);
binbuf_add
(
x
->
x_textbuf
.
b_binbuf
,
binbuf_getnatom
(
b
),
binbuf_getvec
(
b
));
}
...
...
@@ -914,8 +913,6 @@ static void *text_tolist_new(t_symbol *s, int argc, t_atom *argv)
static
void
text_tolist_bang
(
t_text_tolist
*
x
)
{
t_binbuf
*
b
=
text_client_getbuf
(
x
),
*
b2
;
int
n
,
i
,
cnt
=
0
;
t_atom
*
vec
;
if
(
!
b
)
return
;
b2
=
binbuf_new
();
...
...
@@ -1036,10 +1033,9 @@ static void text_search_list(t_text_search *x,
t_symbol
*
s
,
int
argc
,
t_atom
*
argv
)
{
t_binbuf
*
b
=
text_client_getbuf
(
&
x
->
x_tc
);
int
i
,
j
,
n
,
lineno
,
bestline
=
-
1
,
beststart
=-
1
,
bestn
,
thisstart
,
thisn
,
int
i
,
n
,
lineno
,
bestline
=
-
1
,
beststart
=-
1
,
thisstart
,
nkeys
=
x
->
x_nkeys
,
failed
=
0
;
t_atom
*
vec
;
t_key
*
kp
=
x
->
x_keyvec
;
if
(
!
b
)
return
;
if
(
argc
<
nkeys
)
...
...
@@ -1191,10 +1187,10 @@ static void text_search_list(t_text_search *x,
}
goto
nomatch
;
/* a tie - keep the old one */
replace:
bestline
=
lineno
,
beststart
=
thisstart
,
bestn
=
thisn
;
bestline
=
lineno
,
beststart
=
thisstart
;
}
/* no previous match so we're best */
else
bestline
=
lineno
,
beststart
=
thisstart
,
bestn
=
thisn
;
else
bestline
=
lineno
,
beststart
=
thisstart
;
nomatch:
lineno
++
;
thisstart
=
i
+
1
;
...
...
@@ -1302,7 +1298,7 @@ static void *text_sequence_new(t_symbol *s, int argc, t_atom *argv)
static
void
text_sequence_doit
(
t_text_sequence
*
x
,
int
argc
,
t_atom
*
argv
)
{
t_binbuf
*
b
=
text_client_getbuf
(
&
x
->
x_tc
)
,
*
b2
;
t_binbuf
*
b
=
text_client_getbuf
(
&
x
->
x_tc
);
int
n
,
i
,
onset
,
nfield
,
wait
,
eatsemi
=
1
,
gotcomma
=
0
;
t_atom
*
vec
,
*
outvec
,
*
ap
;
if
(
!
b
)
...
...
@@ -1505,7 +1501,7 @@ static void text_sequence_step(t_text_sequence *x)
static
void
text_sequence_line
(
t_text_sequence
*
x
,
t_floatarg
f
)
{
t_binbuf
*
b
=
text_client_getbuf
(
&
x
->
x_tc
)
,
*
b2
;
t_binbuf
*
b
=
text_client_getbuf
(
&
x
->
x_tc
);
int
n
,
start
,
end
;
t_atom
*
vec
;
if
(
!
b
)
...
...
@@ -1856,7 +1852,7 @@ static void *textfile_new( void)
static
void
textfile_bang
(
t_qlist
*
x
)
{
int
argc
=
binbuf_getnatom
(
x
->
x_binbuf
),
count
,
onset
=
x
->
x_onset
,
onset2
;
onset
=
x
->
x_onset
,
onset2
;
t_atom
*
argv
=
binbuf_getvec
(
x
->
x_binbuf
);
t_atom
*
ap
=
argv
+
onset
,
*
ap2
;
while
(
onset
<
argc
&&
...
...
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