[Tux4kids-commits] r563 - in tuxtype/people/holger/tuxtype/debian: . patches

holger at alioth.debian.org holger at alioth.debian.org
Sun Jul 6 17:49:31 UTC 2008


Author: holger
Date: 2008-07-06 17:49:30 +0000 (Sun, 06 Jul 2008)
New Revision: 563

Added:
   tuxtype/people/holger/tuxtype/debian/patches/120_fix-null-pointer.patch
   tuxtype/people/holger/tuxtype/debian/patches/130_fix_german_keyboard-lst.patch
Modified:
   tuxtype/people/holger/tuxtype/debian/changelog
   tuxtype/people/holger/tuxtype/debian/control
   tuxtype/people/holger/tuxtype/debian/patches/series
Log:
Uploaded as 1.5.17.dfsg1-3 to Debian sid:

* Include patches from Patrick Winnertz which prevent tuxtype from crashing
  if no wordlists are available and which fix the german keyboard
  definition. (Closes: #473618)
* Remove tuxtype-data conflict on older versions of tuxtype.



Modified: tuxtype/people/holger/tuxtype/debian/changelog
===================================================================
--- tuxtype/people/holger/tuxtype/debian/changelog	2008-07-06 15:12:17 UTC (rev 562)
+++ tuxtype/people/holger/tuxtype/debian/changelog	2008-07-06 17:49:30 UTC (rev 563)
@@ -1,3 +1,12 @@
+tuxtype (1.5.17.dfsg1-3) unstable; urgency=low
+
+  * Include patches from Patrick Winnertz which prevent tuxtype from crashing
+    if no wordlists are available and which fix the german keyboard
+    definition. (Closes: #473618)
+  * Remove tuxtype-data conflict on older versions of tuxtype.
+
+ -- Holger Levsen <holger at debian.org>  Sun, 06 Jul 2008 19:26:17 +0200
+
 tuxtype (1.5.17.dfsg1-2) unstable; urgency=low
 
   * Bump Standards-version to 3.8.0, no changes needed.

Modified: tuxtype/people/holger/tuxtype/debian/control
===================================================================
--- tuxtype/people/holger/tuxtype/debian/control	2008-07-06 15:12:17 UTC (rev 562)
+++ tuxtype/people/holger/tuxtype/debian/control	2008-07-06 17:49:30 UTC (rev 563)
@@ -26,7 +26,6 @@
 Package: tuxtype-data
 Architecture: all
 Recommends: tuxtype
-Conflicts: tuxtype (<${binary:Version})
 Description:  Data files for the Educational Typing Tutor Game Starring Tux
  This package contains graphics, sound, themes and wordlist files for tuxtype.
  .

Added: tuxtype/people/holger/tuxtype/debian/patches/120_fix-null-pointer.patch
===================================================================
--- tuxtype/people/holger/tuxtype/debian/patches/120_fix-null-pointer.patch	                        (rev 0)
+++ tuxtype/people/holger/tuxtype/debian/patches/120_fix-null-pointer.patch	2008-07-06 17:49:30 UTC (rev 563)
@@ -0,0 +1,153 @@
+diff -Nurwd orig/tuxtype-1.5.17.dfsg1/tuxtype/funcs.h tuxtype-1.5.17.dfsg1/tuxtype/funcs.h
+--- orig/tuxtype-1.5.17.dfsg1/tuxtype/funcs.h	2008-07-05 14:19:19.000000000 +0200
++++ tuxtype-1.5.17.dfsg1/tuxtype/funcs.h	2008-07-05 14:19:30.000000000 +0200
+@@ -119,4 +119,5 @@
+ /* In titlescreen.c: */
+ void SwitchScreenMode(void);
+ void TitleScreen(void);
++void error_occured(void);
+ 
+diff -Nurwd orig/tuxtype-1.5.17.dfsg1/tuxtype/laser.c tuxtype-1.5.17.dfsg1/tuxtype/laser.c
+--- orig/tuxtype-1.5.17.dfsg1/tuxtype/laser.c	2008-07-05 14:19:19.000000000 +0200
++++ tuxtype-1.5.17.dfsg1/tuxtype/laser.c	2008-07-05 14:19:30.000000000 +0200
+@@ -829,6 +829,11 @@
+           int i = 0;
+           comet_type* prev_comet = NULL;
+ 
++          /* Do nothing if word is a NULL pointer. This could happen for example if a char  *
++             in a word is not listed keyboard.lst of this specific language. It would imho  *
++             be nicer to get here a warning or a error and not a tux waiting for nothing.   *
++             This have to be fixed later.                                                   */
++          if (word != NULL) {
+           DEBUGCODE {fprintf(stderr, "word is: %S\tlength is: %d\n", word, (int)wcslen(word));}
+           do
+           { 
+@@ -865,11 +870,14 @@
+ 				DEBUGCODE {fprintf(stderr, "Assigning letter to comet: %C\n", word[i]);}
+ 			}
+ 		}
++		} else {
++			DEBUGCODE {fprintf(stderr, "word was pointer to NULL, showing error dialog\n");}
++			error_occured();
++		}
+ 	}
+ 	LOG ("Leaving laser_add_comet()\n");
+ }
+ 
+-
+ /* Draw numbers/symbols over the attacker: */
+ 
+ static void laser_draw_let(wchar_t c, int x, int y)
+diff -Nurwd orig/tuxtype-1.5.17.dfsg1/tuxtype/titlescreen.c tuxtype-1.5.17.dfsg1/tuxtype/titlescreen.c
+--- orig/tuxtype-1.5.17.dfsg1/tuxtype/titlescreen.c	2008-07-05 14:19:19.000000000 +0200
++++ tuxtype-1.5.17.dfsg1/tuxtype/titlescreen.c	2008-07-05 14:19:30.000000000 +0200
+@@ -867,6 +867,109 @@
+   settings.fullscreen = !settings.fullscreen;
+ }
+ 
++/*Derived from not_implemented: should only be shown if an error occurs somewhere */
++void error_occured(void)
++{
++	SDL_Surface* bk = NULL;
++	SDL_Surface *s1 = NULL, *s2 = NULL, *s3 = NULL, *s4 = NULL;
++	sprite* tux = NULL;
++	SDL_Rect loc;
++	int finished = 0, i;
++
++	LOG( "ErrorOccured() - creating text\n" );
++	/* if no font is set, use default ones */
++	if (!font) 
++		font = LoadFont(DEFAULT_MENU_FONT, MENU_FONT_SIZE);
++
++	s1 = BlackOutline( _("An error occured"), font, &white);
++	s2 = BlackOutline( _("This shouldn't happen, you'll found a bug"), font, &white);
++	s3 = BlackOutline( _("Please report this problem to"), font, &white);
++
++	/* we always want the URL in english */
++	/* NOTE: all fonts are almost certain to include glyphs for ASCII, */
++	/* so the following "english_font" hackery is probably unnecessary: */
++	if (!settings.use_english)
++	{
++		TTF_Font *english_font;
++		settings.use_english = 1;
++		english_font = LoadFont(DEFAULT_MENU_FONT, MENU_FONT_SIZE);
++		s4 = BlackOutline( "tux4kids-tuxtype-dev at lists.alioth.debian.org", english_font, &white);
++		TTF_CloseFont(english_font);
++		settings.use_english = 0;
++	}
++	else 
++		s4 = BlackOutline( "tux4kids-tuxtype-dev at lists.alioth.debian.org", font, &white);
++
++	tux = LoadSprite("tux/tux-egypt", IMG_ALPHA);
++	bk = LoadImage("main_bkg.png", IMG_REGULAR);
++
++	if (s1 && s2 && s3 && s4 && tux && bk)
++	{
++		LOG( "ErrorOccured() - drawing screen\n" );
++
++		SDL_BlitSurface(bk, NULL, screen, NULL);
++		loc.x = 320-(s1->w/2); loc.y = 10;
++		SDL_BlitSurface( s1, NULL, screen, &loc);
++		loc.x = 320-(s2->w/2); loc.y = 60;
++		SDL_BlitSurface( s2, NULL, screen, &loc);
++		loc.x = 320-(s3->w/2); loc.y = 400;
++		SDL_BlitSurface( s3, NULL, screen, &loc);
++		loc.x = 320-(s4->w/2); loc.y = 440;
++		SDL_BlitSurface( s4, NULL, screen, &loc);
++
++		loc.x = 320-(tux->frame[0]->w/2);
++		loc.y = 200;
++		loc.w = tux->frame[0]->w;
++		loc.h = tux->frame[0]->h;
++		SDL_BlitSurface( tux->frame[tux->cur], NULL, screen, &loc);
++
++		SDL_UpdateRect(screen, 0, 0, 0, 0);
++
++		i = 0;
++
++		while (!finished)
++		{
++			while (SDL_PollEvent(&event)) 
++			{
++				switch (event.type)
++				{
++					case SDL_QUIT:
++						exit(0);
++					case SDL_MOUSEBUTTONDOWN:
++					case SDL_KEYDOWN:
++						TitleScreen();
++						exit(0);
++				}
++			}
++
++			i++;
++
++			if (i %5 == 0)
++			{
++				NEXT_FRAME(tux);
++				SDL_BlitSurface(bk, &loc, screen, &loc);
++				SDL_BlitSurface(tux->frame[tux->cur], NULL, screen, &loc);
++				SDL_UpdateRect(screen, loc.x, loc.y, loc.w, loc.h);
++			}
++
++			SDL_Delay(40);
++		}
++	}
++	else
++		fprintf(stderr, "ErrorOccured() - could not load needed graphic\n");
++
++	SDL_FreeSurface(s1);
++	SDL_FreeSurface(s2);
++	SDL_FreeSurface(s3);
++	SDL_FreeSurface(s4);
++	SDL_FreeSurface(bk);
++	s1 = s2 = s3 = s4 = bk = NULL;
++	FreeSprite(tux);
++	tux = NULL;
++}
++
++
++
+ 
+ /************************************************************************/
+ /*                                                                      */ 

