diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-05-02 16:41:35 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-05-02 16:41:35 (GMT) |
commit | 3d328008deedc58cd7a11c79063cefa7d662d4fc (patch) | |
tree | cb41a048885ce7b493f406360cf5f6edf689c468 /openssl/util/err-ins.pl | |
parent | 0a2b8b8e0bc2e91a9f10659b30e2e4f5b79ce692 (diff) | |
download | blt-3d328008deedc58cd7a11c79063cefa7d662d4fc.zip blt-3d328008deedc58cd7a11c79063cefa7d662d4fc.tar.gz blt-3d328008deedc58cd7a11c79063cefa7d662d4fc.tar.bz2 |
inital commit
Diffstat (limited to 'openssl/util/err-ins.pl')
-rwxr-xr-x | openssl/util/err-ins.pl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/openssl/util/err-ins.pl b/openssl/util/err-ins.pl new file mode 100755 index 0000000..31b70df --- /dev/null +++ b/openssl/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); + + |