]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/boost_install/test/iostreams/bzip2-1.0.8/format.pl
3 # ------------------------------------------------------------------
4 # This file is part of bzip2/libbzip2, a program and library for
5 # lossless, block-sorting data compression.
7 # bzip2/libbzip2 version 1.0.8 of 13 July 2019
8 # Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
10 # Please read the WARNING, DISCLAIMER and PATENTS sections in the
13 # This program is released under the terms of the license contained
14 # in the file LICENSE.
15 # ------------------------------------------------------------------
19 # get command line values:
21 die "Usage: $0 xml_infile xml_outfile\n";
26 die "Can't find file \"$infile\""
28 # check we can read infile
30 die "Can
't read input $infile\n";
32 # check we can open infile
33 open( INFILE,"<$infile" ) or
34 die "Can't input
$infile $!";
36 #my $outfile = 'fmt-manual.xml';
38 #print "Infile
: $infile, Outfile
: $outfile\n";
39 # check we can write to outfile
40 open( OUTFILE,">$outfile" ) or
41 die "Can
't output $outfile $! for writing";
43 my ($prev, $curr, $str);
44 $prev = ''; $curr = '';
52 if ( $prev =~ /<programlisting>$|<screen>$/ ) {
54 $curr = join( '', $prev, "<![CDATA[", $curr );
58 elsif ( $curr =~ /<\/programlisting>|<\/screen>/ ) {
60 $curr = join( '', $prev, "]]>", $curr );