Merged changes from 3.15 branch up to revno 12670

This commit is contained in:
Andrew Johnson
2015-04-16 18:12:59 -05:00
10 changed files with 92 additions and 33 deletions
+1
View File
@@ -51,6 +51,7 @@ PERL_SCRIPTS += dbdToRecordtypeH.pl
PERL_SCRIPTS += dbdExpand.pl
PERL_SCRIPTS += dbdToHtml.pl
PERL_SCRIPTS += podToHtml.pl
PERL_SCRIPTS += podRemove.pl
PERL_SCRIPTS += registerRecordDeviceDriver.pl
HTMLS = style.css
+49
View File
@@ -0,0 +1,49 @@
#!/usr/bin/env perl
#*************************************************************************
# Copyright (c) 2015 UChicago Argonne LLC, as Operator of Argonne
# National Laboratory.
# EPICS BASE is distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution.
#*************************************************************************
# $Id$
use strict;
use warnings;
use Getopt::Std;
our ($opt_o);
$Getopt::Std::OUTPUT_HELP_VERSION = 1;
&HELP_MESSAGE if !getopts('o:') || @ARGV != 1;
my $infile = shift @ARGV;
if (!$opt_o) {
($opt_o = $infile) =~ s/\.pod$//;
$opt_o =~ s/^.*\///;
}
open my $inp, '<', $infile or
die "podRemove.pl: Can't open $infile: $!\n";
open my $out, '>', $opt_o or
die "podRemove.pl: Can't create $opt_o: $!\n";
my $inPod = 0;
while (<$inp>) {
if (m/\A=[a-zA-Z]/) {
$inPod = !m/\A=cut/;
}
else {
print $out $_ unless $inPod;
}
}
close $out;
close $inp;
sub HELP_MESSAGE {
print STDERR "Usage: podRemove.pl [-o file] file.pod\n";
exit 2;
}