Added: tuxtype/people/holger/tuxtype/debian/patches/130_fix_german_keyboard-lst.patch
===================================================================
--- tuxtype/people/holger/tuxtype/debian/patches/130_fix_german_keyboard-lst.patch	                        (rev 0)
+++ tuxtype/people/holger/tuxtype/debian/patches/130_fix_german_keyboard-lst.patch	2008-07-06 17:49:30 UTC (rev 563)
@@ -0,0 +1,26 @@
+diff -Nurwd orig/tuxtype-1.5.17.dfsg1/tuxtype/data/themes/deutsch/keyboard.lst tuxtype-1.5.17.dfsg1/tuxtype/data/themes/deutsch/keyboard.lst
+--- orig/tuxtype-1.5.17.dfsg1/tuxtype/data/themes/deutsch/keyboard.lst	2008-07-05 14:19:19.000000000 +0200
++++ tuxtype-1.5.17.dfsg1/tuxtype/data/themes/deutsch/keyboard.lst	2008-07-05 14:26:36.000000000 +0200
+@@ -54,7 +54,7 @@
+ 5| 
+ 0|!
+ 0|@
+-0|#
++9|#
+ 0|1
+ 0|2
+ 0|3
+@@ -67,5 +67,12 @@
+ 0|0
+ 7|,
+ 8|.
+-9|;
++7|;
++8|:
++9|ö
++9|Ö
++9|ü
++9|Ü
++9|ä
++9|Ä
+ 9|ß

Modified: tuxtype/people/holger/tuxtype/debian/patches/series
===================================================================
--- tuxtype/people/holger/tuxtype/debian/patches/series	2008-07-06 15:12:17 UTC (rev 562)
+++ tuxtype/people/holger/tuxtype/debian/patches/series	2008-07-06 17:49:30 UTC (rev 563)
@@ -1,2 +1,4 @@
 110-ttf-sil-andika.patch
 100-nynorsk-words.patch
+120_fix-null-pointer.patch  
+130_fix_german_keyboard-lst.patch




More information about the Tux4kids-commits mailing list