mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 08:13:02 +00:00
maint: xfdopen, and scope reduction.
* src/files.h, src/files.c (xfdopen): New. * src/output.c (output_skeleton): Use it. Reduce the scope of argv.
This commit is contained in:
@@ -134,6 +134,15 @@ xfclose (FILE *ptr)
|
||||
}
|
||||
|
||||
|
||||
FILE *
|
||||
xfdopen (int fd, char const *mode)
|
||||
{
|
||||
FILE *res = fdopen (fd, mode);
|
||||
if (! res)
|
||||
error (EXIT_FAILURE, get_errno (), "fdopen");
|
||||
return res;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------.
|
||||
| Compute ALL_BUT_EXT, ALL_BUT_TAB_EXT and output files extensions. |
|
||||
`------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user