Module Name: src
Committed By: christos
Date: Sun Jan 15 21:10:24 UTC 2017
Modified Files:
src/usr.bin/xlint/lint1: scan.l
Log Message:
leave pragmas alone.
To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/usr.bin/xlint/lint1/scan.l
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/xlint/lint1/scan.l
diff -u src/usr.bin/xlint/lint1/scan.l:1.77 src/usr.bin/xlint/lint1/scan.l:1.78
--- src/usr.bin/xlint/lint1/scan.l:1.77 Sat Jan 7 13:28:49 2017
+++ src/usr.bin/xlint/lint1/scan.l Sun Jan 15 16:10:24 2017
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: scan.l,v 1.77 2017/01/07 18:28:49 christos Exp $ */
+/* $NetBSD: scan.l,v 1.78 2017/01/15 21:10:24 christos Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: scan.l,v 1.77 2017/01/07 18:28:49 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.78 2017/01/15 21:10:24 christos Exp $");
#endif
#include <stdlib.h>
@@ -1090,6 +1090,9 @@ directive(void)
continue;
if (!isdigit((unsigned char)c)) {
+ if (strncmp(cp, "pragma", 6) == 0
+ && isspace((unsigned char)cp[6]))
+ return;
error:
/* undefined or invalid # directive */
warning(255);