termpty: move TERMPTY_WRITE_STR() to header

This commit is contained in:
Boris Faure 2021-11-02 23:27:29 +01:00
parent 0901c85da4
commit 4196fc944b
Signed by: borisfaure
GPG Key ID: 35C0410516166BE8
2 changed files with 5 additions and 5 deletions

View File

@ -281,7 +281,11 @@ void termpty_config_update(Termpty *ty, Config *config);
Termcell *termpty_cellrow_get(Termpty *ty, int y, ssize_t *wret);
Termcell * termpty_cell_get(Termpty *ty, int y_requested, int x_requested);
ssize_t termpty_row_length(Termpty *ty, int y);
#define TERMPTY_WRITE_STR(_S) \
termpty_write(ty, _S, strlen(_S))
void termpty_write(Termpty *ty, const char *input, int len);
void termpty_resize(Termpty *ty, int new_w, int new_h);
void termpty_resize_tabs(Termpty *ty, int old_w, int new_w);
void termpty_backscroll_adjust(Termpty *ty, int *scroll);

View File

@ -33,9 +33,6 @@
#define OSC 0x9d
#define DEL 0x7f
#define TERMPTY_WRITE_STR(_S) \
termpty_write(ty, _S, strlen(_S))
/* XXX: all handle_ functions return the number of bytes successfully read, 0
* if not enough bytes could be read
@ -1376,8 +1373,7 @@ _handle_esc_csi_dsr(Termpty *ty, Eina_Unicode *b)
{
/* DSR-OS (Operating Status)
* Reply Ok */
termpty_write(ty, "\033[0n",
strlen("\033[0n"));
TERMPTY_WRITE_STR("\033[0n");
}
break;
case 6: