sdiff.c (0c4ac56e1642c415fe7c97b57eada0871f0b2d75) sdiff.c (a60711fd0073c5a65efd802fa3ec3edd9698f2d8)
1/* $OpenBSD: sdiff.c,v 1.36 2015/12/29 19:04:46 gsoares Exp $ */
2
3/*
4 * Written by Raymond Lai <ray@cyth.net>.
5 * Public domain.
6 */
7
8#include <sys/cdefs.h>

--- 416 unchanged lines hidden (view full) ---

425 if ((file1 = fopen(filename1, "r")) == NULL)
426 err(2, "could not open %s", filename1);
427 if ((file2 = fopen(filename2, "r")) == NULL)
428 err(2, "could not open %s", filename2);
429 if (!istextfile(file1) || !istextfile(file2)) {
430 /* Close open files and pipe, delete temps */
431 fclose(file1);
432 fclose(file2);
1/* $OpenBSD: sdiff.c,v 1.36 2015/12/29 19:04:46 gsoares Exp $ */
2
3/*
4 * Written by Raymond Lai <ray@cyth.net>.
5 * Public domain.
6 */
7
8#include <sys/cdefs.h>

--- 416 unchanged lines hidden (view full) ---

425 if ((file1 = fopen(filename1, "r")) == NULL)
426 err(2, "could not open %s", filename1);
427 if ((file2 = fopen(filename2, "r")) == NULL)
428 err(2, "could not open %s", filename2);
429 if (!istextfile(file1) || !istextfile(file2)) {
430 /* Close open files and pipe, delete temps */
431 fclose(file1);
432 fclose(file2);
433 fclose(diffpipe);
433 if (diffpipe != NULL)
434 fclose(diffpipe);
434 if (tmp1)
435 if (unlink(tmp1))
436 warn("Error deleting %s.", tmp1);
437 if (tmp2)
438 if (unlink(tmp2))
439 warn("Error deleting %s.", tmp2);
440 free(tmp1);
441 free(tmp2);

--- 747 unchanged lines hidden ---
435 if (tmp1)
436 if (unlink(tmp1))
437 warn("Error deleting %s.", tmp1);
438 if (tmp2)
439 if (unlink(tmp2))
440 warn("Error deleting %s.", tmp2);
441 free(tmp1);
442 free(tmp2);

--- 747 unchanged lines hidden ---