Add EC_GROUP_order_bits, EC_GROUP_get0_order and EC_GROUP_get0_cofactor
[openssl.git] / util / dofile.pl
index 74d1520ed0f67063510948ba432fc2563bb60188..780759b97c455a13de3f555922944a6ddf930731 100644 (file)
@@ -8,6 +8,8 @@
 use strict;
 use warnings;
 
+use Getopt::Std;
+
 # Because we know that Text::Template isn't a core Perl module, we use
 # a fallback in case it's not installed on the system
 use File::Basename;
@@ -74,6 +76,19 @@ sub broken {
     undef;
 }
 
+# Check options ######################################################
+
+my %opts = ();
+
+# -o ORIGINATOR
+#              declares ORIGINATOR as the originating script.
+getopt('o', \%opts);
+
+my @autowarntext = ("WARNING: do not edit!",
+                   "Generated"
+                   . (defined($opts{o}) ? " by ".$opts{o} : "")
+                   . (scalar(@ARGV) > 0 ? " from ".join(", ",@ARGV) : ""));
+
 # Template reading ###################################################
 
 # Read in all the templates into $text, while keeping track of each
@@ -83,7 +98,7 @@ sub broken {
 my $prev_linecount = 0;
 my $text =
     @ARGV
-    ? join("", map { my $x = my $y = Text::Template::_load_text($_);
+    ? join("", map { my $x = Text::Template::_load_text($_);
                      my $linecount = $x =~ tr/\n//;
                      $prev_linecount = ($linecount += $prev_linecount);
                      $lines{$linecount} = $_;
@@ -99,6 +114,8 @@ my $template = Text::Template->new(TYPE => 'STRING', SOURCE => $text );
 $template->fill_in(OUTPUT => \*STDOUT,
                    HASH => { config => \%config,
                              target => \%target,
+                             withargs => \%withargs,
+                             autowarntext => \@autowarntext,
                              quotify1 => \&quotify1,
                              quotify_l => \&quotify_l },
                    DELIMITERS => [ "{-", "-}" ],