Don't missinterpret targets that start with .info
This commit is contained in:
parent
1365824bee
commit
3e3df25ba3
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: parse.c,v 1.163 2010/04/29 23:12:21 sjg Exp $ */
|
/* $NetBSD: parse.c,v 1.164 2010/05/24 21:04:49 sjg Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1989, 1990, 1993
|
* Copyright (c) 1988, 1989, 1990, 1993
|
||||||
@ -69,14 +69,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAKE_NATIVE
|
#ifndef MAKE_NATIVE
|
||||||
static char rcsid[] = "$NetBSD: parse.c,v 1.163 2010/04/29 23:12:21 sjg Exp $";
|
static char rcsid[] = "$NetBSD: parse.c,v 1.164 2010/05/24 21:04:49 sjg Exp $";
|
||||||
#else
|
#else
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
|
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: parse.c,v 1.163 2010/04/29 23:12:21 sjg Exp $");
|
__RCSID("$NetBSD: parse.c,v 1.164 2010/05/24 21:04:49 sjg Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
#endif
|
#endif
|
||||||
@ -510,7 +510,7 @@ Parse_Error(int type, const char *fmt, ...)
|
|||||||
* variables, print the message and exit(1) (for .error) or just print
|
* variables, print the message and exit(1) (for .error) or just print
|
||||||
* a warning if the directive is malformed.
|
* a warning if the directive is malformed.
|
||||||
*/
|
*/
|
||||||
static void
|
static Boolean
|
||||||
ParseMessage(char *line)
|
ParseMessage(char *line)
|
||||||
{
|
{
|
||||||
int mtype;
|
int mtype;
|
||||||
@ -527,11 +527,13 @@ ParseMessage(char *line)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Parse_Error(PARSE_WARNING, "invalid syntax: \".%s\"", line);
|
Parse_Error(PARSE_WARNING, "invalid syntax: \".%s\"", line);
|
||||||
return;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!isspace((u_char)*line))
|
while (isalpha((u_char)*line))
|
||||||
line++;
|
line++;
|
||||||
|
if (!isspace((u_char)*line))
|
||||||
|
return FALSE; /* not for us */
|
||||||
while (isspace((u_char)*line))
|
while (isspace((u_char)*line))
|
||||||
line++;
|
line++;
|
||||||
|
|
||||||
@ -543,6 +545,7 @@ ParseMessage(char *line)
|
|||||||
/* Terminate immediately. */
|
/* Terminate immediately. */
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -2567,8 +2570,8 @@ Parse_File(const char *name, int fd)
|
|||||||
} else if (strncmp(cp, "info", 4) == 0 ||
|
} else if (strncmp(cp, "info", 4) == 0 ||
|
||||||
strncmp(cp, "error", 5) == 0 ||
|
strncmp(cp, "error", 5) == 0 ||
|
||||||
strncmp(cp, "warning", 7) == 0) {
|
strncmp(cp, "warning", 7) == 0) {
|
||||||
ParseMessage(cp);
|
if (ParseMessage(cp))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
# $Id: error,v 1.1 2010/04/08 17:41:29 sjg Exp $
|
# $Id: error,v 1.2 2010/05/24 21:04:49 sjg Exp $
|
||||||
|
|
||||||
.info just FYI
|
.info just FYI
|
||||||
.warning this could be serious
|
.warning this could be serious
|
||||||
.error this is fatal
|
.error this is fatal
|
||||||
|
|
||||||
|
all:
|
||||||
|
|
||||||
|
.info.html:
|
||||||
|
@echo this should be ignored
|
||||||
|
Loading…
Reference in New Issue
Block a user