File: fix_man.pl

package info (click to toggle)
moxftp 2.2-18.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,160 kB
  • ctags: 3,837
  • sloc: ansic: 43,420; makefile: 353; perl: 262; sh: 192
file content (37 lines) | stat: -rwxr-xr-x 535 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /local/bin/perl

do it("Xftp", "xftp", "Athena", "XFTP");
do it("Mftp", "mftp", "Motif" , "MFTP");
do it("Oftp", "oftp", "Open Look", "OFTP");

sub it {
    ($Xxxx, $xxxx, $type, $keep) = @_;

    open(input,"moxftp.man");
    open(output, ">$xxxx.man");
    $s = 0;
    while (<input>) {
	if (/^KEEP/) {
	     if(/$keep/) { next; }
	     if(!$s) {
		$s++;
	     } else {
		$s = 0;
	     }
	     next;
	}
	if ($s) { next; }
	s/xxxx/$xxxx/g;
        s/Xxxx/$Xxxx/g;
        s/TYPE/$type/g;
	print output $_;
    }
}