CHARTYPE_FIRST_ESC_2253 CHARTYPE_LAST_ESC_2253 CHARTYPE_PRINTABLESTRING
)],
bn => [qw(
- BN_MUL_COMBA BN_RECURSION BN_SQR_COMBA
+ BN_BITS BN_BITS4 BN_BYTES
+ BN_DEC_CONV BN_DEC_FMT1 BN_DEC_FMT2 BN_DEC_NUM BN_LLONG BN_LONG
+ BN_MASK2 BN_MASK2h BN_MASK2h1 BN_MASK2l BN_MUL_COMBA
+ BN_RECURSION BN_SQR_COMBA BN_TBIT BN_ULLONG
)],
objects => [qw(
OBJ_bsearch OBJ_bsearch_ OBJ_bsearch_ex OBJ_bsearch_ex_
X509_algor_st
)],
bn => [qw(
- BN_set_params BN_get_params
+ BN_FLG_EXP_CONSTTIME BN_FLG_FREE BN_get_params
+ BN_HEX_FMT1 BN_HEX_FMT2 BN_MASK BN_set_params
)],
objects => [qw(
_DECLARE_OBJ_BSEARCH_CMP_FN
my $in_function = 0;
my $in_struct = 0;
my $in_typedef_struct = 0;
-my %undoc = ();
+my %expect_undoc = ();
+my %found_undoc = ();
my $verbose = 0;
if (defined $ARGV[0] && $ARGV[0] eq '-v') {
$hfile .= "/$ARGV[0].h";
open my $in_fh, '<', $hfile or die "$hfile: $!";
-$undoc{$_} = 1 foreach @{$internal{$ARGV[0]}};
-$undoc{$_} = 1 foreach @{$obsolete{$ARGV[0]}};
-$undoc{$_} = 1 foreach @{$postponed{$ARGV[0]}};
+$expect_undoc{$_} = 1 foreach @{$internal{$ARGV[0]}};
+$expect_undoc{$_} = 1 foreach @{$obsolete{$ARGV[0]}};
+$expect_undoc{$_} = 1 foreach @{$postponed{$ARGV[0]}};
while (<$in_fh>) {
try_again:
$in_typedef_struct = 0;
my ($id) = /^\s*(\w+);$/
or die "at end of typedef struct: $_";
- unless (system "$MANW -k Vt=$id > /dev/null 2>&1") {
+ unless (system "$MANW -k 'Vt~^$id\$' > /dev/null 2>&1") {
print "Vt $line\n" if $verbose;
next;
}
- if ($undoc{$id}) {
+ if ($expect_undoc{$id}) {
print "V- $line\n" if $verbose;
- delete $undoc{$id};
+ $found_undoc{$id} = 1;
next;
}
if ($verbose) {
if (my ($id) = /^#\s*define\s+(\w+)\s+\S/) {
/\\$/ and $in_define = 1;
- unless (system "$MANW -k Dv=$id > /dev/null 2>&1") {
+ if ($id eq 'BN_ULONG' &&
+ not system "$MANW -k 'Vt~^$id\$' > /dev/null 2>&1") {
+ print "Vt $line\n" if $verbose;
+ next;
+ }
+ unless (system "$MANW -k 'Dv~^$id\$' > /dev/null 2>&1") {
print "Dv $line\n" if $verbose;
next;
}
print "D- $line\n" if $verbose;
next;
}
- if ($undoc{$id}) {
+ if ($expect_undoc{$id}) {
print "D- $line\n" if $verbose;
- delete $undoc{$id};
+ $found_undoc{$id} = 1;
next;
}
if ($verbose) {
print "F- $line\n" if $verbose;
next;
}
- if ($undoc{$id}) {
+ if ($expect_undoc{$id}) {
print "F- $line\n" if $verbose;
- delete $undoc{$id};
+ $found_undoc{$id} = 1;
next;
}
if ($verbose) {
next;
}
if (my ($id) = /^#\s*define\s+(\w+)$/) {
- if ($undoc{$id}) {
+ if ($expect_undoc{$id}) {
print "-- $line\n" if $verbose;
- delete $undoc{$id};
+ $found_undoc{$id} = 1;
next;
}
if ($verbose) {
# Handle global variables.
if (my ($id) = /^extern\s+int\s+(\w+);$/) {
- unless (system "$MANW -k Va=$id > /dev/null 2>&1") {
+ unless (system "$MANW -k 'Va~^$id\$' > /dev/null 2>&1") {
print "Va $line\n" if $verbose;
next;
}
# Handle variable type declarations.
if (my ($id) = /^struct\s+(\w+);$/) {
- unless (system "$MANW -k Vt=$id > /dev/null 2>&1") {
+ unless (system "$MANW -k 'Vt~^$id\$' > /dev/null 2>&1") {
print "Vt $line\n" if $verbose;
next;
}
- if ($undoc{$id}) {
+ if ($expect_undoc{$id}) {
print "V- $line\n" if $verbose;
- delete $undoc{$id};
+ $found_undoc{$id} = 1;
next;
}
if ($verbose) {
}
if (my ($id) = /^typedef\s+(?:const\s+)?(?:struct\s+)?\S+\s+(\w+);$/) {
- unless (system "$MANW -k Vt=$id > /dev/null 2>&1") {
+ unless (system "$MANW -k 'Vt~^$id\$' > /dev/null 2>&1") {
print "Vt $line\n" if $verbose;
next;
}
- if ($undoc{$id}) {
+ if ($expect_undoc{$id}) {
print "V- $line\n" if $verbose;
- delete $undoc{$id};
+ $found_undoc{$id} = 1;
next;
}
if ($verbose) {
print "F- $line\n" if $verbose;
next;
}
- if ($undoc{$id}) {
+ if ($expect_undoc{$id}) {
print "F- $line\n" if $verbose;
- delete $undoc{$id};
+ $found_undoc{$id} = 1;
next;
}
if ($id =~ /^ASN1_PCTX_\w+$/) {
die "parse error: $_";
}
close $in_fh;
-warn "expected as undocumented but not found: $_" foreach keys %undoc;
+foreach (keys %expect_undoc) {
+ warn "expected as undocumented but not found: $_"
+ unless $found_undoc{$_};
+}
exit 0;