Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105386
b: refs/heads/master
c: a3bb97a
h: refs/heads/master
v: v3
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Jul 24, 2008
1 parent 232de50 commit 2f67743
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ef9b297f6e8850da3be9c9ff5f00385c0977004
refs/heads/master: a3bb97a7aba36055d476896ed6393ab35a119d5b
23 changes: 11 additions & 12 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,9 @@ sub ctx_statement_block {
}
$off++;
}
# We are truly at the end, so shuffle to the next line.
if ($off == $len) {
$loff = $len + 1;
$line++;
$remain--;
}
Expand Down Expand Up @@ -1793,30 +1795,26 @@ sub process {
$lines[$ln - 1] =~ /^(?:-|..*\\$)/)
{
$ctx .= $rawlines[$ln - 1] . "\n";
$cnt-- if ($lines[$ln - 1] !~ /^-/);
$ln++;
$cnt--;
}
$ctx .= $rawlines[$ln - 1];

($dstat, $dcond, $ln, $cnt, $off) =
ctx_statement_block($linenr, $ln - $linenr + 1, 0);
#print "dstat<$dstat> dcond<$dcond> cnt<$cnt> off<$off>\n";
#print "LINE<$lines[$ln]> len<" . length($lines[$ln]) . "\n";
#print "LINE<$lines[$ln-1]> len<" . length($lines[$ln-1]) . "\n";

# Extract the remainder of the define (if any) and
# rip off surrounding spaces, and trailing \'s.
$rest = '';
if (defined $lines[$ln - 1] &&
$off > length($lines[$ln - 1]))
{
$ln++;
$cnt--;
$off = 0;
}
while ($cnt > 0) {
$rest .= substr($lines[$ln - 1], $off) . "\n";
while ($off != 0 || ($cnt > 0 && $rest =~ /(?:^|\\)\s*$/)) {
#print "ADDING $off <" . substr($lines[$ln - 1], $off) . ">\n";
if ($off != 0 || $lines[$ln - 1] !~ /^-/) {
$rest .= substr($lines[$ln - 1], $off) . "\n";
$cnt--;
}
$ln++;
$cnt--;
$off = 0;
}
$rest =~ s/\\\n.//g;
Expand Down Expand Up @@ -1847,6 +1845,7 @@ sub process {
DEFINE_PER_CPU|
__typeof__\(
}x;
#print "REST<$rest>\n";
if ($rest ne '') {
if ($rest !~ /while\s*\(/ &&
$dstat !~ /$exceptions/)
Expand Down

0 comments on commit 2f67743

Please sign in to comment.