| @@ -1,17 +1,17 @@ | | | @@ -1,17 +1,17 @@ |
1 | #!@PERL5@ | | 1 | #!@PERL5@ |
2 | # | | 2 | # |
3 | # $OpenBSD: mdoclint,v 1.13 2008/12/31 10:55:11 espie Exp $ | | 3 | # $OpenBSD: mdoclint,v 1.13 2008/12/31 10:55:11 espie Exp $ |
4 | # $NetBSD: mdoclint,v 1.1.1.1 2009/03/01 21:25:39 wiz Exp $ | | 4 | # $NetBSD: mdoclint,v 1.2 2009/03/02 10:24:54 wiz Exp $ |
5 | # | | 5 | # |
6 | # Copyright (c) 2001-2009 Thomas Klausner | | 6 | # Copyright (c) 2001-2009 Thomas Klausner |
7 | # All rights reserved. | | 7 | # All rights reserved. |
8 | # | | 8 | # |
9 | # Redistribution and use in source and binary forms, with or without | | 9 | # Redistribution and use in source and binary forms, with or without |
10 | # modification, are permitted provided that the following conditions | | 10 | # modification, are permitted provided that the following conditions |
11 | # are met: | | 11 | # are met: |
12 | # 1. Redistributions of source code must retain the above copyright | | 12 | # 1. Redistributions of source code must retain the above copyright |
13 | # notice, this list of conditions and the following disclaimer. | | 13 | # notice, this list of conditions and the following disclaimer. |
14 | # 2. Redistributions in binary form must reproduce the above copyright | | 14 | # 2. Redistributions in binary form must reproduce the above copyright |
15 | # notice, this list of conditions and the following disclaimer in the | | 15 | # notice, this list of conditions and the following disclaimer in the |
16 | # documentation and/or other materials provided with the distribution. | | 16 | # documentation and/or other materials provided with the distribution. |
17 | # | | 17 | # |
| @@ -147,27 +147,27 @@ my $valid_date_re; | | | @@ -147,27 +147,27 @@ my $valid_date_re; |
147 | $arches_re = qr{(?:$a)}o; | | 147 | $arches_re = qr{(?:$a)}o; |
148 | if (OPENBSD) { | | 148 | if (OPENBSD) { |
149 | $sections_re = qr{(?:3p|[1-9])}o; | | 149 | $sections_re = qr{(?:3p|[1-9])}o; |
150 | $esections_re = qr{(?:3p|[0-9])}o; | | 150 | $esections_re = qr{(?:3p|[0-9])}o; |
151 | } | | 151 | } |
152 | if (NETBSD) { | | 152 | if (NETBSD) { |
153 | $sections_re = qr{[1-9]}o; | | 153 | $sections_re = qr{[1-9]}o; |
154 | $esections_re = qr{[0-9]}o; | | 154 | $esections_re = qr{[0-9]}o; |
155 | } | | 155 | } |
156 | if (OPENBSD) { | | 156 | if (OPENBSD) { |
157 | $valid_date_re = qr{\$Mdocdate\b}; | | 157 | $valid_date_re = qr{\$Mdocdate\b}; |
158 | } | | 158 | } |
159 | if (NETBSD) { | | 159 | if (NETBSD) { |
160 | $valid_date_re = qr{(?:January|February|March|April|May|June|July|August|September|October|November|December)\s*[1-9][0-9]*,\s*(?:198[0-9]|199[0-9]|200[012345678])$}o; | | 160 | $valid_date_re = qr{(?:January|February|March|April|May|June|July|August|September|October|November|December)\s*[1-9][0-9]*,\s*(?:198[0-9]|199[0-9]|200[0-9])$}o; |
161 | } | | 161 | } |
162 | } | | 162 | } |
163 | | | 163 | |
164 | sub debug | | 164 | sub debug |
165 | { | | 165 | { |
166 | my $self = shift; | | 166 | my $self = shift; |
167 | print STDOUT "debug: $self->{fn}:$self->{ln}: @_\n" if $opt_v; | | 167 | print STDOUT "debug: $self->{fn}:$self->{ln}: @_\n" if $opt_v; |
168 | } | | 168 | } |
169 | | | 169 | |
170 | sub warning | | 170 | sub warning |
171 | { | | 171 | { |
172 | my $self = shift; | | 172 | my $self = shift; |
173 | print STDOUT "$self->{fn}:$self->{current_section_header}:$self->{ln}: ", join('', @_), "\n"; | | 173 | print STDOUT "$self->{fn}:$self->{current_section_header}:$self->{ln}: ", join('', @_), "\n"; |