Added screen_delete_line routine

This commit is contained in:
lucic71 2022-06-28 19:40:51 +03:00
parent 2bdb05a01a
commit 4721ec22a5
2 changed files with 26 additions and 0 deletions

View File

@ -32,4 +32,14 @@ size_t screen_write(char *buf, size_t len);
void screen_delete(void);
/*
* screen_delete_line:
* Deletes current line and updates the position of the cursor. The cursor
* will be placed at the beginning of the current line after this routine
* ends.
*
*/
void screen_delete_line(void);
#endif

View File

@ -82,3 +82,19 @@ void screen_delete(void) {
}
/*
* screen_delete_line:
* -------------------
*
* Repeat screen_delete until the whole line is deleted.
*
*/
void screen_delete_line(void) {
while (screen_column)
screen_delete();
}