diff options
Diffstat (limited to 'contrib/cvs/diff/diff3.c')
-rw-r--r-- | contrib/cvs/diff/diff3.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/cvs/diff/diff3.c b/contrib/cvs/diff/diff3.c index 64867f48f230..e3be1503e86f 100644 --- a/contrib/cvs/diff/diff3.c +++ b/contrib/cvs/diff/diff3.c @@ -11,9 +11,7 @@ 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 */ @@ -459,13 +457,15 @@ diff3_run (argc, argv, out, callbacks_arg) tag_strings[0], tag_strings[1], tag_strings[2]); else if (merge) { - if (! freopen (file[rev_mapping[FILE0]], "r", stdin)) + FILE *mfp = fopen (file[rev_mapping[FILE0]], "r"); + if (! mfp) diff3_perror_with_exit (file[rev_mapping[FILE0]]); - conflicts_found - = output_diff3_merge (stdin, diff3, mapping, rev_mapping, + conflicts_found = output_diff3_merge (mfp, diff3, mapping, rev_mapping, tag_strings[0], tag_strings[1], tag_strings[2]); - if (ferror (stdin)) + if (ferror (mfp)) diff3_fatal ("read error"); + if (fclose(mfp) != 0) + perror_with_name (file[rev_mapping[FILE0]]); } else { |