From: Sven Eden Date: Thu, 19 Apr 2018 16:14:50 +0000 (+0200) Subject: check_tree.pl : Enhance XML handling. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=1bb105bedc51550679554127a5bff8f991d26ef2;p=elogind.git check_tree.pl : Enhance XML handling. --- diff --git a/pwx/check_tree.pl b/pwx/check_tree.pl index 509f3e309..5d8303997 100755 --- a/pwx/check_tree.pl +++ b/pwx/check_tree.pl @@ -912,7 +912,7 @@ sub check_masks { # Entering an elogind insert # --------------------------------------- if ( ( $$line =~ m/^-#if\s+1.+elogind/ ) - || ( $$line =~ m/\s*$/ ) ) { + || ( $$line =~ m/\s*$/ ) ) { $in_mask_block and return hunk_failed("check_masks: Insert start found while being in a mask block!"); $in_insert_block @@ -937,7 +937,7 @@ sub check_masks { # --------------------------------------- if ( $in_mask_block && !$regular_ifs && ( ( $$line =~ m/^-#else/ ) - || ( $$line =~ m/\s*$/ ) + || ( $$line =~ m/else\s+-->\s*$/ ) || ( $$line =~ m,\*\s+else\s+\*\*/\s*$, ) ) ) { substr($$line, 0, 1) = " "; ## Remove '-' $in_else_block = 1; @@ -948,7 +948,7 @@ sub check_masks { # --------------------------------------- # Note: The regex supports "#endif /** 0 **/", too. if ( ( $$line =~ m,^-#endif\s*/(?:[*/]+)\s*([01]), ) - || ( $$line =~ m,\s+//\s+([01])\s+-->\s*$, ) + || ( $$line =~ m,//\s+([01])\s+-->\s*$, ) || ( $$line =~ m,\*\s+//\s+([01])\s+\*\*/\s*$, ) ) { if (0 == $1) { (!$in_mask_block)