File: remove-gtkdoclink.pl

package info (click to toggle)
xmlsec1 1.3.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,916 kB
  • sloc: ansic: 100,493; xml: 19,156; sh: 8,079; makefile: 1,186; javascript: 438; perl: 199
file content (22 lines) | stat: -rwxr-xr-x 486 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl -w

use strict;

my $file;
while ($file = shift @ARGV) {
    print "Processing $file..\n";
    open (IN, $file) || die "Can't open $file: $!";
    my $entire_file = '';
    while(<IN>) {
	   $entire_file = $entire_file . $_;
    }
    close (IN);
    
    $entire_file =~ s%<GTKDOCLINK([^>]*)>%<font>%gi;
    $entire_file =~ s%</GTKDOCLINK([^>]*)>%</font>%gi;
    
    open (OUT, ">$file") || die "Can't open $file: $!";
    print OUT $entire_file;
    close (OUT);	
}