make aware of DEPRECATED
authorLove Hörnquist Åstrand <lha@kth.se>
Sun, 11 Jan 2009 21:51:27 +0000 (21:51 +0000)
committerLove Hörnquist Åstrand <lha@kth.se>
Sun, 11 Jan 2009 21:51:27 +0000 (21:51 +0000)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24298 ec53bebd-3082-4978-b11e-865c3cabbd6b

cf/make-proto.pl

index b89ef790670b4b7fce0e306bc689e1359b4fd748..f62fb4cd0db43364e02fbcce5cf677ce5a6ef507 100644 (file)
@@ -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*\(/</;