[Tux4kids-tuxtype-dev] GSoC 2013 : questions about Tuxtype source code

Jerome Portal jerome.portal.2 at gmail.com
Thu Apr 11 20:08:26 UTC 2013


Hello world !

I wish to work with Tux4kids during GSoC 2013, maybe on a TuxType project,
so I navigated through its source code.

I tried to do some modifications ; I saw a patch someone did previous years
ago on the language files (translation of "fifty" is "FÜNFZIG", not
"FÜNZIG"), but it seems it has never been merged, here is the diff :

---
 data/themes/deutsch/words/lang7-8-mit.txt   |    1 +
 data/themes/deutsch/words/mittel4-6-mit.txt |    1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/data/themes/deutsch/words/lang7-8-mit.txt
b/data/themes/deutsch/words/lang7-8-mit.txt
index 02ac150..9d9ec32 100644
--- a/data/themes/deutsch/words/lang7-8-mit.txt
+++ b/data/themes/deutsch/words/lang7-8-mit.txt
@@ -7,4 +7,5 @@ LÄCHELN
 MÄDCHEN
 SCHÜLER
 ÜBERALL
+FÜNFZIG
 FRÜHLING
diff --git a/data/themes/deutsch/words/mittel4-6-mit.txt
b/data/themes/deutsch/words/mittel4-6-mit.txt
index 72f66aa..d6b0eae 100644
--- a/data/themes/deutsch/words/mittel4-6-mit.txt
+++ b/data/themes/deutsch/words/mittel4-6-mit.txt
@@ -32,7 +32,6 @@ SÜDEN
 ZÜGEL
 ZWÖLF
 BRÜCKE
-FÜNZIG
 HEIßEN
 KÖRPER
 LÖFFEL
-- 



I also have several questions about some FIXME comments.

=> about macros in globals.h:
// FIXME if we really need these, make them into functions rather than
// "evil" macros
#define to_upper(c) (((c) >= 'a' && (c) <= 'z') ? (c) -32 : (c))
#define COL2RGB( col ) SDL_MapRGB( screen->format, col->r, col->g, col->b )
#define MIN(x,y) ((x) < (y) ? (x) : (y))
#define MAX(x,y) ((x) > (y) ? (x) : (y))

I checked the source code, and:
- to_upper() and MAX() are unused
- COL2RGB() is only used 2 times
- MIN() is only used 4 times, and is #define'd again in input_methods.c

Could I add a Color2RGB() function in SDL_extras.c/.h, and a min() function
somewhere else and then submit the patch to you ?



=> about the exit() calls:
exit(0);/* FIXME may need to cleanup memory and exit more cleanly */
exit(0); /* FIXME does memory get cleaned up properly if we do this? */

Modern operating systems free the memory once a program exited, if it
didn't. But it's a feature of the OS and it seems freeing memory shouldn't
rely on that ; and unless it's certain the program will run on that kind of
OS, it's a bad habit to do that for reusability of the code, etc etc ....
So I assume a FreeMemory() function could be created ?

Thanks for reading !

Regards,
Jerome
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/tux4kids-tuxtype-dev/attachments/20130411/a3393ba5/attachment.html>


More information about the Tux4kids-tuxtype-dev mailing list