diff options
author | Rich Salz <rsalz@openssl.org> | 2016-11-13 07:00:44 +0100 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-11-17 02:11:50 +0100 |
commit | 71a8b85574aefaad93e4fe50ed2fc7a5923c6b29 (patch) | |
tree | 92ac3b45702d0039655195b6fae519a988efeb91 /util/find-undoc-api.pl | |
parent | Move SCT_LIST_free definition into a more logical place (diff) | |
download | openssl-71a8b85574aefaad93e4fe50ed2fc7a5923c6b29.tar.xz openssl-71a8b85574aefaad93e4fe50ed2fc7a5923c6b29.zip |
Merge find-undoc-api into find-doc-nits
Use \b on NOEXIST and EXPORT_VAR_AS_FUNC patterns as suggested by Andy.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1912)
Diffstat (limited to '')
-rwxr-xr-x | util/find-undoc-api.pl | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/util/find-undoc-api.pl b/util/find-undoc-api.pl deleted file mode 100755 index 585ccc4b62..0000000000 --- a/util/find-undoc-api.pl +++ /dev/null @@ -1,79 +0,0 @@ -#! /usr/bin/env perl -# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. -# -# Licensed under the OpenSSL license (the "License"). You may not use -# this file except in compliance with the License. You can obtain a copy -# in the file LICENSE in the source distribution or at -# https://www.openssl.org/source/license.html - -use strict; -use warnings; - -use File::Spec::Functions; -use File::Basename; -#use File::Copy; -#use File::Path; -use lib catdir(dirname($0), "perl"); -use OpenSSL::Util::Pod; - -my %dups; - -sub parsenum() -{ - my $file = shift; - my @apis; - - open my $IN, '<', $file - or die "Can't open $file, $!, stopped"; - - while ( <$IN> ) { - next if /\sNOEXIST/; - next if /EXPORT_VAR_AS_FUNC/; - push @apis, $1 if /([^\s]+).\s/; - } - - close $IN; - - print "# Found ", scalar(@apis), " in $file\n"; - return sort @apis; -} - -sub getdocced() -{ - my $dir = shift; - my %return; - - foreach my $pod ( glob("$dir/*.pod") ) { - my %podinfo = extract_pod_info($pod); - foreach my $n ( @{$podinfo{names}} ) { - $return{$n} = $pod; - print "# Duplicate $n in $pod and $dups{$n}\n" - if defined $dups{$n} && $dups{$n} ne $pod; - $dups{$n} = $pod; - } - } - - return %return; -} - -my %docced = &getdocced('doc/man3'); - -sub printem() -{ - my $numfile = shift; - my $count = 0; - - foreach my $func ( &parsenum($numfile) ) { - next if $docced{$func}; - - # Skip ASN1 utilities - next if $func =~ /^ASN1_/; - - print $func, "\n"; - $count++; - } - print "# Found $count missing from $numfile\n\n"; -} - -&printem('util/libcrypto.num'); -&printem('util/libssl.num'); |