Skip to content
Snippets Groups Projects
Commit 41e586ba authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fclose + includes (JF, qu'en penses-tu ?)

end of file
parent 31749304
No related branches found
No related tags found
No related merge requests found
%{
// $Id: Gmsh.l,v 1.29 2001-04-20 08:52:23 geuzaine Exp $
// $Id: Gmsh.l,v 1.30 2001-05-16 15:11:45 geuzaine Exp $
#include <stdio.h>
#include <stdlib.h>
......@@ -330,7 +330,10 @@ void skip_until(char *skip, char *until){
while(1){
while (1){
chars[0] = yyinput();
if(chars[0] == (char)EOF) Msg(FATAL, "Unexpected end of file") ;
if(chars[0] == (char)EOF){
Msg(GERROR, "Unexpected end of file") ;
return;
}
if(chars[0] == until[0]) break;
if(skip && chars[0] == skip[0]) break;
}
......
This diff is collapsed.
%{
// $Id: Gmsh.y,v 1.76 2001-04-26 17:58:00 remacle Exp $
// $Id: Gmsh.y,v 1.77 2001-05-16 15:11:45 geuzaine Exp $
//
// Generaliser sprintf avec des chaines de caracteres
//
#include <stdarg.h>
......@@ -1453,7 +1457,13 @@ Command :
while(!feof(yyin)){
yyparse();
}
fclose(yyin);
//
//Est-ce grave de laisser le stream ouvert? Si on fait le
//fclose, on ne peut pas faire appel a une fonction
//(Function) definie en dehors de son fichier de
//definition...
//
//fclose(yyin);
yyin = yyinTab[--RecursionLevel];
strcpy(yyname,yynameTab[RecursionLevel]);
yylineno = yylinenoTab[RecursionLevel];
......@@ -2410,6 +2420,7 @@ RecursiveListOfDouble :
}
;
ColorExpr :
'{' FExpr ',' FExpr ',' FExpr ',' FExpr '}'
{
......
......@@ -2,7 +2,7 @@
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.86 2001-04-26 17:58:00 remacle Exp $
* $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.87 2001-05-16 15:11:46 geuzaine Exp $
*/
#define FLEX_SCANNER
......@@ -10,6 +10,7 @@
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
#include <unistd.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
......@@ -23,7 +24,6 @@
#ifdef __cplusplus
#include <stdlib.h>
#include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
......@@ -978,7 +978,7 @@ char *yytext;
#define INITIAL 0
#line 2 "Gmsh.l"
// $Id: Gmsh.yy.cpp,v 1.86 2001-04-26 17:58:00 remacle Exp $
// $Id: Gmsh.yy.cpp,v 1.87 2001-05-16 15:11:46 geuzaine Exp $
#include <stdio.h>
#include <stdlib.h>
......@@ -2713,11 +2713,6 @@ YY_BUFFER_STATE b;
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
......@@ -3096,7 +3091,10 @@ void skip_until(char *skip, char *until){
while(1){
while (1){
chars[0] = yyinput();
if(chars[0] == (char)EOF) Msg(FATAL, "Unexpected end of file") ;
if(chars[0] == (char)EOF){
Msg(GERROR, "Unexpected end of file") ;
return;
}
if(chars[0] == until[0]) break;
if(skip && chars[0] == skip[0]) break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment