[Pntool-developers] SF.net SVN: pntool:[187] translator
Brought to you by:
compaqdrew,
miordache
From: <the...@us...> - 2009-07-08 16:21:01
|
Revision: 187 http://pntool.svn.sourceforge.net/pntool/?rev=187&view=rev Author: thecodeweasel Date: 2009-07-08 16:20:34 +0000 (Wed, 08 Jul 2009) Log Message: ----------- Stripping the extension off the file name Modified Paths: -------------- translator/pngenerator.c translator/pngenerator.g translator/pngenerator.h Modified: translator/pngenerator.c =================================================================== --- translator/pngenerator.c 2009-07-08 05:32:01 UTC (rev 186) +++ translator/pngenerator.c 2009-07-08 16:20:34 UTC (rev 187) @@ -2,7 +2,7 @@ * This C source file was generated by $ANTLR version 3.1.2 * * - From the grammar source file : /Users/bion/projects/iordache/translator/pngenerator.g - * - On : 2009-07-08 00:29:43 + * - On : 2009-07-08 11:18:31 * - for the tree parser : pngeneratorTreeParser * * Editing it, at least manually, is not wise. * @@ -1177,7 +1177,7 @@ output = tmalloc(sizeof(specs)); //copy the file name into the specs structure output->name = tcalloc(strlen(fileName), sizeof(char)); - strcpy(output->name, fileName); + strncpy(output->name, fileName, strcspn(fileName, ".")); //prep the pn array output->pn_array = NULL; output->pn_num = 0; Modified: translator/pngenerator.g =================================================================== --- translator/pngenerator.g 2009-07-08 05:32:01 UTC (rev 186) +++ translator/pngenerator.g 2009-07-08 16:20:34 UTC (rev 187) @@ -145,7 +145,7 @@ output = tmalloc(sizeof(specs)); //copy the file name into the specs structure output->name = tcalloc(strlen(fileName), sizeof(char)); - strcpy(output->name, fileName); + strncpy(output->name, fileName, strcspn(fileName, ".")); //prep the pn array output->pn_array = NULL; output->pn_num = 0; Modified: translator/pngenerator.h =================================================================== --- translator/pngenerator.h 2009-07-08 05:32:01 UTC (rev 186) +++ translator/pngenerator.h 2009-07-08 16:20:34 UTC (rev 187) @@ -2,7 +2,7 @@ * This C header file was generated by $ANTLR version 3.1.2 * * - From the grammar source file : /Users/bion/projects/iordache/translator/pngenerator.g - * - On : 2009-07-08 00:29:43 + * - On : 2009-07-08 11:18:31 * - for the tree parser : pngeneratorTreeParser * * Editing it, at least manually, is not wise. * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |