From 836b47cb7e99a977c5a23b059ca1d0b5065d310e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 24 Jul 2024 11:54:23 +0200 Subject: Merging upstream version 1.46.3. Signed-off-by: Daniel Baumann --- web/server/h2o/libh2o/misc/makedoc.pl | 69 ----------------------------------- 1 file changed, 69 deletions(-) delete mode 100755 web/server/h2o/libh2o/misc/makedoc.pl (limited to 'web/server/h2o/libh2o/misc/makedoc.pl') diff --git a/web/server/h2o/libh2o/misc/makedoc.pl b/web/server/h2o/libh2o/misc/makedoc.pl deleted file mode 100755 index b02553618..000000000 --- a/web/server/h2o/libh2o/misc/makedoc.pl +++ /dev/null @@ -1,69 +0,0 @@ -#! /usr/bin/env perl - -use strict; -use warnings; -no warnings qw(once); - -use File::Basename qw(dirname); -use File::Path qw(mkpath); -use Scalar::Util qw(looks_like_number); -use Text::MicroTemplate qw(build_mt render_mt encoded_string); -use Text::MicroTemplate::File; - -my $mt = Text::MicroTemplate::File->new( - include_path => [ qw(../srcdoc/snippets .) ], -); - -die "Usage: $0 \n" - unless @ARGV == 2; - -my ($src_file, $dst_file) = @ARGV; - -$main::context = { - filename => $dst_file, - code => build_mt( - '
', - ), - example => build_mt(<<'EOT', -
-
Example.
-
-
-EOT - ), - directive => sub { - my %args = @_; - $mt->wrapper_file("directive.mt", \%args); - }, - mruby_method => sub { - my %args = @_; - $mt->wrapper_file("mruby_method.mt", \%args); - }, - notes => [], - note => sub { - my ($index, $html); - if (looks_like_number($_[0])) { - $index = $_[0] < 0 ? scalar(@{$main::context->{notes}}) + $_[0] : $_[0]; - $html = $main::context->{notes}->[$index]; - } else { - $index = scalar @{$main::context->{notes}}; - $html = $_[0]; - push @{$main::context->{notes}}, encoded_string($html); - } - my $alt = $html; - $alt =~ s/<.*?>//g; - return render_mt( - '', - $index + 1, - $alt, - ); - }, -}; -my $output = $mt->render_file($src_file); -mkpath(dirname($dst_file)); - -chmod 0666, $dst_file; -open my $dst_fh, '>:utf8', $dst_file - or die "failed to open file:$dst_file:$!"; -print $dst_fh $output; -close $dst_fh; -- cgit v1.2.3