[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
49-fyi-fix-autoscan-c-comments.patch
From: |
Akim Demaille |
Subject: |
49-fyi-fix-autoscan-c-comments.patch |
Date: |
Mon, 26 Nov 2001 11:49:29 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* bin/autoscan.in (scan_c_file): Fix the handling of C comments.
Before, having a line containing the opening of a multi line
comment made the whole line be ignored.
Index: bin/autoscan.in
--- bin/autoscan.in Wed, 14 Nov 2001 20:54:00 +0100 akim
+++ bin/autoscan.in Sat, 24 Nov 2001 18:43:17 +0100 akim
@@ -207,22 +207,21 @@ sub scan_c_file ($)
while ($_ = $file->getline)
{
- # Strip out comments, approximately.
- # Ending on this line.
- if ($in_comment && m,\*/,)
+ # Strip out comments.
+ if ($in_comment && s,^.*?\*/,,)
{
- s,.*\*/,,;
$in_comment = 0;
}
+ # The whole line is inside a commment.
+ next if $in_comment;
# All on one line.
- s,/\*.*\*/,,g;
+ s,/\*.*?\*/,,g;
+
# Starting on this line.
- if (m,/\*,)
+ if (s,/\*.*$,,)
{
$in_comment = 1;
}
- # Continuing on this line.
- next if $in_comment;
# Preprocessor directives.
if (/^\s*\#\s*include\s*<([^>]*)>/)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 49-fyi-fix-autoscan-c-comments.patch,
Akim Demaille <=