Commit 6019fde4 authored by Alexei Podtelezhnikov's avatar Alexei Podtelezhnikov
Browse files

[ftstring, ftview] Small clean-ups,

* src/ftstring.c (event_lcdmode_change): Robustify the switch.
* src/ftview.c (write_header): Ditto.
parent 4afb3021
2015-11-25 Alexei Podtelezhnikov <apodtele@gmail.com>
[ftstring, ftview] Small clean-ups,
* src/ftstring.c (event_lcdmode_change): Robustify the switch.
* src/ftview.c (write_header): Ditto.
2015-11-25 Werner Lemberg <wl@gnu.org>
* src/ftstring.c: Fix compilation warnings.
......
......@@ -196,18 +196,13 @@
static void
event_lcdmode_change( void )
{
const char *lcd_mode = NULL;
const char *lcd_mode;
handle->lcd_mode++;
switch ( handle->lcd_mode )
{
case N_LCD_MODES:
handle->lcd_mode = 0;
case LCD_MODE_AA:
lcd_mode = " normal AA";
break;
case LCD_MODE_LIGHT:
lcd_mode = " light AA";
break;
......@@ -223,6 +218,9 @@
case LCD_MODE_VBGR:
lcd_mode = " LCD (vert. BGR)";
break;
default:
handle->lcd_mode = 0;
lcd_mode = " normal AA";
}
sprintf( status.header_buffer, "mode changed to %s", lcd_mode );
......
......@@ -1670,14 +1670,11 @@
if ( handle->antialias )
{
const char* lcd_mode = NULL;
const char* lcd_mode;
switch ( handle->lcd_mode )
{
case LCD_MODE_AA:
lcd_mode = " normal AA";
break;
case LCD_MODE_LIGHT:
lcd_mode = " light AA";
break;
......@@ -1693,6 +1690,9 @@
case LCD_MODE_VBGR:
lcd_mode = " LCD (vert. BGR)";
break;
default:
handle->lcd_mode = 0;
lcd_mode = " normal AA";
}
grWriteCellString( display->bitmap, 0, (line++) * HEADER_HEIGHT,
lcd_mode, display->fore_color );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment