From b9719673a17618654b09bf9631e0ab65cf0d9def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 14 Jul 2020 09:29:10 +0200 Subject: [PATCH] term: rename term_formfeed() -> term_carriage_return() --- csi.c | 3 +++ sixel.c | 2 +- terminal.c | 2 +- terminal.h | 2 +- vt.c | 5 +++-- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/csi.c b/csi.c index 3141a79f..d8356e7f 100644 --- a/csi.c +++ b/csi.c @@ -729,6 +729,9 @@ csi_dispatch(struct terminal *term, uint8_t final) break; case 20: /* Automatic Newline Mode - LNM */ + /* TODO: would be easy to implemented; when active + * term_linefeed() would _also_ do a + * term_carriage_return() */ LOG_WARN("unimplemented: automatic newline mode (LNM)"); break; } diff --git a/sixel.c b/sixel.c index 6072c967..7d4b3d38 100644 --- a/sixel.c +++ b/sixel.c @@ -469,7 +469,7 @@ sixel_unhook(struct terminal *term) for (size_t i = 0; i < image.rows; i++) term_linefeed(term); - term_formfeed(term); + term_carriage_return(term); render_refresh(term); sixel_insert(term, image); diff --git a/terminal.c b/terminal.c index 1ed042bf..071c5cf9 100644 --- a/terminal.c +++ b/terminal.c @@ -1878,7 +1878,7 @@ term_scroll_reverse(struct terminal *term, int rows) } void -term_formfeed(struct terminal *term) +term_carriage_return(struct terminal *term) { term_cursor_left(term, term->grid->cursor.point.col); } diff --git a/terminal.h b/terminal.h index 1193a680..4d1cceff 100644 --- a/terminal.h +++ b/terminal.h @@ -506,7 +506,7 @@ void term_scroll_partial( void term_scroll_reverse_partial( struct terminal *term, struct scroll_region region, int rows); -void term_formfeed(struct terminal *term); +void term_carriage_return(struct terminal *term); void term_linefeed(struct terminal *term); void term_reverse_index(struct terminal *term); diff --git a/vt.c b/vt.c index cd240ddb..1254d28b 100644 --- a/vt.c +++ b/vt.c @@ -157,7 +157,7 @@ action_execute(struct terminal *term, uint8_t c) case '\r': /* CR - carriage ret */ - term_formfeed(term); + term_carriage_return(term); break; case '\x0e': @@ -180,6 +180,7 @@ action_execute(struct terminal *term, uint8_t c) * UTF-8 mode_. Which would be the normal mode of operation * these days. And since we _only_ support UTF-8... */ + #if 0 case '\x84': /* IND -> ESC D */ case '\x85': /* NEL -> ESC E */ @@ -360,7 +361,7 @@ action_esc_dispatch(struct terminal *term, uint8_t final) break; case 'E': - term_formfeed(term); + term_carriage_return(term); term_linefeed(term); break;