A new user interface for you! Read more...

File kobo-deluxe-compile-errors-fix.patch of Package kobo-deluxe

diff -Naur KoboDeluxe-0.5.1/enemies.h KoboDeluxe-0.5.1-new//enemies.h
--- KoboDeluxe-0.5.1/enemies.h	2007-12-24 09:18:52.000000000 +0100
+++ KoboDeluxe-0.5.1-new//enemies.h	2011-03-13 22:48:06.281275588 +0100
@@ -72,7 +72,7 @@
 extern const enemy_kind cannon;
 extern const enemy_kind pipe1;
 extern const enemy_kind core;
-extern const enemy_kind pipe2;
+extern const enemy_kind apipe2; // pipe2 conflicts with symbol from unistd.h
 extern const enemy_kind rock;
 extern const enemy_kind ring;
 extern const enemy_kind enemy_m1;
@@ -430,7 +430,7 @@
 
 inline int _enemy::is_pipe()
 {
-	return ((_state != notuse) && ((ek == &pipe1) || (ek == &pipe2)));
+	return ((_state != notuse) && ((ek == &pipe1) || (ek == &apipe2)));
 }
 
 
diff -Naur KoboDeluxe-0.5.1/enemy.cpp KoboDeluxe-0.5.1-new//enemy.cpp
--- KoboDeluxe-0.5.1/enemy.cpp	2007-12-24 11:36:46.000000000 +0100
+++ KoboDeluxe-0.5.1-new//enemy.cpp	2011-03-13 22:48:39.300275590 +0100
@@ -755,10 +755,10 @@
 
 void _enemy::kill_core()
 {
-	enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
-	enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
-	enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
-	enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
+	enemies.make(&apipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
+	enemies.make(&apipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
+	enemies.make(&apipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
+	enemies.make(&apipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
 	enemies.make(&explosion4, CS2PIXEL(x), CS2PIXEL(y));
 	sound.g_base_core_explo(x, y);
 	release();
@@ -978,19 +978,19 @@
 	}
 	p ^= a;
 	if(p & U_MASK)
-		enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
+		enemies.make(&apipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 1);
 	if(p & R_MASK)
-		enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
+		enemies.make(&apipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 3);
 	if(p & D_MASK)
-		enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
+		enemies.make(&apipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 5);
 	if(p & L_MASK)
-		enemies.make(&pipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
+		enemies.make(&apipe2, CS2PIXEL(x), CS2PIXEL(y), 0, 0, 7);
 	manage.add_score(10);
 	release();
 }
 
 
-const enemy_kind pipe2 = {
+const enemy_kind apipe2 = {
 	0,
 	&_enemy::make_pipe2,
 	&_enemy::move_pipe2,
diff -Naur KoboDeluxe-0.5.1/graphics/window.cpp KoboDeluxe-0.5.1-new//graphics/window.cpp
--- KoboDeluxe-0.5.1/graphics/window.cpp	2007-12-14 10:13:24.000000000 +0100
+++ KoboDeluxe-0.5.1-new//graphics/window.cpp	2011-03-13 22:45:33.903275586 +0100
@@ -398,7 +398,7 @@
 		 */
 		if(token)
 		{
-			char *tok = strchr(txt, token);
+			const char *tok = strchr(txt, token);
 			if(tok)
 				tokpos = tok-txt;
 			else
diff -Naur KoboDeluxe-0.5.1/sound/a_wave.c KoboDeluxe-0.5.1-new//sound/a_wave.c
--- KoboDeluxe-0.5.1/sound/a_wave.c	2007-12-22 12:03:02.000000000 +0100
+++ KoboDeluxe-0.5.1-new//sound/a_wave.c	2011-03-14 22:39:45.533073966 +0100
@@ -793,13 +793,13 @@
 	/* Prepend path */
 	strncpy(buf, eel_path(), sizeof(buf));
 #ifdef WIN32
-	strncat(buf, "\\", sizeof(buf));
+	strncat(buf, "\\", sizeof(buf)-strlen(buf)-1);
 #elif defined MACOS
-	strncat(buf, ":", sizeof(buf));
+	strncat(buf, ":", sizeof(buf)-strlen(buf)-1);
 #else
-	strncat(buf, "/", sizeof(buf));
+	strncat(buf, "/", sizeof(buf)-strlen(buf)-1);
 #endif
-	strncat(buf, name, sizeof(buf));
+	strncat(buf, name, sizeof(buf)-strlen(buf)-1);
 
 	/* Check extension */
 	if(strstr(name, ".raw") || strstr(name, ".RAW"))
@@ -880,13 +880,13 @@
 	/* Prepend path */
 	strncpy(buf, eel_path(), sizeof(buf));
 #ifdef WIN32
-	strncat(buf, "\\", sizeof(buf));
+	strncat(buf, "\\", sizeof(buf)-strlen(buf)-1);
 #elif defined MACOS
-	strncat(buf, ":", sizeof(buf));
+	strncat(buf, ":", sizeof(buf)-strlen(buf)-1);
 #else
-	strncat(buf, "/", sizeof(buf));
+	strncat(buf, "/", sizeof(buf)-strlen(buf)-1);
 #endif
-	strncat(buf, name, sizeof(buf));
+	strncat(buf, name, sizeof(buf)-strlen(buf)-1);
 	log_printf(DLOG, "Saving to \"%s\"\n", buf);
 	/* Check extension */
 	if(strstr(name, ".raw") || strstr(name, ".RAW"))
diff -Naur KoboDeluxe-0.5.1/sound/a_wca.c KoboDeluxe-0.5.1-new//sound/a_wca.c
--- KoboDeluxe-0.5.1/sound/a_wca.c	2003-06-08 20:38:52.000000000 +0200
+++ KoboDeluxe-0.5.1-new//sound/a_wca.c	2011-03-14 22:40:31.288073964 +0100
@@ -141,7 +141,7 @@
 		*inr = w->data.f32[s*2+1] * 32768.0f;
 		break;
 	  case AF_MIDI:
-		*inr = *inl = *inr = 0;
+		*inr = *inl = 0;
 		break;
 	}
 }