From 7028cbe09c688437910a25623098762bf0fa592d Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 28 Mar 2016 22:28:34 +1000 Subject: Move Irrlicht to src/others. --- .../irrlicht-1.8.1/source/Irrlicht/bzip2/format.pl | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/format.pl (limited to 'src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/format.pl') diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/format.pl b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/format.pl new file mode 100644 index 0000000..f169fd9 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/bzip2/format.pl @@ -0,0 +1,68 @@ +#!/usr/bin/perl -w +# +# ------------------------------------------------------------------ +# This file is part of bzip2/libbzip2, a program and library for +# lossless, block-sorting data compression. +# +# bzip2/libbzip2 version 1.0.6 of 6 September 2010 +# Copyright (C) 1996-2010 Julian Seward +# +# Please read the WARNING, DISCLAIMER and PATENTS sections in the +# README file. +# +# This program is released under the terms of the license contained +# in the file LICENSE. +# ------------------------------------------------------------------ +# +use strict; + +# get command line values: +if ( $#ARGV !=1 ) { + die "Usage: $0 xml_infile xml_outfile\n"; +} + +my $infile = shift; +# check infile exists +die "Can't find file \"$infile\"" + unless -f $infile; +# check we can read infile +if (! -r $infile) { + die "Can't read input $infile\n"; +} +# check we can open infile +open( INFILE,"<$infile" ) or + die "Can't input $infile $!"; + +#my $outfile = 'fmt-manual.xml'; +my $outfile = shift; +#print "Infile: $infile, Outfile: $outfile\n"; +# check we can write to outfile +open( OUTFILE,">$outfile" ) or + die "Can't output $outfile $! for writing"; + +my ($prev, $curr, $str); +$prev = ''; $curr = ''; +while ( ) { + + print OUTFILE $prev; + $prev = $curr; + $curr = $_; + $str = ''; + + if ( $prev =~ /$|$/ ) { + chomp $prev; + $curr = join( '', $prev, "|<\/screen>/ ) { + chomp $prev; + $curr = join( '', $prev, "]]>", $curr ); + $prev = ''; + next; + } +} +print OUTFILE $curr; +close INFILE; +close OUTFILE; +exit; -- cgit v1.1