From: Tormod Volden Date: Thu, 3 Nov 2016 23:19:47 +0000 (+0100) Subject: vt.c: VT_WIDTH (framebuffer stride) and VT_HEIGHT (obsolete) cleanup X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=d9741df1b68210d0d7c751da28eb7a437d80b1e4;p=FUZIX.git vt.c: VT_WIDTH (framebuffer stride) and VT_HEIGHT (obsolete) cleanup VT_WIDTH is the framebuffer stride / pitch for the CONFIG_VT_SIMPLE case and not the screen width. VT_HEIGHT is not needed since it is always VT_BOTTOM + 1. Signed-off-by: Tormod Volden --- diff --git a/Kernel/PORTING b/Kernel/PORTING index 318b0305..271ef00b 100644 --- a/Kernel/PORTING +++ b/Kernel/PORTING @@ -82,7 +82,10 @@ Porting Fuzix to a new Z80 based machine generally requires the following that uses your map_process/map_kernel functions. CONFIG_VT - VT_WIDTH, VT_HEIGHT, VT_RIGHT, VT_BOTTOM + VT_RIGHT, VT_BOTTOM + + CONFIG_VT_SIMPLE + VT_WIDTH (framebuffer stride) Include a standard virtual terminal core based upon VT52 emulation diff --git a/Kernel/vt.c b/Kernel/vt.c index 6f98d040..534681ad 100644 --- a/Kernel/vt.c +++ b/Kernel/vt.c @@ -160,7 +160,7 @@ static int escout(unsigned char c) return 0; } if (c == 'E') { - clear_lines(0, VT_HEIGHT); + clear_lines(0, VT_BOTTOM + 1); return 0; } if (c == 'H') { @@ -298,7 +298,7 @@ int vt_ioctl(uint8_t minor, uarg_t request, char *data) return 0; #endif case VTSIZE: - return VT_HEIGHT << 8 | VT_WIDTH; + return (VT_BOTTOM + 1) << 8 | (VT_RIGHT + 1); case VTATTRS: return vtattr_cap; } @@ -341,7 +341,7 @@ int vt_inproc(uint8_t minor, unsigned char c) void vtinit(void) { vtmode = 0; - clear_lines(0, VT_HEIGHT); + clear_lines(0, VT_BOTTOM + 1); cursor_on(0, 0); }