strbuf.c: move declarations that are not declared at the beginning of a scope block
This commit is contained in:
parent
362b845030
commit
c558135c63
1 changed files with 4 additions and 5 deletions
|
|
@ -161,20 +161,19 @@ void strbuf_rev(strbuf_t *s) {
|
|||
|
||||
void strbuf_squeeze(strbuf_t *s, char ch) {
|
||||
|
||||
size_t p;
|
||||
size_t p, np, of;
|
||||
|
||||
for(p=s->len; p; p--) {
|
||||
|
||||
if (s->buf[p-1] != ch)
|
||||
continue;
|
||||
|
||||
size_t np = p, of = 0;
|
||||
|
||||
for(; np-1 && s->buf[np-2] == ch; np--)
|
||||
np = p;
|
||||
|
||||
for(of = 0; np-1 && s->buf[np-2] == ch; np--)
|
||||
of++;
|
||||
|
||||
if (of) {
|
||||
|
||||
p = np;
|
||||
for(s->len -= of; np <= s->len; np++)
|
||||
s->buf[np] = s->buf[np + of];
|
||||
|
|
|
|||
Reference in a new issue