diff src/video/fbcon/SDL_fbevents.c @ 91:e85e03f195b4

From: "Markus F.X.J. Oberhumer" Subject: SDL CVS patches below you will find some small patches against the current SDL CVS. It adresses these things: 1) Use "&" instead of "%" in some cases. For negative signed integers (x % 8) is not always (x & 7), and the compiler can produce slightly faster code when using "&" here. 2) Some const issues.
author Sam Lantinga <slouken@lokigames.com>
date Sat, 07 Jul 2001 20:20:17 +0000
parents 280ff3af2ecc
children a746656b7599
line wrap: on
line diff
--- a/src/video/fbcon/SDL_fbevents.c	Sat Jul 07 08:08:42 2001 +0000
+++ b/src/video/fbcon/SDL_fbevents.c	Sat Jul 07 20:20:17 2001 +0000
@@ -247,8 +247,8 @@
 {
 	/* Open only if not already opened */
  	if ( keyboard_fd < 0 ) {
-		char *tty0[] = { "/dev/tty0", "/dev/vc/0", NULL };
-		char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL };
+		static const char * const tty0[] = { "/dev/tty0", "/dev/vc/0", NULL };
+		static const char * const vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL };
 		int i, tty0_fd;
 
 		/* Try to query for a free virtual terminal */
@@ -524,7 +524,7 @@
 
 	if ( mousedev == NULL ) {
 		/* FIXME someday... allow multiple mice in this driver */
-		char *ps2mice[] = {
+		static const char * const ps2mice[] = {
 		    "/dev/input/mice", "/dev/usbmouse", "/dev/psaux", NULL
 		};
 		/* First try to use GPM in repeater mode */