Let the handling of the skeleton files be local to the procedures

that use it.
* src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
longer static.
(fparser, open_extra_files): Remove.
(open_files, output_files): Don't take care of fparser.
* src/files.h: Adjust.
* src/output.c (output_parser): Open and close the file to the
skeleton.
* src/reader.c (read_declarations): When %semantic_parser, open
fguard.
This commit is contained in:
Akim Demaille
2000-12-19 13:05:52 +00:00
parent 55b9634155
commit ff61dabdba
5 changed files with 47 additions and 60 deletions

View File

@@ -43,9 +43,6 @@ extern FILE *foutput;
/* If semantic parser, output yyguard, containing all the guard code. */
extern FILE *fguard;
/* Read the parser to copy into TABLE_OBSTACK. */
extern FILE *fparser;
/* Output all the action code; precise form depends on which parser. */
extern struct obstack action_obstack;
@@ -62,16 +59,15 @@ extern struct obstack defines_obstack;
extern char *infile;
extern int lineno;
extern char *outfile;
extern char *defsfile;
extern char *tabfile;
extern char *attrsfile;
extern char *guardfile;
extern char *actfile;
void open_files PARAMS((void));
void open_extra_files PARAMS((void));
void output_files PARAMS((void));
FILE *xfopen PARAMS ((const char *name, const char *mode));
int xfclose PARAMS ((FILE *ptr));
const char *skeleton_find PARAMS ((const char *envvar, const char *skeleton));
#endif /* !FILES_H_ */