From 8daa83a594a2e98f39d764422bfbdbc62c9efd44 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 19:20:00 +0200 Subject: Adding upstream version 2:4.20.0+dfsg. Signed-off-by: Daniel Baumann --- third_party/heimdal/lib/hcrypto/libtommath/gen.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 third_party/heimdal/lib/hcrypto/libtommath/gen.pl (limited to 'third_party/heimdal/lib/hcrypto/libtommath/gen.pl') diff --git a/third_party/heimdal/lib/hcrypto/libtommath/gen.pl b/third_party/heimdal/lib/hcrypto/libtommath/gen.pl new file mode 100644 index 0000000..332994d --- /dev/null +++ b/third_party/heimdal/lib/hcrypto/libtommath/gen.pl @@ -0,0 +1,20 @@ +#!/usr/bin/perl -w +# +# Generates a "single file" you can use to quickly +# add the whole source without any makefile troubles +# +use strict; +use warnings; + +open(my $out, '>', 'mpi.c') or die "Couldn't open mpi.c for writing: $!"; +foreach my $filename (glob 'bn*.c') { + open(my $src, '<', $filename) or die "Couldn't open $filename for reading: $!"; + print {$out} "/* Start: $filename */\n"; + print {$out} $_ while <$src>; + print {$out} "\n/* End: $filename */\n\n"; + close $src or die "Error closing $filename after reading: $!"; +} +print {$out} "\n/* EOF */\n"; +close $out or die "Error closing mpi.c after writing: $!"; + +system('perl -pli -e "s/\s*$//" mpi.c'); -- cgit v1.2.3