diff options
author | wl <wl> | 2005-02-15 08:07:51 +0000 |
---|---|---|
committer | wl <wl> | 2005-02-15 08:07:51 +0000 |
commit | 01317f4cac00f1d64be39b706bb84c9a8fadd284 (patch) | |
tree | 026247a6b1ec3907b805c3300f575ecf1eec64bd /src | |
parent | 77a78010070924e09a076bc94e7fb1e794686d9c (diff) | |
download | groff-01317f4cac00f1d64be39b706bb84c9a8fadd284.tar.gz |
* src/utils/afmtodit/afmtodit.pl: Remove an incorrect `my' from
$psname and $italic_angle.
Immediately restart file input loops if `split' returns an empty
array.
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/afmtodit/afmtodit.pl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl index 1bc85d5e..dce31137 100644 --- a/src/utils/afmtodit/afmtodit.pl +++ b/src/utils/afmtodit/afmtodit.pl @@ -6089,11 +6089,12 @@ open(AFM, $afm) || die "$prog: can't open \`$ARGV[0]': $!\n"; while (<AFM>) { chop; my @field = split(' '); + next if $#field < 0; if ($field[0] eq "FontName") { - my $psname = $field[1]; + $psname = $field[1]; } elsif($field[0] eq "ItalicAngle") { - my $italic_angle = -$field[1]; + $italic_angle = -$field[1]; } elsif ($field[0] eq "KPX") { if ($#field == 3) { @@ -6114,6 +6115,7 @@ while (<AFM>) { elsif ($field[0] eq "StartCharMetrics") { while (<AFM>) { @field = split(' '); + next if $#field < 0; last if ($field[0] eq "EndCharMetrics"); if ($field[0] eq "C") { my $w; @@ -6182,6 +6184,7 @@ while (<DESC>) { next if /^#/; chop; my @field = split(' '); + next if $#field < 0; last if $field[0] eq "charset"; if ($field[0] eq "res") { $resolution = $field[1]; @@ -6205,6 +6208,7 @@ if ($opt_e) { next if /^#/; chop; my @field = split(' '); + next if $#field < 0; if ($#field == 1) { if ($field[1] >= 0 && defined $width{$field[0]}) { $encoding[$field[1]] = $field[0]; @@ -6225,6 +6229,7 @@ while (<MAP>) { next if /^#/; chop; my @field = split(' '); + next if $#field < 0; if ($#field == 1) { if ($field[1] eq "space") { # The PostScript character "space" is automatically mapped |