Lines Matching refs:line

375 			my $line = $_;
377 $line =~ s/\s*\n?$//g;
378 $line =~ s/^\s*//g;
380 next if ($line =~ m/^\s*#/);
381 next if ($line =~ m/^\s*$/);
382 next if ($line =~ m/, disabled/i);
384 $line =~ s/,.*$//;
386 my ($suspect, $fix) = split(/->/, $line);
441 for my $line (<$HASH>) {
442 $line =~ /^([0-9a-fA-F]{40,40}) (.*)$/;
576 my ($line) = @_;
579 $line =~ s/^.//;
580 $line = expand_tabs($line);
583 my ($white) = ($line =~ /^(\s*)/);
585 return (length($line), length($white));
600 my ($line) = @_;
610 $res = substr($line, 0, 1);
612 for ($off = 1; $off < length($line); $off++) {
613 $c = substr($line, $off, 1);
617 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '/*') {
624 if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
630 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') {
689 my $line = $linenr - 1;
712 for (; $remain > 0; $line++) {
713 last if (!defined $lines[$line]);
714 next if ($lines[$line] =~ /^-/);
717 $blk .= $lines[$line] . "\n";
719 $line++;
794 $line++;
807 $line, $remain + 1, $off - $loff + 1, $level);
884 my $line;
893 for ($line = $start; $remain > 0; $line++) {
894 next if ($rawlines[$line] =~ /^-/);
897 $blk .= $rawlines[$line];
900 if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
902 } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
904 } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
908 foreach my $c (split(//, $lines[$line])) {
924 push(@res, $rawlines[$line]);
973 my $line = $rawlines[$linenr - 1];
975 if ($linenr == $first_line and $line =~ m@^.\s*\*@) {
978 if ($line =~ m@/\*@) {
984 $current_comment .= $line . "\n" if ($in_comment);
985 if ($line =~ m@\*/@) {
1009 my $line;
1011 $line = $rawlines[$offset++];
1012 next if (defined($line) && $line =~ /^-/);
1016 return $line;
1249 my ($possible, $line) = @_;
1268 warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
1279 warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
1285 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
1290 warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1);
1411 my $line;
1414 $line = $rawline;
1462 $line = sanitise_line($rawline);
1464 push(@lines, $line);
1467 $realcnt-- if ($line =~ /^(?:\+| |$)/);
1480 foreach my $line (@lines) {
1486 if ($line=~/^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@/) {
1506 } elsif ($line =~ /^( |\+|$)/) {
1514 ($prevline, $stashline) = ($stashline, $line);
1534 if ($line =~ /^diff --git.*?(\S+)$/) {
1538 } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
1561 if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
1570 $line =~ /^\+#!\ *\/usr\/bin\/(?:env )?python$/) {
1575 if ($line =~ /^(?:rename|copy) (?:from|to) [\w\/\.\-]+\s*$/) {
1579 if ($line =~ /^(Author|From): .* via .*<qemu-\w+\@nongnu\.org>/) {
1584 if ($line =~ /^\s*signed-off-by:/i) {
1589 if (!($line =~ /^\s*Signed-off-by:/)) {
1593 if ($line =~ /^\s*signed-off-by:\S/i) {
1601 if ($line =~ /^\s*MAINTAINERS\s*\|/) {
1607 ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
1608 $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
1609 ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
1619 if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
1625 if (($realfile =~ /^$/ || $line =~ /^\+/) &&
1663 ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
1677 next if (!$hunk_line || $line =~ /^-/);
1704 if ($line =~ /^\+.*\015/) {
1725 if ($realfile =~ /trace-events$/ && $line =~ /^\+/) {
1748 if ($line =~ /^\+/ &&
1749 !($line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) &&
1766 …if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file…
1819 $line =~ /^\+[ \t]*$;/ && #leading comment
1843 if ($realcnt && $line =~ /.\s*\S/) {
1910 if ($line=~/\bswitch\s*\(.*\)/) {
1932 if ($line =~ /(.*)\b((?:if|while|for|switch)\s*\(|do\b|else\b)/ && $line !~ /^.\s*\#/) {
1976 if ($line =~ /while\s*\((0|false)\);/) {
1981 if ($line =~ /;;$/) {
1986 …if ($line =~ /\b(?:(?:if|while|for)\s*\(|do\b)/ && $line !~ /^.\s*#/ && $line !~ /\}\s*while\s*/) {
2072 my $opline = $line; $opline =~ s/^./ /;
2085 if ($line=~/^[^\+]/) {next;}
2089 if ($line =~ /^.\s*$Declare\s*$/) {
2091 } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
2098 if ($line =~ /^.\s*$Modifier\s*$/) {
2100 } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) {
2107 if ($line =~ /^.\s*\{/ &&
2126 if ($line =~ m{//} &&
2131 $line =~ s@//.*@@;
2135 if ($line =~ /^.$Type\s*$Ident\s*(?:\s+$Modifier)*\s*=\s*(0|NULL|false)\s*;/) {
2140 if ($line =~ /\bstatic\s.*=\s*(0|NULL|false)\s*;/) {
2147 if ($line =~ m{\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\)}) {
2162 } elsif ($line =~ m{\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident)}) {
2183 if (($line=~/$Type\s*$Ident\(.*\).*\s\{/) and
2184 !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
2189 if ($line =~ /^.\s*\{/ &&
2195 if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident)?(?:\s+$Ident)?[=\{]/) {
2205 while ($line =~ /(.*?\s)\[/g) {
2216 while ($line =~ /($Ident)\s+\(/g) {
2218 my $ctx_before = substr($line, 0, $-[1]);
2249 if (!($line=~/\#\s*include/)) {
2327 $line =~ /class/ && $realfile =~ /(\.cpp|\.h)$/) {
2394 if (($op eq '<' || $op eq '>') && $line =~ /<.*>/) {
2428 if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
2429 $line =~ /do\{/) {
2435 if ($line =~ /}(?!(?:,|;|\)))\S/) {
2440 if ($line =~ /\[\s/ && $line !~ /\[\s*$/) {
2443 if ($line =~ /\s\]/) {
2448 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
2449 $line !~ /for\s*\(\s+;/) {
2452 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
2453 $line !~ /for\s*\(.*;\s+\)/ &&
2454 $line !~ /:\s+\)/) {
2474 $line =~ /;$/) {
2482 if ($line =~ /^.\s*return\s*(E[A-Z]*)\s*;/) {
2489 if ($line =~ /^.\s*(Q(?:S?LIST|SIMPLEQ|TAILQ)_HEAD)\s*\(\s*[^,]/ &&
2490 $line !~ /^.typedef/) {
2495 if ($line=~/\b(if|while|for|switch)\(/) {
2501 if ($line =~ /do\s*(?!{)/) {
2520 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
2551 if ($line =~ /
2566 if ($line =~ /^.\s*(?:}\s*)?else\b(.*)/) {
2574 if ($line =~ /}\s*if\b/) {
2579 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
2580 $line !~ /\G(?:
2590 if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ and
2595 if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ and
2617 if ($line=~/\#\s*define.*\\\s$/) {
2625 $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
2716 if ($line =~ /(^.*)\b(?:if|while|for)\b/ &&
2717 $line !~ /\#\s*if/) {
2721 if ($line =~ /(\}.*?)$/) {
2724 if ($line !~ /else/) {
2725 print "APW: ALLOWED: pre<$pre> line<$line>\n"
2787 $line =~ /\b(if|while|for|else)\b/ &&
2788 $line !~ /\#\s*if/ &&
2789 $line !~ /\#\s*else/) {
2793 if (substr($line, 0, $-[0]) =~ /(\}\s*)$/) {
2796 if ($line !~ /else/) {
2797 print "APW: ALLOWED: pre<$pre> line<$line>\n"
2856 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/ &&
2857 $line !~ /sig_atomic_t/ &&
2864 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
2872 if ($line =~ /\bg_free\(\Q$expr\E\);/) {
2885 if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
2889 if ($line =~ /\b(smp_mb|smp_rmb|smp_wmb|smp_read_barrier_depends)\(/) {
2897 if ($line =~ m@^.\s*\#\s*if.*\b__@) {
2902 if ($line =~ /\b$Storage\b/ && $line !~ /^.\s*$Storage\b/) {
2908 if ($line =~ /\b$Type\s+$Inline\b/ ||
2909 $line =~ /\b$Inline\s+$Storage\b/) {
2914 if ($line =~ /\bsizeof\s*\(\s*\&/) {
2946 if ($line =~ /\*\s*\)\s*g_(try|)(m|re)alloc(0?)(_n)?\b/) {
2955 if ($line =~ /__FUNCTION__/) {
2960 if ($line =~ /\bg_strdup\s*\(\s*(basename|dirname)\s*\(/) {
2965 if ($line =~ /\bg_memdup\s*\(/) {
2970 if ($line =~ /\b(strto[^kd].*?)\s*\(/) {
2974 if ($line =~ /\bsignal\s*\(/ && !($line =~ /SIG_(?:IGN|DFL)/)) {
2978 if ($realfile =~ /.*\/hw\/.*/ && $line =~ /\bqemu_bh_new\s*\(/) {
2982 if ($realfile =~ /.*\/hw\/.*/ && $line =~ /\baio_bh_new\s*\(/) {
2986 if ($line =~ /^module_init\s*\(/) {
3010 if ($line !~ /\bconst\b/ &&
3011 $line =~ /\b($struct_ops)\b.*=/) {
3018 while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
3084 if ($line =~ /\bffs\(/) {
3087 if ($line =~ /\bffsl\(/) {
3090 if ($line =~ /\bffsll\(/) {
3093 if ($line =~ /\bbzero\(/) {
3096 if ($line =~ /\bgetpagesize\(\)/) {
3099 if ($line =~ /\bsysconf\(_SC_PAGESIZE\)/) {
3102 if ($line =~ /\b(g_)?assert\(0\)/) {
3105 if ($line =~ /\bstrerrorname_np\(/) {
3126 $line =~ /\b(?:$non_exit_glib_asserts)\(/) {