Commit 86a04ab4 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

remove more unused variables, add a declaration to the header

parent 77f076cd
...@@ -356,6 +356,7 @@ EXTERN void binbuf_restore(t_binbuf *x, int argc, t_atom *argv); ...@@ -356,6 +356,7 @@ EXTERN void binbuf_restore(t_binbuf *x, int argc, t_atom *argv);
EXTERN void binbuf_print(t_binbuf *x); EXTERN void binbuf_print(t_binbuf *x);
EXTERN int binbuf_getnatom(t_binbuf *x); EXTERN int binbuf_getnatom(t_binbuf *x);
EXTERN t_atom *binbuf_getvec(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 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, EXTERN int binbuf_read(t_binbuf *b, char *filename, char *dirname,
int crflag); int crflag);
......
...@@ -246,7 +246,7 @@ static int text_nthline(int n, t_atom *vec, int line, int *startp, int *endp) ...@@ -246,7 +246,7 @@ static int text_nthline(int n, t_atom *vec, int line, int *startp, int *endp)
{ {
if (cnt == line) if (cnt == line)
{ {
int j = i, outc, k; int j = i;
while (j < n && vec[j].a_type != A_SEMI && while (j < n && vec[j].a_type != A_SEMI &&
vec[j].a_type != A_COMMA) vec[j].a_type != A_COMMA)
j++; j++;
...@@ -343,7 +343,6 @@ static void text_define_frompointer(t_text_define *x, t_gpointer *gp, ...@@ -343,7 +343,6 @@ static void text_define_frompointer(t_text_define *x, t_gpointer *gp,
gp, s, "text_frompointer"); gp, s, "text_frompointer");
if (b) if (b)
{ {
t_gstub *gs = gp->gp_stub;
binbuf_clear(x->x_textbuf.b_binbuf); binbuf_clear(x->x_textbuf.b_binbuf);
binbuf_add(x->x_textbuf.b_binbuf, binbuf_getnatom(b), binbuf_getvec(b)); 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) ...@@ -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) static void text_tolist_bang(t_text_tolist *x)
{ {
t_binbuf *b = text_client_getbuf(x), *b2; t_binbuf *b = text_client_getbuf(x), *b2;
int n, i, cnt = 0;
t_atom *vec;
if (!b) if (!b)
return; return;
b2 = binbuf_new(); b2 = binbuf_new();
...@@ -1036,10 +1033,9 @@ static void text_search_list(t_text_search *x, ...@@ -1036,10 +1033,9 @@ static void text_search_list(t_text_search *x,
t_symbol *s, int argc, t_atom *argv) t_symbol *s, int argc, t_atom *argv)
{ {
t_binbuf *b = text_client_getbuf(&x->x_tc); 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; nkeys = x->x_nkeys, failed = 0;
t_atom *vec; t_atom *vec;
t_key *kp = x->x_keyvec;
if (!b) if (!b)
return; return;
if (argc < nkeys) if (argc < nkeys)
...@@ -1191,10 +1187,10 @@ static void text_search_list(t_text_search *x, ...@@ -1191,10 +1187,10 @@ static void text_search_list(t_text_search *x,
} }
goto nomatch; /* a tie - keep the old one */ goto nomatch; /* a tie - keep the old one */
replace: replace:
bestline = lineno, beststart = thisstart, bestn = thisn; bestline = lineno, beststart = thisstart;
} }
/* no previous match so we're best */ /* no previous match so we're best */
else bestline = lineno, beststart = thisstart, bestn = thisn; else bestline = lineno, beststart = thisstart;
nomatch: nomatch:
lineno++; lineno++;
thisstart = i+1; thisstart = i+1;
...@@ -1302,7 +1298,7 @@ static void *text_sequence_new(t_symbol *s, int argc, t_atom *argv) ...@@ -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) 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; int n, i, onset, nfield, wait, eatsemi = 1, gotcomma = 0;
t_atom *vec, *outvec, *ap; t_atom *vec, *outvec, *ap;
if (!b) if (!b)
...@@ -1505,7 +1501,7 @@ static void text_sequence_step(t_text_sequence *x) ...@@ -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) 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; int n, start, end;
t_atom *vec; t_atom *vec;
if (!b) if (!b)
...@@ -1856,7 +1852,7 @@ static void *textfile_new( void) ...@@ -1856,7 +1852,7 @@ static void *textfile_new( void)
static void textfile_bang(t_qlist *x) static void textfile_bang(t_qlist *x)
{ {
int argc = binbuf_getnatom(x->x_binbuf), 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 *argv = binbuf_getvec(x->x_binbuf);
t_atom *ap = argv + onset, *ap2; t_atom *ap = argv + onset, *ap2;
while (onset < argc && while (onset < argc &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment