Author: ed
Date: Sun Dec 11 21:02:33 2011
New Revision: 228425
URL: http://svn.freebsd.org/changeset/base/228425

Log:
  Add static keywords to vidcontrol(1).
  
  While there, remove the false optimisation of the colors array. It seems
  that changing it to an array of pointers instead of a 16x16 array does
  not cause any increase in binary size at all.

Modified:
  head/usr.sbin/vidcontrol/vidcontrol.c

Modified: head/usr.sbin/vidcontrol/vidcontrol.c
==============================================================================
--- head/usr.sbin/vidcontrol/vidcontrol.c       Sun Dec 11 21:02:01 2011        
(r228424)
+++ head/usr.sbin/vidcontrol/vidcontrol.c       Sun Dec 11 21:02:33 2011        
(r228425)
@@ -63,7 +63,7 @@ static const char rcsid[] =
 /* Screen dump file format revision */
 #define DUMP_FMT_REV   1
 
-char   legal_colors[16][16] = {
+static const char *legal_colors[16] = {
        "black", "blue", "green", "cyan",
        "red", "magenta", "brown", "white",
        "grey", "lightblue", "lightgreen", "lightcyan",
@@ -78,18 +78,16 @@ struct {
        struct video_info       video_mode_info;
 } cur_info;
 
-int    hex = 0;
-int    number;
-int    vesa_cols;
-int    vesa_rows;
-int    font_height;
-int    colors_changed;
-int    video_mode_changed;
-int    normal_fore_color, normal_back_color;
-int    revers_fore_color, revers_back_color;
-char   letter;
-struct vid_info info;
-struct video_info new_mode_info;
+static int     hex = 0;
+static int     vesa_cols;
+static int     vesa_rows;
+static int     font_height;
+static int     colors_changed;
+static int     video_mode_changed;
+static int     normal_fore_color, normal_back_color;
+static int     revers_fore_color, revers_back_color;
+static struct  vid_info info;
+static struct  video_info new_mode_info;
 
 
 /*
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to