From 7055df2fedee4a1b5fc0303fadfe315b5ffeffa4 Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Wed, 5 Sep 2012 15:27:54 -0400 Subject: scope reductions --- menus.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'menus.c') diff --git a/menus.c b/menus.c index 8d45e33..cf3aabb 100644 --- a/menus.c +++ b/menus.c @@ -1083,7 +1083,6 @@ static void Menu_Move_Pointer(int move_amount) static void Display_Number_on_LCD(int Is_Item_Visible,int LCD_row,int LCD_col,char *start_string,int Show_What, int significant_digits, int width_of_column) { gchar *units = NULL; - int show_plus_sign; int channel; char LCD_string[LCD_cols+1]; @@ -1092,6 +1091,8 @@ static void Display_Number_on_LCD(int Is_Item_Visible,int LCD_row,int LCD_col,ch channel=Show_What%100; if (Show_What!=Show_No_Number) { + int show_plus_sign; + switch (Show_What-channel) { case Show_frequency: Submenu_Value=globals.ChannelState[channel].frequency; @@ -1242,14 +1243,8 @@ static void Display_Number_on_LCD(int Is_Item_Visible,int LCD_row,int LCD_col,ch static void Submenu_Display(int redraw) { gchar *title = NULL; - char mode_name[Submenu_maximum_entries][LCD_col_width+1]; int i; - int j; int channel; - int current_operating_mode; - int add_spaces; - - current_operating_mode=0; // FIXME - check for redundant clearing if ( (globals.MenuStatus.Type_Of_Menu != Submenu_On) || @@ -1664,6 +1659,9 @@ static void Submenu_Display(int redraw) LCD_write(3,0,Press_Change_Message); if (Submenu_max_entry>0) { + char mode_name[Submenu_maximum_entries][LCD_col_width+1]; + int current_operating_mode = 0; + LCD_write(0,19,"Mode:"); for (i=0; i<=Submenu_max_entry; ++i) { @@ -2063,7 +2061,10 @@ static void Submenu_Display(int redraw) } for (i=base_entry; ( (i<=Submenu_max_entry) && (i< (base_entry+4)) ); ++i) { + int add_spaces, j; + add_spaces=LCD_col_width-strlen(mode_name[i]); + for (j=0; j