sfree(flags);
static void cc_check(termline *line){    unsigned char *flags;    int i, j;    assert(line->size >= line->cols);    flags = snewn(line->size, unsigned char);    for (i = 0; i < line->size; i++)	flags[i] = (i < line->cols);    for (i = 0; i < line->cols; i++) {	j = i;	while (line->chars[j].cc_next) {	    j += line->chars[j].cc_next;	    assert(j >= line->cols && j < line->size);	    assert(!flags[j]);	    flags[j] = TRUE;	}    }    j = line->cc_free;    if (j) {	while (1) {	    assert(j >= line->cols && j < line->size);	    assert(!flags[j]);	    flags[j] = TRUE;	    if (line->chars[j].cc_next)		j += line->chars[j].cc_next;	    else		break;	}    }    j = 0;    for (i = 0; i < line->size; i++)	j += (flags[i] != 0);    assert(j == line->size);}