*** D:/dev/gnu/cvs-1.10.4/diff/diff3.c	Mon Jul  6 11:18:04 1998
--- D:/dev/gnu/cvs-1.10.6/diff/diff3.c	Thu Jun 17 16:15:12 1999
***************
*** 11,19 ****
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
  
!    You should have received a copy of the GNU General Public License
!    along with this program; if not, write to the Free Software
!    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  
  /* Written by Randy Smith */
  /* Librarification by Tim Pierce */
--- 11,17 ----
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
  
!    */
  
  /* Written by Randy Smith */
  /* Librarification by Tim Pierce */
***************
*** 459,471 ****
  			       tag_strings[0], tag_strings[1], tag_strings[2]);
    else if (merge)
      {
!       if (! freopen (file[rev_mapping[FILE0]], "r", stdin))
  	diff3_perror_with_exit (file[rev_mapping[FILE0]]);
!       conflicts_found
! 	= output_diff3_merge (stdin, diff3, mapping, rev_mapping,
  			      tag_strings[0], tag_strings[1], tag_strings[2]);
!       if (ferror (stdin))
  	diff3_fatal ("read error");
      }
    else
      {
--- 457,471 ----
  			       tag_strings[0], tag_strings[1], tag_strings[2]);
    else if (merge)
      {
!       FILE *mfp = fopen (file[rev_mapping[FILE0]], "r");
!       if (! mfp)
  	diff3_perror_with_exit (file[rev_mapping[FILE0]]);
!       conflicts_found = output_diff3_merge (mfp, diff3, mapping, rev_mapping,
  			      tag_strings[0], tag_strings[1], tag_strings[2]);
!       if (ferror (mfp))
  	diff3_fatal ("read error");
+       if (fclose(mfp) != 0)
+ 	perror_with_name (file[rev_mapping[FILE0]]);
      }
    else
      {
***************
*** 1414,1425 ****
       int const mapping[3], rev_mapping[3];
  {
    int i;
!   int oddoneout;
    char *cp;
    struct diff3_block *ptr;
    int line;
    size_t length;
!   int dontprint;
    static int skew_increment[3] = { 2, 3, 1 }; /* 0==>2==>1==>3 */
    char const *line_prefix = tab_align_flag ? "\t" : "  ";
  
--- 1414,1425 ----
       int const mapping[3], rev_mapping[3];
  {
    int i;
!   int oddoneout = 0;
    char *cp;
    struct diff3_block *ptr;
    int line;
    size_t length;
!   int dontprint = 0;
    static int skew_increment[3] = { 2, 3, 1 }; /* 0==>2==>1==>3 */
    char const *line_prefix = tab_align_flag ? "\t" : "  ";
  
