[Tux4kids-commits] r293 - in tuxmath/trunk: data/images/sprites docs nsis src

dbruce-guest at alioth.debian.org dbruce-guest at alioth.debian.org
Tue Oct 9 22:14:53 UTC 2007


Author: dbruce-guest
Date: 2007-10-09 22:14:53 +0000 (Tue, 09 Oct 2007)
New Revision: 293

Modified:
   tuxmath/trunk/data/images/sprites/Makefile
   tuxmath/trunk/docs/changelog
   tuxmath/trunk/nsis/tuxmath.nsi
   tuxmath/trunk/nsis/tuxmath.nsi.in
   tuxmath/trunk/src/Makefile.am
   tuxmath/trunk/src/Makefile.in
   tuxmath/trunk/src/fileops.c
   tuxmath/trunk/src/game.c
   tuxmath/trunk/src/mathcards.c
   tuxmath/trunk/src/setup.c
   tuxmath/trunk/src/tuxmathrc.rc
Log:
BeOS compatibility


Modified: tuxmath/trunk/data/images/sprites/Makefile
===================================================================
--- tuxmath/trunk/data/images/sprites/Makefile	2007-10-09 19:34:10 UTC (rev 292)
+++ tuxmath/trunk/data/images/sprites/Makefile	2007-10-09 22:14:53 UTC (rev 293)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
 # data/images/sprites/Makefile.  Generated from Makefile.in by configure.
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,15 +13,11 @@
 # PARTICULAR PURPOSE.
 
 
-srcdir = .
-top_srcdir = ../../..
 
 pkgdatadir = $(datadir)/tuxmath
 pkglibdir = $(libdir)/tuxmath
 pkgincludedir = $(includedir)/tuxmath
-top_builddir = ../../..
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = /usr/bin/install -c
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -33,9 +29,9 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-build_triplet = i686-pc-linux-gnu
-host_triplet = i686-pc-linux-gnu
-target_triplet = i686-pc-linux-gnu
+build_triplet = i386-pc-linux-gnu
+host_triplet = i586-pc-mingw32msvc
+target_triplet = i586-pc-mingw32msvc
 subdir = data/images/sprites
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -49,21 +45,17 @@
 SOURCES =
 DIST_SOURCES =
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /home/tim/src/tux4kids/tuxmath/trunk/missing --run aclocal-1.9
-AMDEP_FALSE = #
-AMDEP_TRUE = 
-AMTAR = ${SHELL} /home/tim/src/tux4kids/tuxmath/trunk/missing --run tar
-AUTOCONF = ${SHELL} /home/tim/src/tux4kids/tuxmath/trunk/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/tim/src/tux4kids/tuxmath/trunk/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/tim/src/tux4kids/tuxmath/trunk/missing --run automake-1.9
-AWK = gawk
-BUILD_MINGW32_FALSE = 
-BUILD_MINGW32_TRUE = #
-CC = gcc
+ACLOCAL = ${SHELL} /home/dbruce/tux4kids/tuxmath/trunk/missing --run aclocal-1.10
+AMTAR = ${SHELL} /home/dbruce/tux4kids/tuxmath/trunk/missing --run tar
+AUTOCONF = ${SHELL} /home/dbruce/tux4kids/tuxmath/trunk/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/dbruce/tux4kids/tuxmath/trunk/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/dbruce/tux4kids/tuxmath/trunk/missing --run automake-1.10
+AWK = mawk
+CC = i586-mingw32msvc-gcc
 CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
-CPP = gcc -E
-CPPFLAGS = 
+CFLAGS = -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D__GW32__
+CPP = i586-mingw32msvc-gcc -E
+CPPFLAGS = -I/usr/local/cross-tools/i586-mingw32msvc/include -idirafter /usr/local/cross-tools/i586-mingw32msvc/include/glibc
 CYGPATH_W = echo
 DEFS = -DHAVE_CONFIG_H
 DEPDIR = .deps
@@ -71,26 +63,24 @@
 ECHO_N = -n
 ECHO_T = 
 EGREP = /bin/grep -E
-EXEEXT = 
+EXEEXT = .exe
 GREP = /bin/grep
