From 31e9a31fab6a5b6c70fd2a633690fa153e5cb450 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 13 Nov 2001 08:38:01 +0000 Subject: [PATCH] *** empty log message *** --- Parser/Gmsh.tab.cpp | 8 ++++---- Parser/Gmsh.y | 8 ++++---- Parser/Gmsh.yy.cpp | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 8a485a3952..ad94fd8fa7 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -177,7 +177,7 @@ #line 1 "Gmsh.y" -// $Id: Gmsh.tab.cpp,v 1.127 2001-11-12 15:53:52 geuzaine Exp $ +// $Id: Gmsh.tab.cpp,v 1.128 2001-11-13 08:38:01 geuzaine Exp $ #include <stdarg.h> #ifndef _NOPLUGIN @@ -6166,17 +6166,17 @@ case 383: i = PrintListOfDouble(yyvsp[-3].c,yyvsp[-1].l,tmpstring); if(i<0){ vyyerror("Too few arguments in Sprintf"); - yyval.c = ""; + yyval.c = yyvsp[-3].c; } else if(i>0){ vyyerror("Too many arguments (%d) in Sprintf", i); - yyval.c = ""; + yyval.c = yyvsp[-3].c; } else{ yyval.c = (char*)Malloc((strlen(tmpstring)+1)*sizeof(char)); strcpy(yyval.c, tmpstring); + Free(yyvsp[-3].c); } - Free(yyvsp[-3].c); List_Delete(yyvsp[-1].l); ; break;} diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index 86cacfe135..ccbfda2923 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -1,6 +1,6 @@ %{ -// $Id: Gmsh.y,v 1.111 2001-11-12 13:33:57 geuzaine Exp $ +// $Id: Gmsh.y,v 1.112 2001-11-13 08:38:01 geuzaine Exp $ #include <stdarg.h> #ifndef _NOPLUGIN @@ -2694,17 +2694,17 @@ StringExpr : i = PrintListOfDouble($3,$5,tmpstring); if(i<0){ vyyerror("Too few arguments in Sprintf"); - $$ = ""; + $$ = $3; } else if(i>0){ vyyerror("Too many arguments (%d) in Sprintf", i); - $$ = ""; + $$ = $3; } else{ $$ = (char*)Malloc((strlen(tmpstring)+1)*sizeof(char)); strcpy($$, tmpstring); + Free($3); } - Free($3); List_Delete($5); } | tSprintf '(' tSTRING '.' tSTRING ')' diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp index 20e22b9a4a..59e7a57545 100644 --- a/Parser/Gmsh.yy.cpp +++ b/Parser/Gmsh.yy.cpp @@ -2,7 +2,7 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.127 2001-11-12 15:53:52 geuzaine Exp $ + * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.128 2001-11-13 08:38:01 geuzaine Exp $ */ #define FLEX_SCANNER @@ -1000,7 +1000,7 @@ char *yytext; #define INITIAL 0 #line 2 "Gmsh.l" -// $Id: Gmsh.yy.cpp,v 1.127 2001-11-12 15:53:52 geuzaine Exp $ +// $Id: Gmsh.yy.cpp,v 1.128 2001-11-13 08:38:01 geuzaine Exp $ #include <stdio.h> #include <stdlib.h> -- GitLab