#!/usr/bin/env perl1#***************************************************************************2# _ _ ____ _3# Project ___| | | | _ \| |4# / __| | | | |_) | |5# | (__| |_| | _ <| |___6# \___|\___/|_| \_\_____|7#8# Copyright (C) Daniel Stenberg, <[email protected]>, et al.9#10# This software is licensed as described in the file COPYING, which11# you should have received as part of this distribution. The terms12# are also available at https://curl.se/docs/copyright.html.13#14# You may opt to use, copy, modify, merge, publish, distribute and/or sell15# copies of the Software, and permit persons to whom the Software is16# furnished to do so, under the terms of the COPYING file.17#18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY19# KIND, either express or implied.20#21# SPDX-License-Identifier: curl22#23###########################################################################2425my $varname = "var";26if($ARGV[0] eq "--var") {27shift;28$varname = shift @ARGV;29}3031my $varname_upper = uc($varname);3233print <<HEAD34/*35* NEVER EVER edit this manually, fix the mk-file-embed.pl script instead!36*/37/* !checksrc! disable COPYRIGHT all */38#ifndef CURL_DECLARED_${varname_upper}39#define CURL_DECLARED_${varname_upper}40extern const unsigned char ${varname}[];41#endif42const unsigned char ${varname}[] = {43HEAD44;4546while (<STDIN>) {47my $line = $_;48foreach my $n (split //, $line) {49my $ord = ord($n);50printf("%s,", $ord);51if($ord == 10) {52printf("\n");53}54}55}5657print <<ENDLINE58059};60ENDLINE61;626364