char* translate(char *target) { rd_set(rd, target); printf("Binding `wr` for %d bytes.\n", rd->buf.len); wr_alloc(&wr, rd->buf.len); if(!setjmp(stackFrame)) { parse(rd); } return wr_extract(&wr); }
void *wr_skip(struct list_head *writes, struct rpc_write **wr_io, unsigned int n) { struct rpc_write *wr = *wr_io; void *buf; if (n > wr_free_space(wr)) { wr = wr_alloc(n); if (!wr) return NULL; list_add_tail(&wr->node, writes); *wr_io = wr; } buf = wr->buf + wr->len; wr->len += n; return buf; }