s390/tty3270: split up tty3270_convert_line()
authorSven Schnelle <svens@linux.ibm.com>
Mon, 28 Nov 2022 18:55:57 +0000 (19:55 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 9 Jan 2023 13:33:59 +0000 (14:33 +0100)
commit1fefd62fee50d4455ef5ebf65e22b282d773ed7d
tree4b30780dffb0ef87298e76110bdd4522a7e0105a
parentcbb36313bdb696cfe0874406327b24b403c9e8e0
s390/tty3270: split up tty3270_convert_line()

To make the code easier to read, split up tty3270_convertline()
into several subfunctions:

- tty3270_resize_line() to realloc the line if it doesn't have enough
  space left
- tty3270_required_length() to calculate how much space we need
- tty3270_add_attributes() to add the color and highlight attributes
- tty3270_add_reset_attributes() to reset the attributes at the end of
  the line

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Tested-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/char/con3270.c