[PATCH] menu.c cleanups

Various minor changes to remove spurious differences between QW/NQ menu.c
files. Just whitespace changes and a few const and static keywords added.

diff -urN -X exclude a/NQ/menu.c head/NQ/menu.c
--- a/NQ/menu.c	2006-06-03 18:15:08.000000000 +0930
+++ head/NQ/menu.c	2006-06-03 18:05:10.000000000 +0930
@@ -98,7 +98,6 @@
 
 static qboolean m_recursiveDraw;
 static qboolean m_entersound;	// play after drawing a frame, so caching
-
 				// won't disrupt the sound
 
 qboolean m_return_onerror;
@@ -147,7 +146,7 @@
     }
 }
 
-void
+static void
 M_DrawTransPic(int x, int y, const qpic_t *pic)
 {
     Draw_TransPic(x + ((vid.width - 320) >> 1), y, pic);
@@ -284,7 +283,7 @@
 
 static int m_main_cursor;
 
-#define	MAIN_ITEMS	5
+#define MAIN_ITEMS 5
 
 static void
 M_Menu_Main_f(void)
@@ -1528,9 +1527,9 @@
 //=============================================================================
 /* HELP MENU */
 
-static int help_page;
+#define NUM_HELP_PAGES 6
 
-#define	NUM_HELP_PAGES	6
+static int help_page;
 
 static void
 M_Menu_Help_f(void)
@@ -1577,11 +1576,11 @@
 //=============================================================================
 /* QUIT MENU */
 
-int msgNumber;
-int m_quit_prevstate;
-qboolean wasInMenus;
+static int msgNumber;
+static int m_quit_prevstate;
+static qboolean wasInMenus;
 
-const char *const quitMessage[] = {
+static const char *const quitMessage[] = {
     "  Are you gonna quit    ",
     "  this game just like   ",
     "   everything else?     ",
diff -urN -X exclude a/NQ/menu.h head/NQ/menu.h
--- a/NQ/menu.h	2004-08-06 11:25:54.000000000 +0930
+++ head/NQ/menu.h	2006-06-03 14:32:34.000000000 +0930
@@ -44,7 +44,6 @@
 void M_Menu_Quit_f(void);
 
 void M_DrawPic(int x, int y, const qpic_t *pic);
-void M_DrawTransPic(int x, int y, const qpic_t *pic);
 void M_DrawCharacter(int cx, int line, int num);
 void M_DrawTextBox(int x, int y, int width, int lines);
 void M_Print(int cx, int cy, const char *str);
diff -urN -X exclude a/QW/client/menu.c head/QW/client/menu.c
--- a/QW/client/menu.c	2006-06-03 18:15:08.000000000 +0930
+++ head/QW/client/menu.c	2006-06-03 18:05:31.000000000 +0930
@@ -72,7 +72,6 @@
 
 static qboolean m_recursiveDraw;
 static qboolean m_entersound;	// play after drawing a frame, so caching
-
 				// won't disrupt the sound
 
 #define StartingGame	(m_multiplayer_cursor == 1)
@@ -119,7 +118,7 @@
 }
 
 static void
-M_DrawTransPic(int x, int y, qpic_t *pic)
+M_DrawTransPic(int x, int y, const qpic_t *pic)
 {
     Draw_TransPic(x + ((vid.width - 320) >> 1), y, pic);
 }
@@ -218,10 +217,9 @@
 
 static int m_main_cursor;
 
-#define	MAIN_ITEMS 5
-
+#define MAIN_ITEMS 5
 
-void
+static void
 M_Menu_Main_f(void)
 {
     if (key_dest != key_menu) {
@@ -645,7 +643,7 @@
 }
 
 static void
-M_UnbindCommand(const char *command)
+M_UnbindCommand(const char *const command)
 {
     int j;
     int l;
@@ -722,7 +720,7 @@
 	if (k == K_ESCAPE) {
 	    bind_grab = false;
 	} else if (k != '`') {
-	    sprintf(cmd, "bind %s \"%s\"\n", Key_KeynumToString(k),
+	    sprintf(cmd, "bind \"%s\" \"%s\"\n", Key_KeynumToString(k),
 		    bindnames[keys_cursor][0]);
 	    Cbuf_InsertText(cmd);
 	}
@@ -796,7 +794,7 @@
 //=============================================================================
 /* HELP MENU */
 
-#define	NUM_HELP_PAGES 6
+#define NUM_HELP_PAGES 6
 
 static int help_page;
 
@@ -811,7 +809,6 @@
 }
 
 
-
 static void
 M_Help_Draw(void)
 {
@@ -851,7 +848,7 @@
 static int m_quit_prevstate;
 static qboolean wasInMenus;
 
-static char *quitMessage[] = {
+static const char *const quitMessage[] = {
     "  Are you gonna quit    ",
     "  this game just like   ",
     "   everything else?     ",
@@ -937,6 +934,25 @@
 
 }
 
+
+static void
+M_Quit_Draw(void)
+{
+    if (wasInMenus) {
+	m_state = m_quit_prevstate;
+	m_recursiveDraw = true;
+	M_Draw();
+	m_state = m_quit;
+    }
+
+    M_DrawTextBox(56, 76, 24, 4);
+    M_Print(64, 84, quitMessage[msgNumber * 4 + 0]);
+    M_Print(64, 92, quitMessage[msgNumber * 4 + 1]);
+    M_Print(64, 100, quitMessage[msgNumber * 4 + 2]);
+    M_Print(64, 108, quitMessage[msgNumber * 4 + 3]);
+}
+
+
 static void
 M_Menu_SinglePlayer_f(void)
 {
@@ -1001,24 +1017,6 @@
 	m_state = m_main;
 }
 
-static void
-M_Quit_Draw(void)
-{
-    if (wasInMenus) {
-	m_state = m_quit_prevstate;
-	m_recursiveDraw = true;
-	M_Draw();
-	m_state = m_quit;
-    }
-
-    M_DrawTextBox(56, 76, 24, 4);
-    M_Print(64, 84, quitMessage[msgNumber * 4 + 0]);
-    M_Print(64, 92, quitMessage[msgNumber * 4 + 1]);
-    M_Print(64, 100, quitMessage[msgNumber * 4 + 2]);
-    M_Print(64, 108, quitMessage[msgNumber * 4 + 3]);
-}
-
-
 //=============================================================================
 /* Menu Subsystem */
 
