+
+ /*
+ * If most of a short string is ASCII control characters, reformat the
+ * string to show those in up-arrow format. For longer strings, it's
+ * more likely that the characters are just binary coding.
+ *
+ * If we're formatting termcap, just use the shorter format (up-arrows).
+ */
+ if (octals != 0 && (!tic_format || (bufp - (4 * octals)) < MIN_TC_FIXUPS)) {
+ while (--octals >= 0) {
+ char *p = buffer + fixups[octals].offset;
+ *p++ = '^';
+ *p++ = (char) ((fixups[octals].ch == 127)
+ ? '?'
+ : (fixups[octals].ch + (int) '@'));
+ while ((p[0] = p[2]) != 0) {
+ ++p;
+ }
+ }
+ }
+ DEBUG_THIS(("... %s", _nc_visbuf(buffer)));