expire_timer_context(term);
void term_free(Terminal *term){    termline *line;    struct beeptime *beep;    int i;    while ((line = delpos234(term->scrollback, 0)) != NULL)	sfree(line);		       /* compressed data, not a termline */    freetree234(term->scrollback);    while ((line = delpos234(term->screen, 0)) != NULL)	freeline(line);    freetree234(term->screen);    while ((line = delpos234(term->alt_screen, 0)) != NULL)	freeline(line);    freetree234(term->alt_screen);    if (term->disptext) {	for (i = 0; i < term->rows; i++)	    freeline(term->disptext[i]);    }    sfree(term->disptext);    while (term->beephead) {	beep = term->beephead;	term->beephead = beep->next;	sfree(beep);    }    bufchain_clear(&term->inbuf);    if(term->print_job)	printer_finish_job(term->print_job);    bufchain_clear(&term->printer_buf);    sfree(term->paste_buffer);    sfree(term->ltemp);    sfree(term->wcFrom);    sfree(term->wcTo);    for (i = 0; i < term->bidi_cache_size; i++) {	sfree(term->pre_bidi_cache[i].chars);	sfree(term->post_bidi_cache[i].chars);    }    sfree(term->pre_bidi_cache);    sfree(term->post_bidi_cache);    sfree(term);}