Fix util/find-doc-nits to correctly parse function signature typedefs
authorRichard Levitte <levitte@openssl.org>
Mon, 9 Oct 2017 11:21:24 +0000 (13:21 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 9 Oct 2017 12:31:59 +0000 (14:31 +0200)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/4499)

util/find-doc-nits

index a5fc62f..aaf3eeb 100755 (executable)
@@ -105,7 +105,10 @@ sub name_synopsis()
             # environment variable env NAME=...
             $sym = $1;
         } elsif ( $line =~ /typedef.*\(\*(\S+)\)\(.*/ ) {
-            # a callback function: typedef ... (*NAME)(...
+            # a callback function pointer: typedef ... (*NAME)(...
+            $sym = $1;
+        } elsif ( $line =~ /typedef.* (\S+)\(.*/ ) {
+            # a callback function signature: typedef ... NAME(...
             $sym = $1;
         } elsif ( $line =~ /typedef.* (\S+);/ ) {
             # a simple typedef: typedef ... NAME;