Archived
1
0
Fork 0

docs for strbuf and some small changes.

This commit is contained in:
H Hautakoski 2010-08-06 11:31:04 +02:00 committed by Henrik Hautakoski
parent d6537b235c
commit f1dbd880a7
6 changed files with 79 additions and 6 deletions

View file

@ -6,7 +6,7 @@
void print_strbuf(strbuf_t *s) {
assert(s->len = strlen(s->buf));
assert(s->len == strlen(s->buf));
printf("block: %i, len: %i |%s|\n", s->alloc_size, s->len, s->buf);
}
@ -41,6 +41,14 @@ int main() {
strbuf_rev(&b);
print_strbuf(&b);
strbuf_reduce(&b, 6);
print_strbuf(&b);
strbuf_reduce(&b, 95);
print_strbuf(&b);
str = strbuf_release(&b);