+INSTALL = /usr/bin/install -c
 INSTALL_DATA = ${INSTALL} -m 644
 INSTALL_PROGRAM = ${INSTALL}
 INSTALL_SCRIPT = ${INSTALL}
-INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
-LDFLAGS = 
-LIBOBJS = 
-LIBS =  -L/usr/lib -lSDL -lSDL_image -lSDL_mixer -lSDL_ttf
-LTLIBOBJS = 
-MAKEINFO = ${SHELL} /home/tim/src/tux4kids/tuxmath/trunk/missing --run makeinfo
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LDFLAGS = -L/usr/local/cross-tools/i586-mingw32msvc/lib
+LIBOBJS =  ${LIBOBJDIR}strtod$U.o
+LIBS =  -lmingw32 -lSDLmain -L/usr/lib -lSDL -lSDL_image -lSDL_mixer -lSDL_ttf -lgw32c -luuid -lole32 -lwsock32 -mwindows
+LTLIBOBJS =  ${LIBOBJDIR}strtod$U.lo
+MAKEINFO = ${SHELL} /home/dbruce/tux4kids/tuxmath/trunk/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
 NAME_VERSION = tuxmath-1.5.5
-NSIS = no
-NSI_BUILD_FALSE = #
-NSI_BUILD_TRUE = 
-NSI_DLL_DIR = /home/tim/tuxmath_dll
+NSIS = /usr/bin/makensis
+NSI_DLL_DIR = /home/dbruce/tuxmath_dll
 NSI_INSTALL_DIR = mingw32
 NSI_TUXMATH_CONF_DIR = no
-NSI_USE_TUXMATH_CONF_FALSE = 
-NSI_USE_TUXMATH_CONF_TRUE = #
 OBJEXT = o
 PACKAGE = tuxmath
 PACKAGE_BUGREPORT = tuxmath-devel at lists.sourceforge.net
@@ -105,57 +95,63 @@
 SDL_CONFIG = /usr/bin/sdl-config
 SDL_LIBS = -L/usr/lib -lSDL
 SET_MAKE = 
-SHELL = /bin/bash
-STRIP = 
+SHELL = /bin/sh
+STRIP = i586-mingw32msvc-strip
 VERSION = 1.5.5
-WINDRES = 
-ac_ct_CC = gcc
-am__fastdepCC_FALSE = #
-am__fastdepCC_TRUE = 
+WINDRES = /usr/bin/i586-mingw32msvc-windres
+abs_builddir = /home/dbruce/tux4kids/tuxmath/trunk/data/images/sprites
+abs_srcdir = /home/dbruce/tux4kids/tuxmath/trunk/data/images/sprites
+abs_top_builddir = /home/dbruce/tux4kids/tuxmath/trunk
+abs_top_srcdir = /home/dbruce/tux4kids/tuxmath/trunk
+ac_ct_CC = 
 am__include = include
 am__leading_dot = .
 am__quote = 
 am__tar = ${AMTAR} chof - "$$tardir"
 am__untar = ${AMTAR} xf -
 bindir = ${exec_prefix}/bin
-build = i686-pc-linux-gnu
-build_alias = 
-build_cpu = i686
+build = i386-pc-linux-gnu
+build_alias = i386-linux
+build_cpu = i386
 build_os = linux-gnu
 build_vendor = pc
+builddir = .
 datadir = ${datarootdir}
 datarootdir = ${prefix}/share
 docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
 dvidir = ${docdir}
 exec_prefix = ${prefix}
-host = i686-pc-linux-gnu
-host_alias = 
-host_cpu = i686
-host_os = linux-gnu
+host = i586-pc-mingw32msvc
+host_alias = i586-mingw32msvc
+host_cpu = i586
+host_os = mingw32msvc
 host_vendor = pc
 htmldir = ${docdir}
 includedir = ${prefix}/include
 infodir = ${datarootdir}/info
-install_sh = /home/tim/src/tux4kids/tuxmath/trunk/install-sh
+install_sh = $(SHELL) /home/dbruce/tux4kids/tuxmath/trunk/install-sh
 libdir = ${exec_prefix}/lib
 libexecdir = ${exec_prefix}/libexec
 localedir = ${datarootdir}/locale
 localstatedir = ${prefix}/var
 mandir = ${datarootdir}/man
