int last;
};
-static size_t display_mode_esc_sequence_len(const char *s)
+size_t display_mode_esc_sequence_len(const char *s)
{
const char *p = s;
if (*p++ != '\033')
w += n;
}
strbuf_setlen(&sb_dst, dst - sb_dst.buf);
- strbuf_attach(sb_src, strbuf_detach(&sb_dst, NULL),
- sb_dst.len, sb_dst.alloc);
+ strbuf_swap(sb_src, &sb_dst);
+ strbuf_release(&sb_dst);
}
int is_encoding_utf8(const char *name)