-
- /* Run conv_run using the new buffer */
- c->buf[c->count] = c->c.dest_start = c->c.dest = buf;
- c->c.dest_end = buf + c->request;
- if (!(conv_run(&c->c) & CONV_SOURCE_END))
- {
-
- /* Buffer is too small, continue with a new one */
- c->size[c->count++] = c->request;
- c->sum += c->request;
- c->request <<= 1; /* This can be freely changed */
- return 1;
- }
-
- /* We have used only one buffer for the conversion, no merges are needed */
- if (!c->count)
- return 0;
-
- /* We can merge everything to the current buffer ... */
- uns s = c->c.dest - c->c.dest_start;
- if (c->sum + s <= c->request)