-mkdir_p = mkdir -p --
+mkdir_p = /bin/mkdir -p
 oldincludedir = /usr/include
 pdfdir = ${docdir}
-prefix = /usr/local
-program_transform_name = s,x,x,
+prefix = /usr/local/cross-tools/i586-mingw32msvc
+program_transform_name = s&^&i586-mingw32msvc-&
 psdir = ${docdir}
 sbindir = ${exec_prefix}/sbin
 sharedstatedir = ${prefix}/com
+srcdir = .
 sysconfdir = ${prefix}/etc
-target = i686-pc-linux-gnu
-target_alias = 
-target_cpu = i686
-target_os = linux-gnu
+target = i586-pc-mingw32msvc
+target_alias = i586-mingw32msvc
+target_cpu = i586
+target_os = mingw32msvc
 target_vendor = pc
+top_builddir = ../../..
+top_srcdir = ../../..
 EXTRA_DIST = cascade0.png	\
 	cascade10.png	\
 	cascade1.png	\
@@ -291,7 +287,6 @@
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-uninstall-info-am:
 tags: TAGS
 TAGS:
 
@@ -300,22 +295,21 @@
 
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
@@ -374,12 +368,20 @@
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
 install-exec-am:
 
+install-html: install-html-am
+
 install-info: install-info-am
 
 install-man:
 
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -398,16 +400,19 @@
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
+.MAKE: install-am install-strip
+
 .PHONY: all all-am check check-am clean clean-generic distclean \
 	distclean-generic distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
-	uninstall-info-am
+	mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

Modified: tuxmath/trunk/docs/changelog
===================================================================
--- tuxmath/trunk/docs/changelog	2007-10-09 19:34:10 UTC (rev 292)
+++ tuxmath/trunk/docs/changelog	2007-10-09 22:14:53 UTC (rev 293)
@@ -1,3 +1,8 @@
+2007.Oct.09 (svn.debian.org/tux4kids - revision 293)
+  Build:
+      * Merged in code to allow build under BeOS/Zeta 
+      Luc Schrijvers <Begasus at skynet.be> 
+
 2007.Oct.09 (svn.debian.org/tux4kids - revision 291)
   Docs:
       * Added license notice for Andika font to 

Modified: tuxmath/trunk/nsis/tuxmath.nsi
===================================================================
--- tuxmath/trunk/nsis/tuxmath.nsi	2007-10-09 19:34:10 UTC (rev 292)
+++ tuxmath/trunk/nsis/tuxmath.nsi	2007-10-09 22:14:53 UTC (rev 293)
@@ -72,7 +72,11 @@
 Section "Desktop Shortcut"
   SetShellVarContext all
   SetOutPath $INSTDIR
-  CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${APP_EXE}" "" "$INSTDIR\${APP_EXE}" 0  "" "" "Run Tux of Math Command"
+  CreateShortCut "$DESKTOP\${APP_NAME}.lnk" \
+                 "$INSTDIR\${APP_EXE}"  ""  \
+                 "$INSTDIR\data\images\tuxmath.ico" \
+                 0  "" ""  \ 
+                 "Run Tux of Math Command"
 SectionEnd
 
 ;Function .onInstSuccess

Modified: tuxmath/trunk/nsis/tuxmath.nsi.in
===================================================================
--- tuxmath/trunk/nsis/tuxmath.nsi.in	2007-10-09 19:34:10 UTC (rev 292)
+++ tuxmath/trunk/nsis/tuxmath.nsi.in	2007-10-09 22:14:53 UTC (rev 293)
@@ -72,7 +72,11 @@
 Section "Desktop Shortcut"
   SetShellVarContext all
   SetOutPath $INSTDIR
-  CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${APP_EXE}" "" "$INSTDIR\${APP_EXE}" 0  "" "" "Run Tux of Math Command"
+  CreateShortCut "$DESKTOP\${APP_NAME}.lnk" \
+                 "$INSTDIR\${APP_EXE}"  ""  \
+                 "$INSTDIR\data\images\tuxmath.ico" \
+                 0  "" ""  \ 
+                 "Run Tux of Math Command"
 SectionEnd
 
 ;Function .onInstSuccess

