1 /*-
2 * Copyright (c) 1991, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 */
7
8 #ifndef lint
9 static char sccsid[] = "@(#)misc.c 8.3 (Berkeley) 04/02/94";
10 #endif /* not lint */
11
12 #include <sys/types.h>
13
14 #include <err.h>
15 #include <stdio.h>
16 #include <stdlib.h>
17
18 #include "extern.h"
19
20 void
eofmsg(file)21 eofmsg(file)
22 char *file;
23 {
24 if (!sflag)
25 warnx("EOF on %s", file);
26 exit(DIFF_EXIT);
27 }
28
29 void
diffmsg(file1,file2,byte,line)30 diffmsg(file1, file2, byte, line)
31 char *file1, *file2;
32 off_t byte, line;
33 {
34 if (!sflag)
35 (void)printf("%s %s differ: char %qd, line %qd\n",
36 file1, file2, byte, line);
37 exit(DIFF_EXIT);
38 }
39