tex_word_t tex_dom_free_word(tex_word_t pword) { int i; if (!pword) return 0; for (i = 0; i < pword->u; i++) tex_dom_free_char(pword->chars[i]); xfree(pword->chars); xfree(pword); return 0; }
tex_buffer_t tex_dom_free_buffer(tex_buffer_t pbuf) { int line, col; if (!pbuf) return 0; for (line = 0; line < pbuf->lines; line++) { if (!pbuf->buf[line]) continue; for (col = 0; col < pbuf->cols; col++) tex_dom_free_char(pbuf->buf[line][col]); xfree(pbuf->buf[line]); } xfree(pbuf->buf); xfree(pbuf); return 0; }