]> mj.ucw.cz Git - libucw.git/commitdiff
Doc. system: detect function typedefs
authorMichal Vaner <vorner@ucw.cz>
Thu, 18 Sep 2008 12:28:23 +0000 (14:28 +0200)
committerMichal Vaner <vorner@ucw.cz>
Thu, 18 Sep 2008 12:28:23 +0000 (14:28 +0200)
things like
typedef function(void)
were considered functions, not types.

build/doc-extract
ucw/doc/def_index.txt

index dd01f4c42b7735c16709b224ee36f54bdb480e1e..2ef86026c50243f7244acf70f7e16b3a6695c62a 100755 (executable)
@@ -35,6 +35,7 @@ sub detect( $ ) {
                 return( '', 0, $_, $_ );
         }
         return( 'def', 0, $1, $_ ) if /#define\s+(\w+)/;
+       return( 'type', 1, $2, $_ ) if /^\s*typedef[^()]+?(\(\s*?\*\s*?)?(\w+)(\s*\))?\s*\(.*\)/;
         return( 'fun', 1, $2, $1 ) if /^(.*?(\w+)\([^{]*\)[^{]*)/;
        return( 'type', 1, $1, $_ ) if /^\s*typedef.*?(\w+);/;
         return( 'var', 1, $1, $_ ) if /\s(\w+);/;
index 43e8bbac016c18a42487b8275f30cdeec76ce279..786c1efe66b3f2e016aef885b0d47e19fca69ce5 100644 (file)
@@ -1,8 +1,9 @@
 All definitions in libucw
 =========================
 
-- <<enum,Enums>>
-- <<struct,Structs>>
+- <<enum,Enumerations>>
+- <<struct,Structures>>
+- <<type,Types>>
 - <<fun,Functions>>
 - <<var,Variables>>
 - <<def,Preprocessor definitions>>