diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-09-25 19:47:10 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-09-25 19:47:10 +0000 |
commit | c963ee5ce88f1a7d0c6796f55d278dc99e737cc5 (patch) | |
tree | 15407168614751120fa1ab884ebcc68881e5aeb3 /src | |
parent | e3926bff7a90e9721bbf74c43235b037e4919507 (diff) | |
download | cflow-c963ee5ce88f1a7d0c6796f55d278dc99e737cc5.tar.gz cflow-c963ee5ce88f1a7d0c6796f55d278dc99e737cc5.tar.bz2 |
(yywrap): Close yyin, and clean up the buffer
(get_token): New function. Interface to yylex.
Diffstat (limited to 'src')
-rw-r--r-- | src/c.l | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -312,13 +312,27 @@ pp_close(FILE *fp) int yywrap() { + if (!yyin) + return 1; if (preprocess_option) pp_close(yyin); + else + fclose(yyin); + yyin = NULL; +#ifdef FLEX_SCANNER + yy_delete_buffer(yy_current_buffer); +#endif delete_statics(); return 1; } int +get_token() +{ + return yyin ? yylex() : 0; +} + +int source(char *name) { FILE *fp; |