billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=4196fc944bd888f5f7e34e9dd66f04018fb79f25
commit 4196fc944bd888f5f7e34e9dd66f04018fb79f25 Author: Boris Faure <bill...@gmail.com> Date: Tue Nov 2 23:27:29 2021 +0100 termpty: move TERMPTY_WRITE_STR() to header --- src/bin/termpty.h | 4 ++++ src/bin/termptyesc.c | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bin/termpty.h b/src/bin/termpty.h index afc7a17..31ba5e8 100644 --- a/src/bin/termpty.h +++ b/src/bin/termpty.h @@ -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); diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c index d8d6750..67c183e 100644 --- a/src/bin/termptyesc.c +++ b/src/bin/termptyesc.c @@ -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: --