xref: /csrg-svn/usr.bin/cmp/misc.c (revision 66652)
151411Sbostic /*-
2*66652Spendry  * Copyright (c) 1991, 1993, 1994
361942Sbostic  *	The Regents of the University of California.  All rights reserved.
451411Sbostic  *
551411Sbostic  * %sccs.include.redist.c%
651411Sbostic  */
751411Sbostic 
851411Sbostic #ifndef lint
9*66652Spendry static char sccsid[] = "@(#)misc.c	8.3 (Berkeley) 04/02/94";
1051411Sbostic #endif /* not lint */
1151411Sbostic 
1251411Sbostic #include <sys/types.h>
1366589Spendry 
1466589Spendry #include <err.h>
1551411Sbostic #include <stdio.h>
1651411Sbostic #include <stdlib.h>
1766589Spendry 
1851411Sbostic #include "extern.h"
1951411Sbostic 
2051411Sbostic void
eofmsg(file)2151411Sbostic eofmsg(file)
2251411Sbostic 	char *file;
2351411Sbostic {
2451411Sbostic 	if (!sflag)
2566589Spendry 		warnx("EOF on %s", file);
2666589Spendry 	exit(DIFF_EXIT);
2751411Sbostic }
2851411Sbostic 
2951411Sbostic void
diffmsg(file1,file2,byte,line)3051411Sbostic diffmsg(file1, file2, byte, line)
3151411Sbostic 	char *file1, *file2;
3251411Sbostic 	off_t byte, line;
3351411Sbostic {
3451411Sbostic 	if (!sflag)
3554187Sbostic 		(void)printf("%s %s differ: char %qd, line %qd\n",
3651411Sbostic 		    file1, file2, byte, line);
3766589Spendry 	exit(DIFF_EXIT);
3851411Sbostic }
39