summary refs log blame commit diff stats
path: root/data/misc/htm.desktop.in
blob: 0971ac77fba4289d309faf203862937b35c24fd4 (plain) (tree)
generated by cgit-pink 1.4.1 (git 2.36.1) at 2025-01-20 13:02:49 +0000
lose $file; return toc(@file); } sub toc { my @lines = @_; for( @lines ) { if( /^\s*$/s ) { $_ = qq{"\\n"\n}; next; } if( /^\s*#/ ) { $_ = qq{"\\n"\n}; next; } s/\\/\\\\/g; # double the number of \'s s/"/\\"/g; s/^\s*/"/; s/\n/\\n"\n/; } return @lines; } for my $files ( [ "xchat.pm.h", # output file "lib/Xchat.pm", # input files "lib/Xchat/Embed.pm", "lib/Xchat/List/Network.pm", "lib/Xchat/List/Network/Entry.pm", "lib/Xchat/List/Network/AutoJoin.pm", ], [ "irc.pm.h", # output file "lib/IRC.pm" # input file ] ) { my ($output,@inputs) = @$files; open my $header, ">", $output or die "Couldn't open '$output': $!"; for my $input ( @inputs ) { print $header qq["{\\n"\n]; print $header qq{"#line 1 \\"$input\\"\\n"\n}; print $header header( $input ); print $header qq["}\\n"\n]; } close $header; }