[Tux4kids-commits] r1506 - in tuxtype/trunk: doc src
Matthew Trey
treymd-guest at alioth.debian.org
Thu Sep 10 19:55:30 UTC 2009
Author: treymd-guest
Date: 2009-09-10 19:55:30 +0000 (Thu, 10 Sep 2009)
New Revision: 1506
Modified:
tuxtype/trunk/doc/AUTHORS
tuxtype/trunk/doc/ChangeLog
tuxtype/trunk/doc/INSTALL-Win32
tuxtype/trunk/src/scripting.c
Log:
Revised comment search code
Modified: tuxtype/trunk/doc/AUTHORS
===================================================================
--- tuxtype/trunk/doc/AUTHORS 2009-09-10 19:51:15 UTC (rev 1505)
+++ tuxtype/trunk/doc/AUTHORS 2009-09-10 19:55:30 UTC (rev 1506)
@@ -18,6 +18,7 @@
Vimal Ravi <vimal_ravi at rediff.com>
Prince K. Antony <prince.kantony at gmail.com>
Mobin Mohan <mobinmohan at gmail.com>
+Matthew Trey <tux4kids at treyhome.com>
Packaging & Ports:
------------------
Modified: tuxtype/trunk/doc/ChangeLog
===================================================================
--- tuxtype/trunk/doc/ChangeLog 2009-09-10 19:51:15 UTC (rev 1505)
+++ tuxtype/trunk/doc/ChangeLog 2009-09-10 19:55:30 UTC (rev 1506)
@@ -1,3 +1,18 @@
+10 Sep 2009 (svn.debian.org/tux4kids - revision 1504)
+[ Matthew Trey <tux4kids at treyhome.com> ]
+ - Scripting - added code so the script parser recognizes comments in
+ xml.
+
+31 Aug 2009 (svn.debian.org/tux4kids - revision 1470)
+[ Matthew Trey <tux4kids at treyhome.com> ]
+ - Practice - fixed a problem that was causing the wrong key to flash
+ in the bottom row of keys
+ - Game Instructions - simplified and reactivated cascade and laser game
+ instruction scripts, fixed scripting background image so that it scales
+ properly in fullscreen
+ - Scripting - Added some basic scripts so that new users will have a
+ complete lesson set out of the box. Added a howto in the docs.
+
10 Jun 2009 (svn.debian.org/tux4kids - revision 1034)
[ David Bruce <davidstuartbruce at gmail.com> ]
Version 1.7.5
Modified: tuxtype/trunk/doc/INSTALL-Win32
===================================================================
--- tuxtype/trunk/doc/INSTALL-Win32 2009-09-10 19:51:15 UTC (rev 1505)
+++ tuxtype/trunk/doc/INSTALL-Win32 2009-09-10 19:55:30 UTC (rev 1506)
@@ -14,6 +14,7 @@
Developers:
Jacob Greig <bombastic at firstlinux.net>
Jesse Andrews <jdandr2 at sheffield.cslab.uky.edu>
+ Matthew Trey <tux4kids at treyhome.com>
Original Windows Port by:
Olivier Dagenais <olivier_dagenais at canada.com>
Windows Crossbuild by:
Modified: tuxtype/trunk/src/scripting.c
===================================================================
--- tuxtype/trunk/src/scripting.c 2009-09-10 19:51:15 UTC (rev 1505)
+++ tuxtype/trunk/src/scripting.c 2009-09-10 19:55:30 UTC (rev 1506)
@@ -544,38 +544,47 @@
do
{
- for ( tmpStr = str; strlen(tmpStr) >= 3; ++tmpStr )
+ // search the current line for comment end
+ for ( tmpStr = str; strlen(tmpStr) >= 3 && !found; ++tmpStr )
{
if (strncmp("-->",tmpStr, 3) == 0)
{
found = 1;
- tmpStr += 3;
- if (strlen(tmpStr) > 0)
- {
- // copy the rest of the line into str for processing
- strncpy(str, tmpStr, strlen(tmpStr));
- }
- else
- {
- // str needs another line, this one is used up
- fscanf_result = fscanf(f, "%[^\n]\n", str);
- tmpStr = str;
-
- // we may get consecutive comment lines
- if (fscanf_result != EOF && strncmp("<!--", str, 4) == 0)
- {
- found = 0;
- }
- }
}
}
+ // if the comment end was not found get another line
if (!found)
{
fscanf_result = fscanf(f, "%[^\n]\n", str);
tmpStr = str;
}
+ // we did find the end of the comment
+ else
+ {
+ // move past the comment end tag
+ tmpStr += 3;
+
+ if (strlen(tmpStr) > 0)
+ {
+ // copy the rest of the line into str for processing
+ strncpy(str, tmpStr, strlen(tmpStr));
+ }
+ else
+ {
+ // str needs another line, this one is used up
+ fscanf_result = fscanf(f, "%[^\n]\n", str);
+ tmpStr = str;
+ }
+
+ // if the next line is a comment, start all over again
+ if (fscanf_result != EOF && strncmp("<!--", str, 4) == 0)
+ {
+ found = 0;
+ }
+ {
+
} while ( fscanf_result != EOF && !found );
/* -- if we reached the end of the file and saw no close to the comment, generate a warning -- */
More information about the Tux4kids-commits
mailing list