From 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 12 Jul 2007 18:26:36 +0000 Subject: 2.5-18.1 --- linuxthreads/man/troffprepro | 68 -------------------------------------------- 1 file changed, 68 deletions(-) delete mode 100755 linuxthreads/man/troffprepro (limited to 'linuxthreads/man/troffprepro') diff --git a/linuxthreads/man/troffprepro b/linuxthreads/man/troffprepro deleted file mode 100755 index ba564fe..0000000 --- a/linuxthreads/man/troffprepro +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/local/bin/perl - -$insynopsis = 0; - -open(INPUT, $ARGV[0]) || die("cannot open $ARGV[0]"); -open(OUTPUT, "> $ARGV[1]") || die("cannot create $ARGV[1]"); - -select(OUTPUT); - -line: -while() { - if (/^\.XREF (.*)$/) { - $xref = $1; - $_ = $ARGV[1]; - m/^.*\.(([1-8]).*)$/; - $suffix = $1; - $extension = $2; - open(XREF, "> $xref.$suffix"); - print XREF ".so man$extension/$ARGV[1]\n"; - close(XREF); - next line; - } - if (/^\.SH/) { - $insynopsis = /SYNOPSIS/; - print $_; - next; - } - if ($insynopsis) { - if (/^#/) { - print ".B ", $_; - } - elsif (/^[a-z]/) { - chop; -# if (m/^([a-zA-Z][a-zA-Z0-9_]*\s+[a-zA-Z][a-zA-Z0-9_]*)\(/) { -# print ".B \"", $1, "\"\n"; -# $_ = '(' . $'; -# } -# s/([a-zA-Z][a-zA-Z0-9_]*)(\s*[,()=])/" \1 "\2/g; - s/([ *])([a-zA-Z][a-zA-Z0-9_]*)(\s*[,)=])/\1" \2 "\3/g; - print ".BI \"", $_, "\"\n"; - } - else { - print $_; - } - next; - } - chop; - s/!([^!]+)!\|([^|]+)\|([^\s]*)\s*/\n.BI "\1" "\2\3"\n/g; - s/([!|])([^!|]+)\1([^\s]*)\s*/do subst($1,$2,$3)/eg; - s/^\n+//; - s/\n+$//; - s/\n\n+/\n/g; - print $_, "\n"; -} - -close(INPUT); -close(OUTPUT); - -sub subst { - local ($a, $b, $c) = @_; - if ($c) { - "\n" . ($a eq "!" ? ".BR " : ".IR ") . "\"$b\" $c\n" - } else { - "\n" . ($a eq "!" ? ".B " : ".I ") . "\"$b\"\n" - } -} - - -- cgit v1.1