SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
69
misc/magicpoint/patches/patch-mgpembed_pl_in
Normal file
69
misc/magicpoint/patches/patch-mgpembed_pl_in
Normal file
|
@ -0,0 +1,69 @@
|
|||
--- mgpembed.pl.in.orig Tue Jan 5 04:44:00 1999
|
||||
+++ mgpembed.pl.in Sun Jun 23 15:15:34 2013
|
||||
@@ -16,15 +16,16 @@ if (! -x $gzip || ! -x $uuencode) {
|
||||
die "external program not found. manual configuration required.\n"
|
||||
}
|
||||
|
||||
-require 'getopts.pl';
|
||||
+use Getopt::Std;
|
||||
+use subs (qw(usage readfile));
|
||||
|
||||
# specify suffixes we should gzip files before uuencoding
|
||||
@gzipsuffix = (".ps", ".xbm");
|
||||
|
||||
-do Getopts('o:');
|
||||
+getopts('o:');
|
||||
|
||||
if ($#ARGV != 0) {
|
||||
- do usage();
|
||||
+ usage();
|
||||
# NOTREACHED
|
||||
}
|
||||
|
||||
@@ -37,14 +38,14 @@ if (defined($opt_o)) {
|
||||
die "$outfname already exists\n" if -f $outfname;
|
||||
die "$outfname is specified for both input/output\n"
|
||||
if ($outfname eq $infname);
|
||||
- open(OUT, "> $outfname") || die "Can not open $outfname: $!";
|
||||
+ open(OUT, ">", $outfname) || die "Can not open $outfname: $!";
|
||||
} else {
|
||||
open(OUT, ">& STDOUT");
|
||||
}
|
||||
|
||||
# read the file, process %include directives
|
||||
|
||||
-do readfile($infname, 'INPUT000');
|
||||
+readfile($infname, 'INPUT000');
|
||||
|
||||
# append embedded files using %embed/%endembed directives
|
||||
|
||||
@@ -76,10 +77,10 @@ foreach $efile (keys %files) {
|
||||
close(OUT);
|
||||
|
||||
sub readfile {
|
||||
- local($filename, $input) = @_;
|
||||
- local($fname, $fname0);
|
||||
+ my($filename, $input) = @_;
|
||||
+ my($fname, $fname0);
|
||||
$input++;
|
||||
- open($input, $filename) || die "Can not open $filename: $!\n";
|
||||
+ open($input, '<', $filename) || die "Can not open $filename: $!\n";
|
||||
while (<$input>) {
|
||||
if (/^%%/) {
|
||||
print OUT;
|
||||
@@ -116,7 +117,7 @@ sub readfile {
|
||||
$incfname = $1;
|
||||
}
|
||||
print OUT "\%\%\%\%\%\%\%\%\%\%INCLUDE $incfname\n";
|
||||
- do readfile($incfname, $input);
|
||||
+ readfile($incfname, $input);
|
||||
print OUT "\%\%\%\%\%\%\%\%\%\%INCLUDE-END $incfname\n";
|
||||
} else {
|
||||
print OUT;
|
||||
@@ -128,5 +129,5 @@ sub readfile {
|
||||
|
||||
sub usage {
|
||||
print STDERR "usage: mgpembed [-o outfile ] mgpfile\n";
|
||||
- exit -1;
|
||||
+ exit 1;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue