lkml.org 
[lkml]   [2008]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectWhy these dot chars in scripts/checkpatch.pl?
Andy,

Perhaps I'm loosing my magic regex pixie dust, but the dot '.' char
in the pattern "/^.#" in the following lines looks wrong to me, as if
one were trying to match pre-processor directives that were set in by
one character:

The command:

grep '^[^#].*\/\^\.#' scripts/checkpatch.pl

displays:

if ($res =~ /^.#\s*include\s+\<(.*)\>/) {
} elsif ($res =~ /^.#\s*(?:error|warning)\s+(.*)\b/) {
if ($line =~ /(.*)\b((?:if|while|for|switch)\s*\(|do\b|else\b)/ && $line !~ /^.#/) {
if ($line =~ /^.#\s*if\s+0\b/) {
if ($line =~ /^.#\s*(ifdef|ifndef|elif)\s\s+/) {
$line !~ /^.#\s*if\b.*\bNR_CPUS\b/ &&
$line !~ /^.#\s*define\b.*\bNR_CPUS\b/ &&

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.940.382.4214


\
 
 \ /
  Last update: 2008-04-28 22:35    [W:0.068 / U:1.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site