summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2010-08-03 18:42:42 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2010-08-03 18:42:42 +0000
commit7bc2dad85529088f40d8965e75640e4d7ad0e2a1 (patch)
tree571edffb921101008678dbdcc3529a56d99a4238
parent4238ae5ce04e5ffc9016a116ff9c86afc5b4fae3 (diff)
fix linecount bug with comments spanning multiple lines
problem reported with the obvious fix for bgpd by Sebastian Benoit <benoit-lists at fb12.de>, also PR 6432 applied to all the others by yours truly. ok theo isn't it amazing how far this parser (and more) spread?
-rw-r--r--sbin/iked/parse.y7
-rw-r--r--sbin/ipsecctl/parse.y7
-rw-r--r--sbin/pfctl/parse.y7
-rw-r--r--usr.sbin/bgpd/parse.y7
-rw-r--r--usr.sbin/btctl/parse.y7
-rw-r--r--usr.sbin/btd/parse.y7
-rw-r--r--usr.sbin/dvmrpd/parse.y7
-rw-r--r--usr.sbin/hostapd/parse.y7
-rw-r--r--usr.sbin/ifstated/parse.y7
-rw-r--r--usr.sbin/ldapd/parse.y7
-rw-r--r--usr.sbin/ldpd/parse.y7
-rw-r--r--usr.sbin/ntpd/parse.y7
-rw-r--r--usr.sbin/ospf6d/parse.y7
-rw-r--r--usr.sbin/ospfd/parse.y7
-rw-r--r--usr.sbin/relayd/parse.y7
-rw-r--r--usr.sbin/ripd/parse.y7
-rw-r--r--usr.sbin/smtpd/parse.y7
-rw-r--r--usr.sbin/snmpd/parse.y7
-rw-r--r--usr.sbin/ypldap/parse.y7
19 files changed, 76 insertions, 57 deletions
diff --git a/sbin/iked/parse.y b/sbin/iked/parse.y
index a5d9b7db4f1..6f64fa039de 100644
--- a/sbin/iked/parse.y
+++ b/sbin/iked/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.10 2010/07/22 17:16:45 jsg Exp $ */
+/* $OpenBSD: parse.y,v 1.11 2010/08/03 18:42:40 henning Exp $ */
/* $vantronix: parse.y,v 1.22 2010/06/03 11:08:34 reyk Exp $ */
/*
@@ -1128,9 +1128,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y
index 405323c0967..13e33fc845d 100644
--- a/sbin/ipsecctl/parse.y
+++ b/sbin/ipsecctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.147 2010/05/10 02:00:50 krw Exp $ */
+/* $OpenBSD: parse.y,v 1.148 2010/08/03 18:42:40 henning Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1132,9 +1132,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 8dbdfded120..19d7aa275a7 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.590 2010/07/03 02:28:57 mcbride Exp $ */
+/* $OpenBSD: parse.y,v 1.591 2010/08/03 18:42:40 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -5309,9 +5309,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index 6ec94d8f758..04ed72eb245 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.256 2010/06/27 19:53:34 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.257 2010/08/03 18:42:40 henning Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -2364,9 +2364,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/btctl/parse.y b/usr.sbin/btctl/parse.y
index 3158896b901..b84121ba343 100644
--- a/usr.sbin/btctl/parse.y
+++ b/usr.sbin/btctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.6 2009/03/31 21:03:48 tobias Exp $ */
+/* $OpenBSD: parse.y,v 1.7 2010/08/03 18:42:40 henning Exp $ */
/*
* Copyright (c) 2008 Uwe Stuehler <uwe@openbsd.org>
@@ -395,9 +395,10 @@ yylex(void)
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/btd/parse.y b/usr.sbin/btd/parse.y
index a4f3a2d2c01..1cfda6aa29f 100644
--- a/usr.sbin/btd/parse.y
+++ b/usr.sbin/btd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.2 2008/11/25 17:13:53 uwe Exp $ */
+/* $OpenBSD: parse.y,v 1.3 2010/08/03 18:42:40 henning Exp $ */
/*
* Copyright (c) 2008 Uwe Stuehler <uwe@openbsd.org>
@@ -367,9 +367,10 @@ yylex(void)
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/dvmrpd/parse.y b/usr.sbin/dvmrpd/parse.y
index 69fa220181c..baf05e6302a 100644
--- a/usr.sbin/dvmrpd/parse.y
+++ b/usr.sbin/dvmrpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.20 2009/09/04 13:11:45 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.21 2010/08/03 18:42:40 henning Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -557,9 +557,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/hostapd/parse.y b/usr.sbin/hostapd/parse.y
index ed1fcb6ec44..85222f1bdc2 100644
--- a/usr.sbin/hostapd/parse.y
+++ b/usr.sbin/hostapd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.42 2010/01/11 03:55:21 deraadt Exp $ */
+/* $OpenBSD: parse.y,v 1.43 2010/08/03 18:42:40 henning Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Reyk Floeter <reyk@openbsd.org>
@@ -1476,9 +1476,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/ifstated/parse.y b/usr.sbin/ifstated/parse.y
index e2070a3b9b4..24875a72f51 100644
--- a/usr.sbin/ifstated/parse.y
+++ b/usr.sbin/ifstated/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.29 2009/03/31 21:03:48 tobias Exp $ */
+/* $OpenBSD: parse.y,v 1.30 2010/08/03 18:42:40 henning Exp $ */
/*
* Copyright (c) 2004 Ryan McBride <mcbride@openbsd.org>
@@ -556,9 +556,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/ldapd/parse.y b/usr.sbin/ldapd/parse.y
index e198c1988e1..abc07460f8a 100644
--- a/usr.sbin/ldapd/parse.y
+++ b/usr.sbin/ldapd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.8 2010/06/30 22:16:53 martinh Exp $ */
+/* $OpenBSD: parse.y,v 1.9 2010/08/03 18:42:40 henning Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martinh@openbsd.org>
@@ -609,9 +609,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/ldpd/parse.y b/usr.sbin/ldpd/parse.y
index ed37192e441..52a3c0688c5 100644
--- a/usr.sbin/ldpd/parse.y
+++ b/usr.sbin/ldpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.5 2010/06/21 19:41:44 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.6 2010/08/03 18:42:40 henning Exp $ */
/*
* Copyright (c) 2004, 2005, 2008 Esben Norby <norby@openbsd.org>
@@ -521,9 +521,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/ntpd/parse.y b/usr.sbin/ntpd/parse.y
index 35432d607c4..5751682bafc 100644
--- a/usr.sbin/ntpd/parse.y
+++ b/usr.sbin/ntpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.46 2009/03/31 21:03:48 tobias Exp $ */
+/* $OpenBSD: parse.y,v 1.47 2010/08/03 18:42:40 henning Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -468,9 +468,10 @@ yylex(void)
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/ospf6d/parse.y b/usr.sbin/ospf6d/parse.y
index 656727d0e8a..ec85caf7abd 100644
--- a/usr.sbin/ospf6d/parse.y
+++ b/usr.sbin/ospf6d/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.17 2010/07/01 19:47:04 bluhm Exp $ */
+/* $OpenBSD: parse.y,v 1.18 2010/08/03 18:42:41 henning Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
@@ -714,9 +714,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/ospfd/parse.y b/usr.sbin/ospfd/parse.y
index e9bc7cd5a92..01f91be2a01 100644
--- a/usr.sbin/ospfd/parse.y
+++ b/usr.sbin/ospfd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.71 2010/03/24 07:18:39 gollo Exp $ */
+/* $OpenBSD: parse.y,v 1.72 2010/08/03 18:42:41 henning Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
@@ -912,9 +912,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y
index edd24e2ae90..3f235081565 100644
--- a/usr.sbin/relayd/parse.y
+++ b/usr.sbin/relayd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.144 2010/08/01 22:18:35 sthen Exp $ */
+/* $OpenBSD: parse.y,v 1.145 2010/08/03 18:42:41 henning Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -1945,9 +1945,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/ripd/parse.y b/usr.sbin/ripd/parse.y
index f60569c2200..8cb73eec7dc 100644
--- a/usr.sbin/ripd/parse.y
+++ b/usr.sbin/ripd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.27 2009/09/26 18:24:58 michele Exp $ */
+/* $OpenBSD: parse.y,v 1.28 2010/08/03 18:42:41 henning Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -581,9 +581,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y
index 1bdce823ed0..8605a94d8fe 100644
--- a/usr.sbin/smtpd/parse.y
+++ b/usr.sbin/smtpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.63 2010/06/10 19:34:51 chl Exp $ */
+/* $OpenBSD: parse.y,v 1.64 2010/08/03 18:42:41 henning Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -1237,9 +1237,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/snmpd/parse.y b/usr.sbin/snmpd/parse.y
index a5fe7e23e8f..109fdfc70a4 100644
--- a/usr.sbin/snmpd/parse.y
+++ b/usr.sbin/snmpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.17 2009/03/31 21:03:49 tobias Exp $ */
+/* $OpenBSD: parse.y,v 1.18 2010/08/03 18:42:41 henning Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net>
@@ -563,9 +563,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';
diff --git a/usr.sbin/ypldap/parse.y b/usr.sbin/ypldap/parse.y
index 5264bf42506..d70e821eb1e 100644
--- a/usr.sbin/ypldap/parse.y
+++ b/usr.sbin/ypldap/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.8 2009/03/31 21:03:49 tobias Exp $ */
+/* $OpenBSD: parse.y,v 1.9 2010/08/03 18:42:41 henning Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -538,9 +538,10 @@ top:
return (0);
if (next == quotec || c == ' ' || c == '\t')
c = next;
- else if (next == '\n')
+ else if (next == '\n') {
+ file->lineno++;
continue;
- else
+ } else
lungetc(next);
} else if (c == quotec) {
*p = '\0';