Archived
1
0
Fork 0

strbuf.c: move declarations that are not declared at the beginning of a scope block

This commit is contained in:
Henrik Hautakoski 2010-11-15 19:20:53 +01:00
parent 362b845030
commit c558135c63

View file

@ -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];