Make filenames const to avoid a few warnings.
Add FreeBSD tags. Reviewed by: cmp
This commit is contained in:
parent
ebf362130e
commit
c5250ed112
@ -68,7 +68,7 @@ main(argc, argv)
|
||||
struct stat sb1, sb2;
|
||||
off_t skip1, skip2;
|
||||
int ch, fd1, fd2, special;
|
||||
char *file1, *file2;
|
||||
const char *file1, *file2;
|
||||
|
||||
while ((ch = getopt(argc, argv, "-lsxz")) != -1)
|
||||
switch (ch) {
|
||||
|
@ -40,9 +40,9 @@
|
||||
#define DIFF_EXIT 1
|
||||
#define ERR_EXIT 2 /* error exit code */
|
||||
|
||||
void c_regular __P((int, char *, off_t, off_t, int, char *, off_t, off_t));
|
||||
void c_special __P((int, char *, off_t, int, char *, off_t));
|
||||
void diffmsg __P((char *, char *, off_t, off_t));
|
||||
void eofmsg __P((char *));
|
||||
void c_regular __P((int, const char *, off_t, off_t, int, const char *, off_t, off_t));
|
||||
void c_special __P((int, const char *, off_t, int, const char *, off_t));
|
||||
void diffmsg __P((const char *, const char *, off_t, off_t));
|
||||
void eofmsg __P((const char *));
|
||||
|
||||
extern int lflag, sflag, xflag;
|
||||
|
@ -29,6 +29,9 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -45,7 +48,7 @@ static const char sccsid[] = "@(#)misc.c 8.3 (Berkeley) 4/2/94";
|
||||
|
||||
void
|
||||
eofmsg(file)
|
||||
char *file;
|
||||
const char *file;
|
||||
{
|
||||
if (!sflag)
|
||||
warnx("EOF on %s", file);
|
||||
@ -54,7 +57,7 @@ eofmsg(file)
|
||||
|
||||
void
|
||||
diffmsg(file1, file2, byte, line)
|
||||
char *file1, *file2;
|
||||
const char *file1, *file2;
|
||||
off_t byte, line;
|
||||
{
|
||||
if (!sflag)
|
||||
|
@ -59,7 +59,7 @@ static u_char *remmap __P((u_char *, int, off_t));
|
||||
void
|
||||
c_regular(fd1, file1, skip1, len1, fd2, file2, skip2, len2)
|
||||
int fd1, fd2;
|
||||
char *file1, *file2;
|
||||
const char *file1, *file2;
|
||||
off_t skip1, len1, skip2, len2;
|
||||
{
|
||||
u_char ch, *p1, *p2, *m1, *m2, *e1, *e2;
|
||||
|
@ -29,6 +29,9 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -47,7 +50,7 @@ static const char sccsid[] = "@(#)special.c 8.3 (Berkeley) 4/2/94";
|
||||
void
|
||||
c_special(fd1, file1, skip1, fd2, file2, skip2)
|
||||
int fd1, fd2;
|
||||
char *file1, *file2;
|
||||
const char *file1, *file2;
|
||||
off_t skip1, skip2;
|
||||
{
|
||||
int ch1, ch2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user