Dcoument -alpn flag
[openssl.git] / util / find-doc-nits.pl
index 69d7c93521363fc1cd3356c3de681b1cdea0268f..d9d16d698e60dffac6d5d3c51a5b23e7464871f8 100755 (executable)
@@ -68,10 +68,11 @@ sub name_synopsis()
     my $syn = $1;
     foreach my $line ( split /\n+/, $syn ) {
         my $sym;
-        $line =~ s/STACK_OF\([^)]+\)//;
+        $line =~ s/STACK_OF\([^)]+\)/int/g;
+        $line =~ s/__declspec\([^)]+\)//;
         if ( $line =~ /typedef.* (\S+);/ ) {
             $sym = $1;
-        } elsif ( $line =~ /#define (\S+)/ ) {
+        } elsif ( $line =~ /#define ([A-Za-z0-9_]+)/ ) {
             $sym = $1;
         } elsif ( $line =~ /([A-Za-z0-9_]+)\(/ ) {
             $sym = $1;
@@ -82,6 +83,10 @@ sub name_synopsis()
         print "$id $sym missing from NAME section\n"
             unless defined $names{$sym};
         $names{$sym} = 2;
+
+        # Do some sanity checks on the prototype.
+        print "$id prototype missing spaces around commas: $line\n"
+            if ( $line =~ /[a-z0-9],[^ ]/ );
     }
 
     foreach my $n ( keys %names ) {