summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/fmtutil.pl21
1 files changed, 20 insertions, 1 deletions
diff --git a/Master/texmf-dist/scripts/texlive/fmtutil.pl b/Master/texmf-dist/scripts/texlive/fmtutil.pl
index cca5f221bdc..b8b73efe3f2 100755
--- a/Master/texmf-dist/scripts/texlive/fmtutil.pl
+++ b/Master/texmf-dist/scripts/texlive/fmtutil.pl
@@ -228,7 +228,7 @@ sub main {
print_warning("--catcfg command not supported anymore!\n");
exit(1);
} elsif ($opts{'listcfg'}) {
- print_warning("--listcfg currently not implemented, be patient!\n");
+ return callback_list_cfg();
exit(1);
} elsif ($opts{'disablefmt'}) {
return callback_enable_disable_format($changes_config_file,
@@ -732,6 +732,25 @@ sub callback_enable_disable_format {
}
}
+sub callback_list_cfg {
+ my @lines;
+ for my $f (keys %{$alldata->{'merged'}}) {
+ for my $e (keys %{$alldata->{'merged'}{$f}}) {
+ my $orig = $alldata->{'merged'}{$f}{$e}{'origin'};
+ my $hyph = $alldata->{'merged'}{$f}{$e}{'hyphen'};
+ my $stat = $alldata->{'merged'}{$f}{$e}{'status'};
+ my $args = $alldata->{'merged'}{$f}{$e}{'args'};
+ push @lines,
+ [ "$f/$e/$hyph",
+ "$f (engine = $e) $stat\n hyphen=$hyph, args=$args\n origin=$orig\n" ];
+ }
+ }
+ # sort lines
+ @lines = map { $_->[1] } sort { $a->[0] cmp $b->[0] } @lines;
+ print "List of all formats:\n";
+ print @lines;
+}
+
sub read_fmtutil_files {
my (@l) = @_;
for my $l (@l) { read_fmtutil_file($l); }