diff --git a/cf/make-proto.pl b/cf/make-proto.pl index b89ef7906..f62fb4cd0 100644 --- a/cf/make-proto.pl +++ b/cf/make-proto.pl @@ -100,13 +100,16 @@ while(<>) { s/^\s*//; s/\s*$//; s/\s+/ /g; - if($_ =~ /\)$/){ + if($_ =~ /\)$/ or $_ =~ /DEPRECATED$/){ if(!/^static/ && !/^PRIVATE/){ - if(/(.*)(__attribute__\s?\(.*\))/) { - $attr = $2; + $attr = ""; + if(m/(.*)(__attribute__\s?\(.*\))/) { + $attr .= " $2"; + $_ = $1; + } + if(m/(.*)\s(\w+DEPRECATED)/) { + $attr .= " $2"; $_ = $1; - } else { - $attr = ""; } # remove outer () s/\s*\(/