diff options
author | Ben Laurie <ben@openssl.org> | 2008-05-26 11:24:29 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2008-05-26 11:24:29 +0000 |
commit | 3c1d6bbc9242900af0e5db927fdcda38539bd54a (patch) | |
tree | 4d2effd34cdf6d1ec2258f22c86129644d64e03c /util/mkstack.pl | |
parent | cab14b980333d2383239e559302c739c9ec433ea (diff) |
LHASH revamp. make depend.
Diffstat (limited to 'util/mkstack.pl')
-rwxr-xr-x | util/mkstack.pl | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/util/mkstack.pl b/util/mkstack.pl index 2a968f395f..e3675763a9 100755 --- a/util/mkstack.pl +++ b/util/mkstack.pl @@ -21,7 +21,7 @@ while (@ARGV) { } -@source = (<crypto/*.[ch]>, <crypto/*/*.[ch]>, <ssl/*.[ch]>); +@source = (<crypto/*.[ch]>, <crypto/*/*.[ch]>, <ssl/*.[ch]>, <apps/*.[ch]>); foreach $file (@source) { next if -l $file; @@ -31,11 +31,16 @@ foreach $file (@source) { while(<IN>) { if (/^DECLARE_STACK_OF\(([^)]+)\)/) { push @stacklst, $1; - } if (/^DECLARE_ASN1_SET_OF\(([^)]+)\)/) { + } + if (/^DECLARE_ASN1_SET_OF\(([^)]+)\)/) { push @asn1setlst, $1; - } if (/^DECLARE_PKCS12_STACK_OF\(([^)]+)\)/) { + } + if (/^DECLARE_PKCS12_STACK_OF\(([^)]+)\)/) { push @p12stklst, $1; } + if (/^DECLARE_LHASH_OF\(([^)]+)\)/) { + push @lhashlst, $1; + } } close(IN); } @@ -108,6 +113,31 @@ EOF SKM_PKCS12_decrypt_d2i($type_thing, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq)) EOF } + + foreach $type_thing (sort @lhashlst) { + my $lc_tt = lc $type_thing; + $new_stackfile .= <<EOF; + +#define lh_${type_thing}_new() LHM_lh_new(${type_thing},${lc_tt}) +#define lh_${type_thing}_insert(lh,inst) LHM_lh_insert(${type_thing},lh,inst) +#define lh_${type_thing}_retrieve(lh,inst) LHM_lh_retrieve(${type_thing},lh,inst) +#define lh_${type_thing}_delete(lh,inst) LHM_lh_delete(${type_thing},lh,inst) +#define lh_${type_thing}_doall(lh,fn) LHM_lh_doall(${type_thing},lh,fn) +#define lh_${type_thing}_doall_arg(lh,fn,arg_type,arg) \\ + LHM_lh_doall_arg(${type_thing},lh,fn,arg_type,arg) +#define lh_${type_thing}_error(lh) LHM_lh_error(${type_thing},lh) +#define lh_${type_thing}_num_items(lh) LHM_lh_num_items(${type_thing},lh) +#define lh_${type_thing}_down_load(lh) LHM_lh_down_load(${type_thing},lh) +#define lh_${type_thing}_node_stats_bio(lh,out) \\ + LHM_lh_node_stats_bio(${type_thing},lh,out) +#define lh_${type_thing}_node_usage_stats_bio(lh,out) \\ + LHM_lh_node_usage_stats_bio(${type_thing},lh,out) +#define lh_${type_thing}_stats_bio(lh,out) \\ + LHM_lh_stats_bio(${type_thing},lh,out) +#define lh_${type_thing}_free(lh) LHM_lh_free(${type_thing},lh) +EOF + } + $new_stackfile .= "/* End of util/mkstack.pl block, you may now edit :-) */\n"; $inside_block = 2; } |