X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/3813e141f8e0c5a60254ffcc975a4b9976dc7ecc..ee16363fd28099fc295b269da98c2aace6a63395:/src/output.c?ds=sidebyside diff --git a/src/output.c b/src/output.c index 63d02027..789b2f03 100644 --- a/src/output.c +++ b/src/output.c @@ -198,7 +198,7 @@ prepare_symbols (void) /*-------------------------------------------------------------. | Prepare the muscles related to the rules: rhs, prhs, r1, r2, | -| rline, dprec, merger | +| rline, dprec, merger. | `-------------------------------------------------------------*/ static void @@ -230,9 +230,9 @@ prepare_rules (void) rhs[i++] = -1; /* Line where rule was defined. */ rline[r] = rules[r].location.first_line; - /* Dynamic precedence (GLR) */ + /* Dynamic precedence (GLR). */ dprec[r] = rules[r].dprec; - /* Merger-function index (GLR) */ + /* Merger-function index (GLR). */ merger[r] = rules[r].merger; } assert (i == nritems); @@ -526,10 +526,7 @@ output_skeleton (void) strcpy (full_path, pkgdatadir); full_path[pkgdatadirlen] = '/'; strcpy (full_path + pkgdatadirlen + 1, m4sugar); - in = fopen (full_path, "r"); - if (! in) - error (EXIT_FAILURE, errno, "%s", full_path); - xfclose (in); + xfclose (xfopen (full_path, "r")); strcpy (full_path + pkgdatadirlen + 1, skeleton); /* Create an m4 subprocess connected to us via two pipes. */ @@ -591,8 +588,7 @@ prepare (void) MUSCLE_INSERT_INT ("pure", pure_parser); MUSCLE_INSERT_INT ("synclines_flag", !no_lines_flag); - /* FIXME: This is wrong: the muscles should decide whether they hold - a copy or not, but the situation is too obscure currently. */ + /* File names. */ MUSCLE_INSERT_STRING ("prefix", spec_name_prefix ? spec_name_prefix : "yy"); /* User Code. */