aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorokan2010-09-25 20:02:58 +0000
committerokan2010-09-25 20:02:58 +0000
commite618422f4f3745ddbf70319fed20bbcbe35a239b (patch)
tree7fa5c57f188cf54071d3c04730a17881e42b2b12
parent4a690302db9e371e0a2332983bf1862727c3760f (diff)
downloadcwm-e618422f4f3745ddbf70319fed20bbcbe35a239b.tar.gz
picked a henning diff from src - original log:
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 ok oga@
-rw-r--r--parse.y7
1 files changed, 4 insertions, 3 deletions
diff --git a/parse.y b/parse.y
index 7a89663..e106298 100644
--- a/parse.y
+++ b/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.25 2010/01/27 03:04:50 okan Exp $ */
+/* $OpenBSD: parse.y,v 1.26 2010/09/25 20:02:58 okan Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -366,9 +366,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';