diff options
author | Mark Murray <markm@FreeBSD.org> | 1998-09-09 06:49:33 +0000 |
---|---|---|
committer | Mark Murray <markm@FreeBSD.org> | 1998-09-09 06:49:33 +0000 |
commit | bae74118897c3643917e499f2450a4c164c9c941 (patch) | |
tree | b2c1e3e4b9c778465bff4c6b91fcf492d25adf4e /gnu/usr.bin/perl/usub/man2mus | |
parent | 2b0daddd6ad500c2a5a0c506cd5200ecc6e4845d (diff) |
Old Perl is leaving us. Goodbye, faithful friend.
Notes
Notes:
svn path=/head/; revision=38979
Diffstat (limited to 'gnu/usr.bin/perl/usub/man2mus')
-rwxr-xr-x | gnu/usr.bin/perl/usub/man2mus | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/gnu/usr.bin/perl/usub/man2mus b/gnu/usr.bin/perl/usub/man2mus deleted file mode 100755 index a3046784f423..000000000000 --- a/gnu/usr.bin/perl/usub/man2mus +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/perl -while (<>) { - if (/^\.SH SYNOPSIS/) { - $spec = ''; - for ($_ = <>; $_ && !/^\.SH/; $_ = <>) { - s/^\.[IRB][IRB]\s*//; - s/^\.[IRB]\s+//; - next if /^\./; - s/\\f\w//g; - s/\\&//g; - s/^\s+//; - next if /^$/; - next if /^#/; - $spec .= $_; - } - $_ = $spec; - 0 while s/\(([^),;]*)\s*,\s*([^);]*)\)/($1|$2)/g; - s/\(\*([^,;]*)\)\(\)/(*)()$1/g; - s/(\w+)\[\]/*$1/g; - - s/\n/ /g; - s/\s+/ /g; - s/(\w+) \(([^*])/$1($2/g; - s/^ //; - s/ ?; ?/\n/g; - s/\) /)\n/g; - s/ \* / \*/g; - s/\* / \*/g; - - $* = 1; - 0 while s/^((struct )?\w+ )([^\n,]*), ?(.*)/$1$3\n$1$4/g; - $* = 0; - s/\|/,/g; - - @cases = (); - for (reverse split(/\n/,$_)) { - if (/\)$/) { - ($type,$name,$args) = split(/(\w+)\(/); - $type =~ s/ $//; - if ($type =~ /^(\w+) =/) { - $type = $type{$1} if $type{$1}; - } - $type = 'int' if $type eq ''; - @args = grep(/./, split(/[,)]/,$args)); - $case = "CASE $type $name\n"; - foreach $arg (@args) { - $type = $type{$arg} || "int"; - $type =~ s/ //g; - $type .= "\t" if length($type) < 8; - if ($type =~ /\*/) { - $case .= "IO $type $arg\n"; - } - else { - $case .= "I $type $arg\n"; - } - } - $case .= "END\n\n"; - unshift(@cases, $case); - } - else { - $type{$name} = $type if ($type,$name) = /(.*\W)(\w+)$/; - } - } - print @cases; - } -} |