Modified: tuxmath/trunk/src/Makefile.am
===================================================================
--- tuxmath/trunk/src/Makefile.am	2007-10-09 19:34:10 UTC (rev 292)
+++ tuxmath/trunk/src/Makefile.am	2007-10-09 22:14:53 UTC (rev 293)
@@ -44,8 +44,6 @@
 		SDL_extras.h
 
 
-# SUBDIRS = po
-
 WINDRES=@WINDRES@
 
 if BUILD_MINGW32

Modified: tuxmath/trunk/src/Makefile.in
===================================================================
--- tuxmath/trunk/src/Makefile.in	2007-10-09 19:34:10 UTC (rev 292)
+++ tuxmath/trunk/src/Makefile.in	2007-10-09 22:14:53 UTC (rev 293)
@@ -143,8 +143,6 @@
 SHELL = @SHELL@
 STRIP = @STRIP@
 VERSION = @VERSION@
-
-# SUBDIRS = po
 WINDRES = @WINDRES@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@

Modified: tuxmath/trunk/src/fileops.c
===================================================================
--- tuxmath/trunk/src/fileops.c	2007-10-09 19:34:10 UTC (rev 292)
+++ tuxmath/trunk/src/fileops.c	2007-10-09 22:14:53 UTC (rev 293)
@@ -39,7 +39,120 @@
 #include "../config.h"
 #endif
 
+#ifdef OS_solaris
+#define DIRHANDLE dirp->d_fd
+#elif defined(OS_mingw)
 
+#else
+#define DIRHANDLE dirp->fd
+#endif
+
+#if defined(__BEOS__) || defined(OS_solaris) || defined(OS_mingw)
+/* The scandir() and alphasort() functions aren't available on BeOS, */
+/* so let's declare them here... */
+#ifndef OS_mingw
+#include <strings.h>
+#endif
+
+#undef DIRSIZ
+
+#define DIRSIZ(dp)                                          \
+        ((sizeof(struct dirent) - sizeof(dp)->d_name) +     \
+		(((dp)->d_reclen + 1 + 3) &~ 3))
+
+
+/*-----------------------------------------------------------------------*/
+/*
+  Alphabetic order comparison routine for those who want it.
+*/
+int alphasort(const void *d1, const void *d2)
+{
+  return(strcmp((*(struct dirent **)d1)->d_name, (*(struct dirent **)d2)->d_name));
+}
+
+/*-----------------------------------------------------------------------*/
+/*
+  Scan a directory for all its entries
+*/
+int scandir(const char *dirname, struct dirent ***namelist, int(*select) (const struct dirent *), int (*dcomp) (const void *, const void *))
+{
+  register struct dirent *d, *p, **names;
+  register size_t nitems;
+  struct stat stb;
+  unsigned long arraysz;
+  DIR *dirp;
+
+  if ((dirp = opendir(dirname)) == NULL)
+    return(-1);
+
+  if (fstat(DIRHANDLE, &stb) < 0)
+    return(-1);
+
+  /*
+   * estimate the array size by taking the size of the directory file
+   * and dividing it by a multiple of the minimum size entry.
+   */
+  arraysz = (stb.st_size / 24);
+
+  names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
+  if (names == NULL)
+    return(-1);
+
+  nitems = 0;
+
+  while ((d = readdir(dirp)) != NULL) {
+
+     if (select != NULL && !(*select)(d))
+       continue;       /* just selected names */
+
+     /*
+      * Make a minimum size copy of the data
+      */
+
+     p = (struct dirent *)malloc(DIRSIZ(d));
+     if (p == NULL)
+       return(-1);
+
+     p->d_ino = d->d_ino;
+     p->d_reclen = d->d_reclen;
+     /*p->d_namlen = d->d_namlen;*/
+     bcopy(d->d_name, p->d_name, p->d_reclen + 1);
+
+     /*
+      * Check to make sure the array has space left and
+      * realloc the maximum size.
+      */
+
+     if (++nitems >= arraysz) {
+
+       if (fstat(DIRHANDLE, &stb) < 0)
+         return(-1);     /* just might have grown */
+
+       arraysz = stb.st_size / 12;
+
+       names = (struct dirent **)realloc((char *)names, arraysz * sizeof(struct dirent *));
+       if (names == NULL)
+         return(-1);
+     }
+
+     names[nitems-1] = p;
+   }
+
+   closedir(dirp);
+
+   if (nitems && dcomp != NULL)
+     qsort(names, nitems, sizeof(struct dirent *), dcomp);
+
+   *namelist = names;
+
+   return(nitems);
+}
+
+
+#endif /* __BEOS__ */
+
+
+
 /* SDL includes: */
 #include <SDL.h>
 
