From 78763a7c0efdc52404b7c183a1f4d5523d279dba Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 3 Oct 2009 18:40:00 +0000 Subject: (from_file): keep track of line numbers for error message git-svn-id: svn://tug.org/texlive/trunk@15617 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPSRC.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Master/tlpkg') diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm index 73807529a3c..8cd00e9e725 100644 --- a/Master/tlpkg/TeXLive/TLPSRC.pm +++ b/Master/tlpkg/TeXLive/TLPSRC.pm @@ -86,7 +86,10 @@ sub from_file my $finished = 0; my $savedline = ""; - foreach my $line (@lines) { + my $lineno = 0; + for my $line (@lines) { + $lineno++; + # we allow continuation lines in tlpsrc files, i.e., lines with a \ at # the end if ($line =~ /^(.*)\\$/) { @@ -152,7 +155,7 @@ sub from_file push @postactions, $1 if ($1 ne ""); next; } else { - tlwarn("$srcfile:$.: unknown tlpsrc directive, please fix: $line\n"); + tlwarn("$srcfile:$lineno: unknown tlpsrc directive, fix fix: $line\n"); } } } -- cgit v1.2.3