From ce8083552e0d948bf495e72d5c4d2680b505c90b Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 25 Sep 2022 03:00:53 +0000 Subject: CTAN sync 202209250300 --- support/texfot/texfot.pdf | Bin 32559 -> 32363 bytes support/texfot/texfot.pl | 131 ++++++++++++++++++++++++++++------------------ 2 files changed, 80 insertions(+), 51 deletions(-) (limited to 'support') diff --git a/support/texfot/texfot.pdf b/support/texfot/texfot.pdf index 163dce0996..d51cb0fe97 100644 Binary files a/support/texfot/texfot.pdf and b/support/texfot/texfot.pdf differ diff --git a/support/texfot/texfot.pl b/support/texfot/texfot.pl index d7b9d85ce7..764210a1f5 100755 --- a/support/texfot/texfot.pl +++ b/support/texfot/texfot.pl @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# $Id: texfot,v 1.45 2022/02/17 18:42:02 karl Exp $ +# $Id: texfot,v 1.47 2022/09/24 16:38:13 karl Exp $ # Invoke a TeX command, filtering all but interesting terminal output; # do not look at the log or check any output files. # Exit status is that of the subprogram. @@ -8,7 +8,7 @@ # # Public domain. Originally written 2014 by Karl Berry. -my $ident = '$Id: texfot,v 1.45 2022/02/17 18:42:02 karl Exp $'; +my $ident = '$Id: texfot,v 1.47 2022/09/24 16:38:13 karl Exp $'; (my $prg = $0) =~ s,^.*/,,; select STDERR; $| = 1; # no buffering select STDOUT; $| = 1; @@ -21,6 +21,7 @@ use IO::File; # use new_tmpfile for that stderr. use Getopt::Long qw(:config require_order); use Pod::Usage; +my @opt_accept = (); my $opt_debug = 0; my @opt_ignore = (); my $opt_interactive = 0; @@ -36,6 +37,7 @@ exit (&main ()); # sub main { my $ret = GetOptions ( + "accept=s" => \@opt_accept, "debug!" => \$opt_debug, "ignore=s" => \@opt_ignore, "interactive!" => \$opt_interactive, @@ -90,9 +92,9 @@ sub main { # Be sure everything is drained. &debug ("starting waitpid() for $pid") ; - waitpid ($pid, 0) || die "$prog: waitpid($pid) failed: $!\n"; + waitpid ($pid, 0) || die "$prg: waitpid($pid) failed: $!\n"; my $child_exit_status = $? >> 8; - &debug ("child exit status = $exit_status\n"); + &debug ("child exit status = $child_exit_status\n"); &debug ("processing stderr from child"); seek (TEXERR, 0, 0) || warn "seek(stderr) failed: $!"; @@ -129,6 +131,17 @@ sub process_output { next; } + # don't anchor user accept patterns, leave it up to them. + for my $user_accept (@opt_accept) { + &debug ("checking user accept '$user_accept'\n"); + if (/${user_accept}/) { + &debug (" found user accept ($user_accept)\n"); + print $prefix; + print $line; + next; + } + } + &debug ("checking ignores\n"); next if /^( LaTeX\ Warning:\ You\ have\ requested\ package @@ -148,13 +161,13 @@ sub process_output { |!\ $ )/x; - # don't anchor user ignores, leave it up to them. + # don't anchor user ignore patterns either. for my $user_ignore (@opt_ignore) { &debug ("checking user ignore '$user_ignore'\n"); next LINE if /${user_ignore}/; } - &debug ("checking for print_next\n"); + &debug ("checking for print_next pattern\n"); if (/^( .*?:[0-9]+: # usual file:lineno: form |! # usual ! form @@ -189,6 +202,7 @@ sub process_output { |all\ text\ was\ ignored\ after\ line |.*Fatal\ error |.*for\ symbol.*on\ input\ line + |\#\# )/x) { &debug (" matched for showing ($1)\n"); print $prefix; @@ -225,8 +239,8 @@ texfot [I