diff --git a/src/fgt/io_x3d/vrml/Parser.cpp b/src/fgt/io_x3d/vrml/Parser.cpp index 4a46e24a5..88ecd45e6 100644 --- a/src/fgt/io_x3d/vrml/Parser.cpp +++ b/src/fgt/io_x3d/vrml/Parser.cpp @@ -24,7 +24,10 @@ /**************************************************************************** History $Log$ - Revision 1.1 2008/02/20 22:01:59 gianpaolopalma + Revision 1.2 2008/02/21 13:04:09 gianpaolopalma + Fixed compile error + + Revision 1.1 2008/02/20 22:02:00 gianpaolopalma First working version of Vrml to X3D translator *****************************************************************************/ @@ -741,9 +744,9 @@ void Parser::NodeBodyElement(QDomElement& parent, bool flag) { } void Parser::ScriptBodyElement() { - QString str; + QString str; QDomElement elem; if (StartOf(6)) { - NodeBodyElement(QDomElement(), false); + NodeBodyElement(elem, false); } else if (la->kind == 26 || la->kind == 27) { if (la->kind == 26) { Get(); @@ -777,7 +780,7 @@ void Parser::ScriptBodyElement() { FieldType(str); InitializeOnlyId(str); if (StartOf(8)) { - FieldValue(QDomElement(), "", false); + FieldValue(elem, "", false); } else if (la->kind == 39) { Get(); InitializeOnlyId(str); @@ -1132,7 +1135,7 @@ void Errors::SynErr(int line, int col, int n) { break; } wchar_t str[100]; - swprintf(str, L"-- line %d col %d: %ls\n", line, col, s); + coco_swprintf(str, 100, L"-- line %d col %d: %ls\n", line, col, s); stringError = coco_string_create_append(stringError, str); coco_string_delete(s); count++; @@ -1140,7 +1143,7 @@ void Errors::SynErr(int line, int col, int n) { void Errors::Error(int line, int col, const wchar_t *s) { wchar_t str[100]; - swprintf(str, L"-- line %d col %d: %ls\n", line, col, s); + coco_swprintf(str, 100, L"-- line %d col %d: %ls\n", line, col, s); stringError = coco_string_create_append(stringError, str); count++; } diff --git a/src/fgt/io_x3d/vrml/Parser.frame b/src/fgt/io_x3d/vrml/Parser.frame index 8c0d6ecd7..4815cf1ec 100644 --- a/src/fgt/io_x3d/vrml/Parser.frame +++ b/src/fgt/io_x3d/vrml/Parser.frame @@ -52,6 +52,9 @@ Coco/R itself) does not fall under the GNU General Public License. /**************************************************************************** History $Log$ + Revision 1.2 2008/02/21 13:04:09 gianpaolopalma + Fixed compile error + Revision 1.1 2008/02/20 22:02:00 gianpaolopalma First working version of Vrml to X3D translator @@ -171,6 +174,9 @@ Coco/R itself) does not fall under the GNU General Public License. /**************************************************************************** History $Log$ + Revision 1.2 2008/02/21 13:04:09 gianpaolopalma + Fixed compile error + Revision 1.1 2008/02/20 22:02:00 gianpaolopalma First working version of Vrml to X3D translator @@ -294,7 +300,7 @@ void Errors::SynErr(int line, int col, int n) { break; } wchar_t str[100]; - swprintf(str, L"-- line %d col %d: %ls\n", line, col, s); + coco_swprintf(str, 100, L"-- line %d col %d: %ls\n", line, col, s); stringError = coco_string_create_append(stringError, str); coco_string_delete(s); count++; @@ -302,7 +308,7 @@ void Errors::SynErr(int line, int col, int n) { void Errors::Error(int line, int col, const wchar_t *s) { wchar_t str[100]; - swprintf(str, L"-- line %d col %d: %ls\n", line, col, s); + coco_swprintf(str, 100, L"-- line %d col %d: %ls\n", line, col, s); stringError = coco_string_create_append(stringError, str); count++; } diff --git a/src/fgt/io_x3d/vrml/Parser.h b/src/fgt/io_x3d/vrml/Parser.h index 632f6b42d..c663d0695 100644 --- a/src/fgt/io_x3d/vrml/Parser.h +++ b/src/fgt/io_x3d/vrml/Parser.h @@ -24,6 +24,9 @@ /**************************************************************************** History $Log$ + Revision 1.2 2008/02/21 13:04:09 gianpaolopalma + Fixed compile error + Revision 1.1 2008/02/20 22:02:00 gianpaolopalma First working version of Vrml to X3D translator diff --git a/src/fgt/io_x3d/vrml/Scanner.cpp b/src/fgt/io_x3d/vrml/Scanner.cpp index 5990edeae..d595a7262 100644 --- a/src/fgt/io_x3d/vrml/Scanner.cpp +++ b/src/fgt/io_x3d/vrml/Scanner.cpp @@ -24,6 +24,9 @@ /**************************************************************************** History $Log$ + Revision 1.2 2008/02/21 13:04:10 gianpaolopalma + Fixed compile error + Revision 1.1 2008/02/20 22:02:00 gianpaolopalma First working version of Vrml to X3D translator diff --git a/src/fgt/io_x3d/vrml/Scanner.h b/src/fgt/io_x3d/vrml/Scanner.h index dd4286ea1..60502321a 100644 --- a/src/fgt/io_x3d/vrml/Scanner.h +++ b/src/fgt/io_x3d/vrml/Scanner.h @@ -24,6 +24,9 @@ /**************************************************************************** History $Log$ + Revision 1.2 2008/02/21 13:04:10 gianpaolopalma + Fixed compile error + Revision 1.1 2008/02/20 22:02:00 gianpaolopalma First working version of Vrml to X3D translator diff --git a/src/fgt/io_x3d/vrml/VrmlTranslator.atg b/src/fgt/io_x3d/vrml/VrmlTranslator.atg index f37b258e5..9b57632a5 100644 --- a/src/fgt/io_x3d/vrml/VrmlTranslator.atg +++ b/src/fgt/io_x3d/vrml/VrmlTranslator.atg @@ -355,11 +355,11 @@ ScriptBody }. -ScriptBodyElement (.QString str;.) -= NodeBodyElement +ScriptBodyElement (.QString str; QDomElement elem;.) += NodeBodyElement |("inputOnly" | "eventIn") FieldType InputOnlyId ["IS" InputOnlyId] |("outputOnly" | "eventOut") FieldType OutputOnlyId ["IS" OutputOnlyId] - |("initializeOnly" | "field") FieldType InitializeOnlyId (FieldValue | "IS" InitializeOnlyId) + |("initializeOnly" | "field") FieldType InitializeOnlyId (FieldValue | "IS" InitializeOnlyId) |("inputOutput" | "exposedField") FieldType InputOutputId "IS" InputOutputId.