@@ -2757,105 +2870,3 @@
 
 
 
-//  /* FIXME:Move file stuff into fileops.c.*/   
-//    /* Todo?: switch from readdir() to scandir() and use dynamic memory allocation? */   
-//    unsigned char lesson_path[PATH_MAX];             //Path to lesson directory   
-//    char* fgets_return_val;   
-//    unsigned char name_buf[NAME_BUF_SIZE];   
-//      
-//    DIR* lesson_dir = NULL;   
-//    struct dirent* lesson_file = NULL;   
-//    FILE* tempFile = NULL;   
-//      
-//    /* All pointers get explicitly set to NULL until used:*/   
-//    for (i = 0; i < MAX_LESSONS; i++)   
-//    {   
-//      titles[i] = NULL;   
-//      select[i] = NULL;   
-//    }   
-//      
-//      
-//  #ifdef TUXMATH_DEBUG  #ifdef TUXMATH_DEBUG
-//    fprintf(stderr, "Entering choose_config_file():\n");    fprintf(stderr, "Entering choose_config_file():\n");
-//  #endif  #endif
-//      
-//    /* find the directory containing the lesson files:  */   
-//    sprintf(lesson_path, "%s/missions/lessons", DATA_PREFIX);   
-//      
-//  #ifdef TUXMATH_DEBUG   
-//    fprintf(stderr, "lesson_path is: %s\n", lesson_path);   
-//  #endif   
-//      
-//    /* create a list of all the lesson files */   
-//    lesson_dir = opendir(lesson_path);   
-//      
-//    do   
-//    {   
-//      /* readdir() returns ptr to next file in dir AND resets ptr to following file: */   
-//      lesson_file = readdir(lesson_dir);   
-//     /* Get out when no more files: */   
-//     if (!lesson_file)   
-//      {   
-//        break;   
-//      }   
-//      
-//      /* file names must begin with 'lesson' (case-insensitive) */   
-//      if (0 != strncasecmp(&lesson_file->d_name, "lesson", 6))   
-//      {   
-//        continue;   
-//      }   
-//      
-//      /* FIXME Should somehow test each file to see if it is a tuxmath config file */   
-//      /* Put file name into array of names found in lesson directory */   
-//      sprintf(lesson_list[lessons].filename, "%s/%s", lesson_path, lesson_file->d_name);   
-//      
-//  #ifdef TUXMATH_DEBUG   
-//      fprintf(stderr, "Found lesson file %d:\t%s\n", lessons, lesson_list[lessons].filename);   
-//  #endif   
-//      
-//      /* load the name for the lesson from the file ... (1st line) */   
-//      tempFile = fopen(lesson_list[lessons].filename, "r");   
-//      
-//      if (tempFile==NULL)   
-//      {   
-//        /* By leaving the current iteration without incrementing 'lessons', */   
-//        /* the bad file name will get clobbered next time through: */   
-//        continue;   
-//      }   
-//      
-//      fgets_return_val = fgets(name_buf, NAME_BUF_SIZE, tempFile);   
-//      if (fgets_return_val == NULL) {   
-//        continue;   
-//      }   
-//      
-//      
-//      /* check to see if it has a \r at the end of it (dos format!) */   
-//      length = strlen(name_buf);   
-//      while (length>0 && (name_buf[length - 1] == '\r' || name_buf[length - 1] == '\n')) {   
-//        name_buf[length - 1] = '\0';   
-//        length--;   
-//      }   
-//      
-//      /* Go past leading '#', ';', or whitespace: */   
-//      /* NOTE getting i to the correct value on exit is the main goal of the loop */   
-//      for (  i = 0;   
-//            ((name_buf[i] == '#') ||   
-//            (name_buf[i] == ';') ||   
-//             isspace(name_buf[i])) &&   
-//             (i < NAME_BUF_SIZE);   
-//             i++  )   
-//     {   
-//        length--;   
-//      }   
-//      /* Now copy the rest of the first line into the list: */   
-//      /* Note that "length + 1" is needed so that the final \0 is copied! */   
-//      memmove(&lesson_list[lessons].display_name, &name_buf[i], length + 1);   
-//      lessons++;   
-//      fclose(tempFile);   
-//    } while (lessons < MAX_LESSONS);  // Loop will end when 'break' encountered   
-//   
-//    closedir(lesson_dir);   
-//      
-//    /* FIXME The lesson list does not necessarily come out in alphabetical order. */   
-//    /* Sort the list into proper order:           */   
-//    qsort(lesson_list, lessons, sizeof(struct lesson_entry), compare_lesson_entries);   */*/

