/* DCS terminator (ST) received. */ int input_dcs_dispatch(struct input_ctx *ictx) { const char prefix[] = "tmux;"; const u_int prefix_len = (sizeof prefix) - 1; u_char *p; if (ictx->flags & INPUT_DISCARD) return (0); log_debug("%s: \"%s\"", __func__, ictx->input_buf); /* Check for tmux prefix. */ if (ictx->input_len >= prefix_len && strncmp(ictx->input_buf, prefix, prefix_len) == 0) { screen_write_rawstring(&ictx->ctx, ictx->input_buf + prefix_len, ictx->input_len - prefix_len); } for (p = ictx->input_buf; p != ictx->input_buf + ictx->input_len; p++) { if ((*p >= 0 && *p <= 9) || *p == ';') continue; if (*p != 'q') break; screen_write_sixel(&ictx->ctx, ictx->input_buf, ictx->input_len); } return (0); }
/* DCS terminator (ST) received. */ int input_dcs_dispatch(struct input_ctx *ictx) { const char prefix[] = "tmux;"; const u_int prefix_len = (sizeof prefix) - 1; if (ictx->flags & INPUT_DISCARD) return (0); log_debug("%s: \"%s\"", __func__, ictx->input_buf); /* Check for tmux prefix. */ if (ictx->input_len >= prefix_len && strncmp(ictx->input_buf, prefix, prefix_len) == 0) { screen_write_rawstring(&ictx->ctx, ictx->input_buf + prefix_len, ictx->input_len - prefix_len); } return (0); }