summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-02-04 03:31:34 +0000
committerDr. Stephen Henson <steve@openssl.org>2015-02-04 13:35:49 +0000
commitac7d33deec9a61ff4bdf3b6c89725b588a8917e7 (patch)
tree77d30ed8d69176b97ca0190e83316db3c8627128
parent6b7c68e0388e499a1c2846131fca7ffd7b3fa78f (diff)
downloadopenssl-new-ac7d33deec9a61ff4bdf3b6c89725b588a8917e7.tar.gz
Make objxref.pl output in correct format
Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 6922ddee1b7b1bddbe0d59a5bbdcf8ff39343434)
-rw-r--r--crypto/objects/objxref.pl37
1 files changed, 21 insertions, 16 deletions
diff --git a/crypto/objects/objxref.pl b/crypto/objects/objxref.pl
index 6c4c832ab2..35c06514b9 100644
--- a/crypto/objects/objxref.pl
+++ b/crypto/objects/objxref.pl
@@ -62,30 +62,36 @@ $pname =~ s|^.[^/]/||;
print <<EOF;
/* AUTOGENERATED BY $pname, DO NOT EDIT */
-typedef struct
- {
- int sign_id;
- int hash_id;
- int pkey_id;
- } nid_triple;
+typedef struct {
+ int sign_id;
+ int hash_id;
+ int pkey_id;
+} nid_triple;
-static const nid_triple sigoid_srt[] =
- {
+static const nid_triple sigoid_srt[] = {
EOF
foreach (@srt1)
{
my $xr = $_;
my ($p1, $p2) = @{$xref_tbl{$_}};
- print "\t{NID_$xr, NID_$p1, NID_$p2},\n";
- }
+ my $o1 = " {NID_$xr, NID_$p1,";
+ my $o2 = "NID_$p2},";
+ if (length("$o1 $o2") < 78)
+ {
+ print "$o1 $o2\n";
+ }
+ else
+ {
+ print "$o1\n $o2\n";
+ }
+ }
-print "\t};";
+print "};";
print <<EOF;
-static const nid_triple * const sigoid_srt_xref[] =
- {
+static const nid_triple *const sigoid_srt_xref[] = {
EOF
foreach (@srt2)
@@ -94,10 +100,10 @@ foreach (@srt2)
# If digest or signature algorithm is "undef" then the algorithm
# needs special handling and is excluded from the cross reference table.
next if $p1 eq "undef" || $p2 eq "undef";
- print "\t\&sigoid_srt\[$x\],\n";
+ print " \&sigoid_srt\[$x\],\n";
}
-print "\t};\n\n";
+print "};\n";
sub check_oid
{
@@ -107,4 +113,3 @@ sub check_oid
die "Not Found \"$chk\"\n";
}
}
-