From: Paul Eggert Date: Tue, 18 Mar 1997 20:14:39 +0000 (+0000) Subject: GNU tar 1.12 X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=d3e5bfed13544a1887a99bde4dbb45731c252d7d;hp=5830fe2195f6e70a90aa6e0186633447a3e9e03d;p=chaz%2Ftar GNU tar 1.12 --- diff --git a/doc/convtexi.pl b/doc/convtexi.pl new file mode 100755 index 0000000..65a7c06 --- /dev/null +++ b/doc/convtexi.pl @@ -0,0 +1,118 @@ +#!/usr/local/bin/perl -- # -*-Perl-*- +eval "exec /usr/local/bin/perl -S $0 $*" + if 0; + +# Copy a Texinfo file, replacing @value's, @FIXME's and other gooddies. +# Copyright © 1996 Free Software Foundation, Inc. +# François Pinard , 1996. + +$_ = <>; +while ($_) +{ + if (/^\@c()$/ || /^\@c (.*)/ || /^\@(include .*)/) + { + if ($topseen) + { + print "\@format\n"; + print "\@strong{\@\@c} $1\n"; + $_ = <>; + while (/\@c (.*)/) + { + print "\@strong{\@\@c} $1\n"; + $_ = <>; + } + print "\@end format\n"; + } + else + { + $delay .= "\@format\n"; + $delay .= "\@strong{\@\@c} $1\n"; + $_ = <>; + while (/\@c (.*)/) + { + $delay .= "\@strong{\@\@c} $1\n"; + $_ = <>; + } + $delay .= "\@end format\n"; + } + } + elsif (/^\@chapter /) + { + print; +# print $delay; + $delay = ''; + $topseen = 1; + $_ = <>; + } + elsif (/^\@macro /) + { + $_ = <> while ($_ && ! /^\@end macro/); + $_ = <>; + } + elsif (/^\@set ([^ ]+) (.*)/) + { + $set{$1} = $2; + $_ = <>; + } + elsif (/^\@UNREVISED/) + { + print "\@quotation\n"; + print "\@emph{(This message will disappear, once this node is revised.)}\n"; + print "\@end quotation\n"; + $_ = <>; + } + else + { + while (/\@value{([^\}]*)}/) + { + if (defined $set{$1}) + { + $_ = "$`$set{$1}$'"; + } + else + { + $_ = "$`\@strong{}$1\@strong{}$'"; + } + } + while (/\@FIXME-?([a-z]*)\{/) + { + $tag = $1 eq '' ? 'fixme' : $1; + $tag =~ y/a-z/A-Z/; + print "$`\@strong{<$tag>}"; + $_ = $'; + $level = 1; + while ($level > 0) + { + if (/([{}])/) + { + if ($1 eq '{') + { + $level++; + print "$`\{"; + $_ = $'; + } + elsif ($level > 1) + { + $level--; + print "$`\}"; + $_ = $'; + } + else + { + $level = 0; + print "$`\@strong{}"; + $_ = $'; + } + } + else + { + print; + $_ = <>; + } + } + } + print; + $_ = <>; + } +} +exit 0;