version 1.419, 2022/06/03 08:09:16 |
version 1.420, 2022/06/09 09:12:55 |
|
|
tty_force_cursor_colour(struct tty *tty, int c) |
tty_force_cursor_colour(struct tty *tty, int c) |
{ |
{ |
u_char r, g, b; |
u_char r, g, b; |
char s[13] = ""; |
char s[13]; |
|
|
if (c != -1) |
if (c != -1) |
c = colour_force_rgb(c); |
c = colour_force_rgb(c); |
|
|
void |
void |
tty_cmd_setselection(struct tty *tty, const struct tty_ctx *ctx) |
tty_cmd_setselection(struct tty *tty, const struct tty_ctx *ctx) |
{ |
{ |
tty_set_selection(tty, ctx->ptr, ctx->num); |
tty_set_selection(tty, ctx->ptr2, ctx->ptr, ctx->num); |
} |
} |
|
|
void |
void |
tty_set_selection(struct tty *tty, const char *buf, size_t len) |
tty_set_selection(struct tty *tty, const char *flags, const char *buf, |
|
size_t len) |
{ |
{ |
char *encoded; |
char *encoded; |
size_t size; |
size_t size; |
|
|
|
|
b64_ntop(buf, len, encoded, size); |
b64_ntop(buf, len, encoded, size); |
tty->flags |= TTY_NOBLOCK; |
tty->flags |= TTY_NOBLOCK; |
tty_putcode_ptr2(tty, TTYC_MS, "", encoded); |
tty_putcode_ptr2(tty, TTYC_MS, flags, encoded); |
|
|
free(encoded); |
free(encoded); |
} |
} |