Modified: tuxmath/trunk/src/game.c
===================================================================
--- tuxmath/trunk/src/game.c	2007-10-09 19:34:10 UTC (rev 292)
+++ tuxmath/trunk/src/game.c	2007-10-09 22:14:53 UTC (rev 293)
@@ -953,6 +953,7 @@
   }
 
   /* Demo mode! */
+  {
   static int demo_answer = 0;
   static int answer_digit = 0;
   static int picked_comet=-1;
@@ -1032,8 +1033,8 @@
   /* Count down counter: */
   demo_countdown--;
 }
+}
 
-
 void game_handle_answer(void)
 {
   int i, num, lowest, lowest_y;

Modified: tuxmath/trunk/src/mathcards.c
===================================================================
--- tuxmath/trunk/src/mathcards.c	2007-10-09 19:34:10 UTC (rev 292)
+++ tuxmath/trunk/src/mathcards.c	2007-10-09 22:14:53 UTC (rev 293)
@@ -482,6 +482,7 @@
   questions_pending--;
 
   /* add question to wrong_quests list: */
+  {
   MC_MathQuestion* ptr1;
   MC_MathQuestion* ptr2;
 
@@ -538,8 +539,8 @@
 
   return 1;
 }
+}
 
-
 /* Tells user interface if all questions have been answered correctly! */
 /* Requires that at list contained at least one question to start with */
 /* and that wrongly answered questions have been recycled.             */
@@ -2692,7 +2693,7 @@
     fprintf(fp, "\nprint_list(): list empty or pointer invalid\n");
     return;
   }
- 
+ {
   MC_MathQuestion* ptr = list;
   while (ptr)
   {
@@ -2700,9 +2701,9 @@
     ptr = ptr->next;
   }
 }
+}
 
 
-
 /* Don't need this much now that formula_string part of card struct:  */
 void print_node(FILE* fp, MC_MathQuestion* ptr)
 {

Modified: tuxmath/trunk/src/setup.c
===================================================================
--- tuxmath/trunk/src/setup.c	2007-10-09 19:34:10 UTC (rev 292)
+++ tuxmath/trunk/src/setup.c	2007-10-09 22:14:53 UTC (rev 293)
@@ -474,7 +474,7 @@
   }
   
   #endif
-
+{
   SDL_VideoInfo *videoInfo;
   Uint32 surfaceMode;
   videoInfo = SDL_GetVideoInfo();
@@ -523,9 +523,9 @@
 
   SDL_WM_SetCaption("Tux, of Math Command", "TuxMath");
 }
+}
 
 
-
 void load_data_files(void)
 {
   if (!load_image_data())

Modified: tuxmath/trunk/src/tuxmathrc.rc
===================================================================
--- tuxmath/trunk/src/tuxmathrc.rc	2007-10-09 19:34:10 UTC (rev 292)
+++ tuxmath/trunk/src/tuxmathrc.rc	2007-10-09 22:14:53 UTC (rev 293)
@@ -1,4 +1,2 @@
 #define TUXMATH_ICON                       104
 TUXMATH_ICON			ICON "../data/images/tuxmath.ico"
-#define TUXMATH_ICON                       104
-TUXMATH_ICON			ICON "../data/images/tuxmath.ico"




More information about the Tux4kids-commits mailing list