/[bison]/bison/src/output.c
ViewVC logotype

Diff of /bison/src/output.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.202 by akim, Thu Oct 24 11:40:27 2002 UTC revision 1.203 by eggert, Wed Oct 30 06:20:02 2002 UTC
# Line 500  output_skeleton (void) Line 500  output_skeleton (void)
500    full_path[pkgdatadirlen] = '/';    full_path[pkgdatadirlen] = '/';
501    strcpy (full_path + pkgdatadirlen + 1, m4sugar);    strcpy (full_path + pkgdatadirlen + 1, m4sugar);
502    in = fopen (full_path, "r");    in = fopen (full_path, "r");
503    if (! in || fclose (in) != 0)    if (! in)
504      error (EXIT_FAILURE, errno, "%s", full_path);      error (EXIT_FAILURE, errno, "%s", full_path);
505      xfclose (in);
506    strcpy (full_path + pkgdatadirlen + 1, skeleton);    strcpy (full_path + pkgdatadirlen + 1, skeleton);
507    
508    /* Create an m4 subprocess connected to us via two pipes.  */    /* Create an m4 subprocess connected to us via two pipes.  */
# Line 539  output_skeleton (void) Line 540  output_skeleton (void)
540    
541    fputs ("m4_wrap([m4_divert_pop(0)])\n", out);    fputs ("m4_wrap([m4_divert_pop(0)])\n", out);
542    fputs ("m4_divert_push(0)dnl\n", out);    fputs ("m4_divert_push(0)dnl\n", out);
   if (ferror (out))  
     error (EXIT_FAILURE, 0, "pipe output error");  
543    xfclose (out);    xfclose (out);
544    
545    /* Read and process m4's output.  */    /* Read and process m4's output.  */
# Line 549  output_skeleton (void) Line 548  output_skeleton (void)
548    if (! in)    if (! in)
549      error (EXIT_FAILURE, errno, "fdopen");      error (EXIT_FAILURE, errno, "fdopen");
550    scan_skel (in);    scan_skel (in);
   if (ferror (in))  
     error (EXIT_FAILURE, 0, "pipe input error");  
551    xfclose (in);    xfclose (in);
552    reap_subpipe (pid, m4);    reap_subpipe (pid, m4);
553    timevar_pop (TV_M4);    timevar_pop (TV_M4);

Legend:
Removed from v.1.202  
changed lines
  Added in v.1.203

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26