aboutsummaryrefslogtreecommitdiff
path: root/openssl/vendor/0.9.8d/util/err-ins.pl
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2006-10-09 16:00:16 +0000
committerRob Austein <sra@hactrn.net>2006-10-09 16:00:16 +0000
commiteb9264fc2ef786e8c4e3d430834b9b9e9e0b9c0a (patch)
treea72b0dcff12c4934f29502390553f0b2305b05fa /openssl/vendor/0.9.8d/util/err-ins.pl
parent3a6e89edc0a52c58e2c08d3de4e360de777f14a7 (diff)
OpenSSL 0.9.8d base code import
svn path=/openssl/vendor/0.9.8d/CHANGES; revision=373
Diffstat (limited to 'openssl/vendor/0.9.8d/util/err-ins.pl')
-rwxr-xr-xopenssl/vendor/0.9.8d/util/err-ins.pl33
1 files changed, 33 insertions, 0 deletions
diff --git a/openssl/vendor/0.9.8d/util/err-ins.pl b/openssl/vendor/0.9.8d/util/err-ins.pl
new file mode 100755
index 00000000..31b70df8
--- /dev/null
+++ b/openssl/vendor/0.9.8d/util/err-ins.pl
@@ -0,0 +1,33 @@
+#!/usr/local/bin/perl
+#
+# tack error codes onto the end of a file
+#
+
+open(ERR,$ARGV[0]) || die "unable to open error file '$ARGV[0]':$!\n";
+@err=<ERR>;
+close(ERR);
+
+open(IN,$ARGV[1]) || die "unable to open header file '$ARGV[1]':$!\n";
+
+@out="";
+while (<IN>)
+ {
+ push(@out,$_);
+ last if /BEGIN ERROR CODES/;
+ }
+close(IN);
+
+open(OUT,">$ARGV[1]") || die "unable to open header file '$ARGV[1]':$1\n";
+print OUT @out;
+print OUT @err;
+print OUT <<"EOF";
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+EOF
+close(OUT);
+
+