Module Name:    src
Committed By:   lukem
Date:           Mon Apr 13 00:37:05 UTC 2009

Modified Files:
        src/usr.bin/pr: egetopt.c extern.h pr.c

Log Message:
Fix -Wcast-qual issues


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/pr/egetopt.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/pr/extern.h
cvs rdiff -u -r1.19 -r1.20 src/usr.bin/pr/pr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/pr/egetopt.c
diff -u src/usr.bin/pr/egetopt.c:1.7 src/usr.bin/pr/egetopt.c:1.8
--- src/usr.bin/pr/egetopt.c:1.7	Mon Oct 13 07:41:22 2003
+++ src/usr.bin/pr/egetopt.c	Mon Apr 13 00:37:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: egetopt.c,v 1.7 2003/10/13 07:41:22 agc Exp $	*/
+/*	$NetBSD: egetopt.c,v 1.8 2009/04/13 00:37:05 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1991 Keith Muller.
@@ -38,7 +38,7 @@
 #if 0
 from: static char sccsid[] = "@(#)egetopt.c	8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: egetopt.c,v 1.7 2003/10/13 07:41:22 agc Exp $");
+__RCSID("$NetBSD: egetopt.c,v 1.8 2009/04/13 00:37:05 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -67,7 +67,7 @@
 char	*eoptarg;		/* argument associated with option */
 
 #define	BADCH	(int)'?'
-#define	EMSG	""
+char EMSG[1] = { '\0' };
 
 int
 egetopt(nargc, nargv, ostr)

Index: src/usr.bin/pr/extern.h
diff -u src/usr.bin/pr/extern.h:1.4 src/usr.bin/pr/extern.h:1.5
--- src/usr.bin/pr/extern.h:1.4	Mon Oct 13 07:41:22 2003
+++ src/usr.bin/pr/extern.h	Mon Apr 13 00:37:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: extern.h,v 1.4 2003/10/13 07:41:22 agc Exp $	*/
+/*	$NetBSD: extern.h,v 1.5 2009/04/13 00:37:05 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1991 Keith Muller.
@@ -33,7 +33,7 @@
  * SUCH DAMAGE.
  *
  *      from: @(#)extern.h	8.1 (Berkeley) 6/6/93
- *	$NetBSD: extern.h,v 1.4 2003/10/13 07:41:22 agc Exp $
+ *	$NetBSD: extern.h,v 1.5 2009/04/13 00:37:05 lukem Exp $
  */
 
 extern int eoptind;
@@ -47,11 +47,11 @@
 int	 inskip __P((FILE *, int, int));
 void	 mfail __P((void));
 int	 mulfile __P((int, char **));
-FILE	*nxtfile __P((int, char **, char **, char *, int));
+FILE	*nxtfile __P((int, char **, const char **, char *, int));
 int	 onecol __P((int, char **));
 int	 otln __P((char *, int, int *, int *, int));
 void	 pfail __P((void));
-int	 prhead __P((char *, char *, int));
+int	 prhead __P((char *, const char *, int));
 int	 prtail __P((int, int));
 int	 setup __P((int, char **));
 void	 terminate __P((int));

Index: src/usr.bin/pr/pr.c
diff -u src/usr.bin/pr/pr.c:1.19 src/usr.bin/pr/pr.c:1.20
--- src/usr.bin/pr/pr.c:1.19	Mon Jul 21 14:19:24 2008
+++ src/usr.bin/pr/pr.c	Mon Apr 13 00:37:05 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pr.c,v 1.19 2008/07/21 14:19:24 lukem Exp $	*/
+/*	$NetBSD: pr.c,v 1.20 2009/04/13 00:37:05 lukem Exp $	*/
 
 /*-
  * Copyright (c) 1991 Keith Muller.
@@ -43,7 +43,7 @@
 #if 0
 from: static char sccsid[] = "@(#)pr.c	8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: pr.c,v 1.19 2008/07/21 14:19:24 lukem Exp $");
+__RCSID("$NetBSD: pr.c,v 1.20 2009/04/13 00:37:05 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -98,7 +98,7 @@
 int	sflag;			/* -s option for multiple columns */
 int	nohead;			/* do not write head and trailer */
 int	pgwd;			/* page width with multiple col output */
-char	*timefrmt = TIMEFMT;	/* time conversion string */
+const char *timefrmt = TIMEFMT;	/* time conversion string */
 
 /*
  * misc globals
@@ -165,7 +165,7 @@
 	char *hbuf = NULL;
 	char *ohbuf;
 	FILE *inf = NULL;
-	char *fname;
+	const char *fname;
 	int mor;
 	int error = 1;
 
@@ -325,7 +325,7 @@
 	char *buf = NULL;
 	char *hbuf = NULL;
 	char *ohbuf;
-	char *fname;
+	const char *fname;
 	FILE *inf = NULL;
 	int ips = 0;
 	int cps = 0;
@@ -642,7 +642,7 @@
 	char *buf = NULL;
 	char *hbuf = NULL;
 	char *ohbuf;
-	char *fname;
+	const char *fname;
 	FILE *inf = NULL;
 	int ips = 0;
 	int cps = 0;
@@ -796,7 +796,7 @@
 	char *buf = NULL;
 	char *hbuf = NULL;
 	char *ohbuf;
-	char *fname;
+	const char *fname;
 	int ips = 0;
 	int cps = 0;
 	int ops = 0;
@@ -1302,7 +1302,7 @@
 nxtfile(argc, argv, fname, buf, dt)
 	int argc;
 	char **argv;
-	char **fname;
+	const char **fname;
 	char *buf;
 	int dt;
 {
@@ -1470,7 +1470,7 @@
 int
 prhead(buf, fname, pagcnt)
 	char *buf;
-	char *fname;
+	const char *fname;
 	int pagcnt;
 {
 	int ips = 0;

Reply via email to