+bufferc(struct termp *p, char c)
+{
+
+ if (p->col + 1 >= p->maxcols)
+ adjbuf(p, p->col + 1);
+
+ p->buf[(int)p->col++] = c;
+}
+
+
+static void
+encode(struct termp *p, const char *word, size_t sz)
+{
+ enum termfont f;
+ int i;
+
+ /*
+ * Encode and buffer a string of characters. If the current
+ * font mode is unset, buffer directly, else encode then buffer
+ * character by character.
+ */
+
+ if (TERMFONT_NONE == (f = term_fonttop(p))) {
+ buffera(p, word, sz);
+ return;
+ }
+
+ for (i = 0; i < (int)sz; i++) {
+ if ( ! isgraph((u_char)word[i])) {
+ bufferc(p, word[i]);
+ continue;
+ }
+
+ if (TERMFONT_UNDER == f)
+ bufferc(p, '_');
+ else
+ bufferc(p, word[i]);
+
+ bufferc(p, 8);
+ bufferc(p, word[i]);
+ }
+}
+
+
+size_t
+term_vspan(const struct roffsu *su)