#!/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###########################################################################2425use strict;26use warnings;2728my $varname = "var";29if(@ARGV && $ARGV[0] eq "--var") {30shift;31$varname = shift @ARGV;32}3334my $varname_upper = uc($varname);3536print <<HEAD37/*38* NEVER EVER edit this manually, fix the mk-file-embed.pl script instead!39*/40/* !checksrc! disable COPYRIGHT all */41#ifndef CURL_DECLARED_${varname_upper}42#define CURL_DECLARED_${varname_upper}43extern const unsigned char ${varname}[];44#endif45const unsigned char ${varname}[] = {46HEAD47;4849while(<STDIN>) {50my $line = $_;51foreach my $n (split //, $line) {52my $ord = ord($n);53printf("%s,", $ord);54if($ord == 10) {55printf("\n");56}57}58}5960print <<ENDLINE61062};63ENDLINE64;656667