diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2010-09-25 20:02:59 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2010-09-25 20:02:59 +0000 |
commit | 2eee3a9c2a5380709cb5f5c31a09f2311d8caebe (patch) | |
tree | a5adc9fa3e408c2a0b7f045025b17cdd1274da1e /app/cwm/parse.y | |
parent | 82093b1dcf5fd135cb133608ededa5a371fe80d6 (diff) |
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@
Diffstat (limited to 'app/cwm/parse.y')
-rw-r--r-- | app/cwm/parse.y | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/cwm/parse.y b/app/cwm/parse.y index 7a89663e9..e10629814 100644 --- a/app/cwm/parse.y +++ b/app/cwm/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'; |