Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

srclines: added support for .dasc files (DynASM source files); also s…

…trip the code within #if (DDEBUG) and #endif.
  • Loading branch information...
commit fe0cb6b6d750f2705d0eef9979c5512b0e5f3cad 1 parent 37ff4c1
@agentzh agentzh authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 srclines
View
9 srclines
@@ -22,11 +22,16 @@ for my $file (@ARGV) {
$src =~ s/^\s+--.*//gm;
$src =~ s/^\s*\n//gm;
- } elsif ($ext =~ /^(?:[ch]|cc|cpp|y)$/) {
- $src =~ s{^\#[ \t]*if[ \t]+(?:0|\(?NGX_DEBUG\)?)[ \t]*\n.*?\n\#endif\b.*?\n}{}gms;
+ } elsif ($ext =~ /^(?:[ch]|cc|cpp|y|dasc)$/) {
+ $src =~ s{^\#[ \t]*if[ \t]+(?:0|\(?(?:DDEBUG|NGX_DEBUG)\)?)[ \t]*\n.*?\n\#endif\b.*?\n}{}gms;
$src =~ s{/\*.*?\*/}{}gs;
$src =~ s{//[^\n]*}{}gs;
$src =~ s{^\s*dd\(".*\n}{}gm;
+
+ if ($ext eq 'dasc') {
+ $src =~ s/^[ \t]*\|[ \t]*$//mgs;
+ }
+
$src =~ s/^\s*\n//gm;
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.