break out special local mail processing (e.g., mapping to the
[unix-history] / usr / src / usr.bin / cmp / misc.c
CommitLineData
3c5ddde7 1/*-
d78dcdff 2 * Copyright (c) 1991, 1993, 1994
e5824735 3 * The Regents of the University of California. All rights reserved.
3c5ddde7
KB
4 *
5 * %sccs.include.redist.c%
6 */
7
8#ifndef lint
d78dcdff 9static char sccsid[] = "@(#)misc.c 8.3 (Berkeley) %G%";
3c5ddde7
KB
10#endif /* not lint */
11
12#include <sys/types.h>
c3afbeb5
JSP
13
14#include <err.h>
3c5ddde7
KB
15#include <stdio.h>
16#include <stdlib.h>
c3afbeb5 17
3c5ddde7
KB
18#include "extern.h"
19
20void
21eofmsg(file)
22 char *file;
23{
24 if (!sflag)
c3afbeb5
JSP
25 warnx("EOF on %s", file);
26 exit(DIFF_EXIT);
3c5ddde7
KB
27}
28
29void
30diffmsg(file1, file2, byte, line)
31 char *file1, *file2;
32 off_t byte, line;
33{
34 if (!sflag)
9e7572e5 35 (void)printf("%s %s differ: char %qd, line %qd\n",
3c5ddde7 36 file1, file2, byte, line);
c3afbeb5 37 exit(DIFF_EXIT);
3c5ddde7 38}