summaryrefslogtreecommitdiffstats
path: root/usr.sbin/vidcontrol
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-12-11 21:02:33 +0000
committered <ed@FreeBSD.org>2011-12-11 21:02:33 +0000
commit787a58ca19dc176fe21f669cd503d9a890e5ee8b (patch)
tree27b72615901f413c17fe0dd617cd048832b072e7 /usr.sbin/vidcontrol
parent75ddaeae802cb467ed6abb2bd33cdb33dfd34068 (diff)
downloadFreeBSD-src-787a58ca19dc176fe21f669cd503d9a890e5ee8b.zip
FreeBSD-src-787a58ca19dc176fe21f669cd503d9a890e5ee8b.tar.gz
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.
Diffstat (limited to 'usr.sbin/vidcontrol')
-rw-r--r--usr.sbin/vidcontrol/vidcontrol.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/usr.sbin/vidcontrol/vidcontrol.c b/usr.sbin/vidcontrol/vidcontrol.c
index 48580f1..0069b4a 100644
--- a/usr.sbin/vidcontrol/vidcontrol.c
+++ b/usr.sbin/vidcontrol/vidcontrol.c
@@ -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;
/*
OpenPOWER on IntegriCloud