WARNS=2 fix, kill register keyword, use __FBSDID().
NO_WERROR set because of hard-to-fix warnings originating in system headers.
This commit is contained in:
parent
e4d5827537
commit
573560d5f7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87693
@ -3,6 +3,7 @@
|
||||
|
||||
PROG= vfontedpr
|
||||
SRCS= regexp.c vfontedpr.c
|
||||
NO_WERROR=yes
|
||||
SCRIPTS=vgrind.sh
|
||||
MAN= vgrind.1 vgrindefs.5
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)extern.h 8.1 (Berkeley) 6/6/93
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
typedef int boolean;
|
||||
@ -53,7 +54,7 @@ extern char *l_prcbeg; /* regular expr for procedure begin */
|
||||
extern char *l_strbeg; /* delimiter for string constant */
|
||||
extern char *l_strend; /* delimiter for string constant */
|
||||
extern boolean l_toplex; /* procedures only defined at top lex level */
|
||||
extern char *language; /* the language indicator */
|
||||
extern const char *language; /* the language indicator */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
|
@ -32,19 +32,24 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"@(#) Copyright (c) 1980, 1993\n\
|
||||
The Regents of the University of California. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)regexp.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif /* not lint */
|
||||
static const char copyright[] =
|
||||
"@(#) Copyright (c) 1980, 1993\n\
|
||||
The Regents of the University of California. All rights reserved.\n";
|
||||
#endif
|
||||
|
||||
#ifndef lint
|
||||
static const char sccsid[] = "@(#)regexp.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "extern.h"
|
||||
|
||||
#define FALSE 0
|
||||
|
@ -31,19 +31,19 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifndef lint
|
||||
static const char copyright[] =
|
||||
"@(#) Copyright (c) 1980, 1993\n\
|
||||
The Regents of the University of California. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)vfontedpr.c 8.1 (Berkeley) 6/6/93";
|
||||
static const char sccsid[] = "@(#)vfontedpr.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$FreeBSD$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@ -99,7 +99,7 @@ static boolean pass = FALSE; /*
|
||||
|
||||
static int blklevel; /* current nesting level */
|
||||
static int comtype; /* type of comment */
|
||||
static char *defsfile[2] = { _PATH_VGRINDEFS, 0 };
|
||||
static const char *defsfile[2] = { _PATH_VGRINDEFS, 0 };
|
||||
/* name of language definitions file */
|
||||
static int margin;
|
||||
static int plstack[PSMAX]; /* the procedure nesting level stack */
|
||||
@ -127,7 +127,7 @@ char *l_prcbeg; /* regular expr for procedure begin */
|
||||
char *l_strbeg; /* delimiter for string constant */
|
||||
char *l_strend; /* delimiter for string constant */
|
||||
boolean l_toplex; /* procedures only defined at top lex level */
|
||||
char *language = "c"; /* the language indicator */
|
||||
const char *language = "c"; /* the language indicator */
|
||||
|
||||
#define ps(x) printf("%s", x)
|
||||
|
||||
@ -136,7 +136,7 @@ main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
char *fname = "";
|
||||
const char *fname = "";
|
||||
struct stat stbuf;
|
||||
char buf[BUFSIZ];
|
||||
char *defs;
|
||||
@ -166,7 +166,7 @@ main(argc, argv)
|
||||
if (!strcmp(argv[0], "-f")) {
|
||||
filter++;
|
||||
argv[0] = argv[argc-1];
|
||||
argv[argc-1] = "-";
|
||||
argv[argc-1] = strdup("-");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -179,7 +179,7 @@ main(argc, argv)
|
||||
/* build an index */
|
||||
if (!strcmp(argv[0], "-x")) {
|
||||
idx++;
|
||||
argv[0] = "-n";
|
||||
argv[0] = strdup("-n");
|
||||
}
|
||||
|
||||
/* indicate no keywords */
|
||||
@ -719,7 +719,7 @@ iskw(s)
|
||||
|
||||
while (++cp, isidchr(*cp))
|
||||
i++;
|
||||
while (cp = *ss++)
|
||||
while ((cp = *ss++))
|
||||
if (!STRNCMP(s,cp,i) && !isidchr(cp[i]))
|
||||
return (i);
|
||||
return (0);
|
||||
|
@ -31,10 +31,9 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$FreeBSD$";
|
||||
#endif
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#define BUFSIZ 1024
|
||||
#define MAXHOP 32 /* max number of tc= indirections */
|
||||
|
Loading…
Reference in New Issue
Block a user