aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2017-06-08 15:57:50 -0400
committerRich Salz <rsalz@openssl.org>2017-06-08 17:23:21 -0400
commit9a2dfc0febaf89403cdbd4bfdb2417fd3d055e95 (patch)
tree9485c0f939970622813e5b21502ac7f9404fd134
parent36c438514db71eba3e8062fef7869b9211630a19 (diff)
downloadopenssl-9a2dfc0febaf89403cdbd4bfdb2417fd3d055e95.tar.gz
List undocumented macros
The search is approximate; look only for those that look like functions. [skip ci] Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3641)
-rwxr-xr-xutil/find-doc-nits29
1 files changed, 29 insertions, 0 deletions
diff --git a/util/find-doc-nits b/util/find-doc-nits
index d016985950..8f6d482278 100755
--- a/util/find-doc-nits
+++ b/util/find-doc-nits
@@ -264,6 +264,34 @@ sub getdocced()
my %docced;
+sub checkmacros()
+{
+ my $count = 0;
+
+ print "# Checking macros (approximate)\n";
+ foreach my $f ( glob('include/openssl/*.h') ) {
+ # Skip some internals we don't want to document yet.
+ next if $f eq 'include/openssl/asn1.h';
+ next if $f eq 'include/openssl/asn1t.h';
+ next if $f eq 'include/openssl/err.h';
+ open(IN, $f) || die "Can't open $f, $!";
+ while ( <IN> ) {
+ next unless /^#\s*define\s*(\S+)\(/;
+ my $macro = $1;
+ next if $docced{$macro};
+ next if $macro =~ /i2d_/
+ || $macro =~ /d2i_/
+ || $macro =~ /DEPRECATEDIN/
+ || $macro =~ /IMPLEMENT_/
+ || $macro =~ /DECLARE_/;
+ print "$f:$macro\n";
+ $count++;
+ }
+ close(IN);
+ }
+ print "# Found $count macros missing (not all should be documnted)\n"
+}
+
sub printem()
{
my $libname = shift;
@@ -399,6 +427,7 @@ if ( $opt_u ) {
}
&printem('crypto', 'util/libcrypto.num');
&printem('ssl', 'util/libssl.num');
+ &checkmacros();
}
exit;