From b6707c3bb53c931e9ec3c5c6630149b7121bbcf5 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Wed, 4 Nov 2015 18:55:36 +0100 Subject: Removed mongoose due to restricted license and webserver wip till code is restructured (nw) --- 3rdparty/mongoose/scripts/embed_binary_files.pl | 53 ------------------------- 1 file changed, 53 deletions(-) delete mode 100644 3rdparty/mongoose/scripts/embed_binary_files.pl (limited to '3rdparty/mongoose/scripts/embed_binary_files.pl') diff --git a/3rdparty/mongoose/scripts/embed_binary_files.pl b/3rdparty/mongoose/scripts/embed_binary_files.pl deleted file mode 100644 index cf75a0d254c..00000000000 --- a/3rdparty/mongoose/scripts/embed_binary_files.pl +++ /dev/null @@ -1,53 +0,0 @@ -# This program is used to embed arbitrary data into a C binary. It takes -# a list of files as an input, and produces a .c data file that contains -# contents of all these files as collection of char arrays. -# -# Usage: perl [file2, ...] > embedded_data.c - -foreach my $i (0 .. $#ARGV) { - open FD, '<:raw', $ARGV[$i] or die "Cannot open $ARGV[$i]: $!\n"; - printf("static const unsigned char v%d[] = {", $i); - my $byte; - my $j = 0; - while (read(FD, $byte, 1)) { - if (($j % 12) == 0) { - print "\n"; - } - printf ' %#04x,', ord($byte); - $j++; - } - print " 0x00\n};\n"; - close FD; -} - -print < -#include - -static const struct embedded_file { - const char *name; - const unsigned char *data; - size_t size; -} embedded_files[] = { -EOS - -foreach my $i (0 .. $#ARGV) { - print " {\"$ARGV[$i]\", v$i, sizeof(v$i) - 1},\n"; -} - -print <name != NULL; p++) { - if (!strcmp(p->name, name)) { - if (size != NULL) { *size = p->size; } - return (const char *) p->data; - } - } - return NULL; -} -EOS -- cgit v1.2.3-70-g09d2