aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrf7
1 files changed, 4 insertions, 3 deletions
diff --git a/rf b/rf
index bc1b28f..754bc70 100755
--- a/rf
+++ b/rf
@@ -11,9 +11,9 @@ my $format_list = '%a (%y). {\fI%t\fR}. {\*Q%q\*U}. %n, %d. %c: %p. {Available:
# Internal variables
-my $author_last = 0; # whether the previous reference field was Ra
+my $author_last = 1; # whether the previous reference field was Ra
my @lines;
-my $i = -1;
+my $i = 0;
my @refs;
while (<>) {
@@ -63,6 +63,7 @@ for (@lines) {
for (@words) {
if ($_ eq "''") {
$_ = $lines[$i-1];
+ chomp;
$_ =~ s/^.*\s(\S+)\s*$/$1/;
}
}
@@ -81,7 +82,7 @@ for (@lines) {
exit 1;
}
if ($points[$winner] < 150) {
- print STDERR "Warning: Guessing that reference '$def' refers to " . fmt($format_full, $winner) . ".\n";
+ print STDERR "Warning: Guessing that reference '$def' refers to " . fmt($format_full, $winner) . " (match = $points[$winner]).\n";
}
if ($fld eq 'f') {