@ -5560,7 +5560,42 @@ sub process {
$ block =~ tr /\x1C/ / d ;
$ block =~ tr /\x1C/ / d ;
#print sprintf '%v02X', $block;
#print sprintf '%v02X', $block;
#print "\n";
#print "\n";
if ( $ level == 0 && $ block !~ /^\s*\{/ && ! $ allowed ) {
# Detect if the line is part of a macro
my $ is_macro = 0 ;
# Check if the current line is a single-line macro
if ( $ lines [ $ linenr ] =~ /^\+\s*#\s*define\b/ ) {
$ is_macro = 1 ;
} else {
# Dynamically check upward for multi-line macro
my $ i = $ linenr - 1 ;
while ( $ i >= 0 ) {
my $ line = $ lines [ $ i ] ;
last unless defined $ line ;
# Stop at non-added/context lines
last if $ line !~ /^[ +]/ ;
# If this is a macro definition line, we're inside a macro
if ( $ line =~ /^\+\s*#\s*define\b/ ) {
$ is_macro = 1 ;
last ;
}
# Check if previous line ends with backslash (i.e., continuation)
if ( $ i > 0 ) {
my $ prev_line = $ lines [ $ i - 1 ] ;
last if ! defined ( $ prev_line ) || $ prev_line !~ /\\\s*$/ ;
} else {
last ;
}
$ i - - ;
}
}
if ( $ level == 0 && $ block !~ /^\s*\{/ && ! $ allowed && ! $ is_macro ) {
my $ cnt = statement_rawlines ( $ block ) ;
my $ cnt = statement_rawlines ( $ block ) ;
my $ herectx = get_stat_here ( $ linenr , $ cnt , $ here ) ;
my $ herectx = get_stat_here ( $ linenr , $ cnt , $ here ) ;