summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-08-06 23:33:17 +0000
committerKarl Berry <karl@freefriends.org>2019-08-06 23:33:17 +0000
commit48f9e4b1f4dfaf9bfb9dcb935ea1c3d39cf9c779 (patch)
tree50d9db5039167e5778005ba82a7cba229db6fe43
parentc7ce5ab1655e5a4cc880ef2ac2eba601ce4109c2 (diff)
new cross-engine (and kpsewhich) option --cnf-line
git-svn-id: svn://tug.org/texlive/trunk@51830 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/kpathsea/ChangeLog24
-rw-r--r--Build/source/texk/kpathsea/Makefile.am7
-rw-r--r--Build/source/texk/kpathsea/Makefile.in6
-rw-r--r--Build/source/texk/kpathsea/cnf.c91
-rw-r--r--Build/source/texk/kpathsea/cnf.h30
-rw-r--r--Build/source/texk/kpathsea/doc/kpathsea.info194
-rw-r--r--Build/source/texk/kpathsea/doc/kpathsea.texi37
-rw-r--r--Build/source/texk/kpathsea/kpsewhich.c29
-rwxr-xr-xBuild/source/texk/kpathsea/tests/cnfline.test27
-rw-r--r--Build/source/texk/kpathsea/tests/cnfline/texmf.cnf5
-rw-r--r--Build/source/texk/web2c/ChangeLog7
-rw-r--r--Build/source/texk/web2c/Makefile.in27
-rw-r--r--Build/source/texk/web2c/NEWS7
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog10
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c31
-rw-r--r--Build/source/texk/web2c/man/ChangeLog8
-rw-r--r--Build/source/texk/web2c/man/aleph.man9
-rw-r--r--Build/source/texk/web2c/man/etex.man12
-rw-r--r--Build/source/texk/web2c/man/mf.man9
-rw-r--r--Build/source/texk/web2c/man/pdftex.man11
-rw-r--r--Build/source/texk/web2c/man/tex.man12
-rw-r--r--Build/source/texk/web2c/pdftexdir/ChangeLog7
-rw-r--r--Build/source/texk/web2c/pdftexdir/am/pdftex.am14
-rw-r--r--Build/source/texk/web2c/pdftexdir/tests/cnfline.test23
-rw-r--r--Build/source/texk/web2c/pdftexdir/tests/cnfline.tex13
-rw-r--r--Build/source/texk/web2c/texmfmp-help.h12
26 files changed, 503 insertions, 159 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index ea3ced48f74..baa1b724fef 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,25 @@
+2019-08-06 Karl Berry <karl@freefriends.org>
+
+ * kpsewhich.c (USAGE, read_command_line): new option --cnf-line.
+ (user_cnf_lines, user_cnf_nlines): new variables to store the args.
+ (init_more): call kpathsea_cnf_line_env_progname on each line.
+
+ * cnf.h (kpathsea_cnf_line_env_progname): declare new fn.
+ * cnf.c (do_line): new argument ENV_PROGNAME,
+ to insert settings in the environment instead of the hash table.
+ (kpathsea_cnf_line_env_progname): entry point to call do_line
+ with env_progname=true.
+ (read_all_cnf): change do_line call to have env_progname=false.
+ Also, don't create cnf_hash here, instead ...
+ (kpathsea_cnf_get): ... here (if needed).
+
+ * tests/cnfline.test: new test for --cnf-line.
+ * tests/cnfline/texmf.cnf: new directory/file for cnfline.test.
+ * Makefile.am (tests),
+ (tests/cnfline.log),
+ (EXTRA_DIST): add new test.
+ * doc/kpathsea.texi (Path sources, Path searching options): doc.
+
2019-07-26 Karl Berry <karl@tug.org>
* texmf.cnf (TEXINPUTS, etc.): include explicit latex,
@@ -1288,7 +1310,7 @@
2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
- Avoid 'the address of XXX will always evaluate as true' warnings.
+ Avoid 'the address of X will always evaluate as true' warnings.
* lib.h (STREQ): Test '(s) != NULL' instead of '(s)'.
Gcc >=4.3 produces identical code but -Wall yields no warning.
diff --git a/Build/source/texk/kpathsea/Makefile.am b/Build/source/texk/kpathsea/Makefile.am
index 8179942bbd9..08ccf7460bc 100644
--- a/Build/source/texk/kpathsea/Makefile.am
+++ b/Build/source/texk/kpathsea/Makefile.am
@@ -1,7 +1,7 @@
## $Id$
## Makefile.am for the TeX Live subdirectory texk/kpathsea/
##
-## Copyright 2017 Karl Berry <tex-live@tug.org>
+## Copyright 2017-2019 Karl Berry <tex-live@tug.org>
## Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
@@ -307,16 +307,17 @@ uninstall-hook: uninstall-bin-links
AM_TESTS_ENVIRONMENT = LN_S='$(LN_S)'; export LN_S;
AM_TESTS_ENVIRONMENT += LT_OBJDIR='$(LT_OBJDIR)'; export LT_OBJDIR;
#
-TESTS = tests/cnfnewline.test tests/kpseaccess.test
+TESTS = tests/cnfline.test tests/cnfnewline.test tests/kpseaccess.test
TESTS += tests/kpsereadlink.test tests/kpsestat.test tests/kpsewhich.test
#
-tests/cnfnewline.log tests/kpsewhich.log: kpsewhich$(EXEEXT)
+tests/cnfline.log tests/cnfnewline.log tests/kpsewhich.log: kpsewhich$(EXEEXT)
tests/kpseaccess.log: kpseaccess$(EXEEXT)
tests/kpsereadlink.log: kpsereadlink$(EXEEXT)
tests/kpsestat.log: kpsestat$(EXEEXT)
#
EXTRA_DIST += $(TESTS)
EXTRA_DIST += tests/cnfnewline/texmf.cnf
+EXTRA_DIST += tests/cnfline/texmf.cnf
# Rebuild
rebuild_prereq =
diff --git a/Build/source/texk/kpathsea/Makefile.in b/Build/source/texk/kpathsea/Makefile.in
index 36beec2bd64..3a721c4013c 100644
--- a/Build/source/texk/kpathsea/Makefile.in
+++ b/Build/source/texk/kpathsea/Makefile.in
@@ -759,7 +759,7 @@ top_srcdir = @top_srcdir@
SUBDIRS = . doc man $(am__append_6)
#
EXTRA_DIST = PROJECTS putenv.c bsnl.awk cnf-to-paths.awk $(TESTS) \
- tests/cnfnewline/texmf.cnf mktex.cnf
+ tests/cnfnewline/texmf.cnf tests/cnfline/texmf.cnf mktex.cnf
AM_CPPFLAGS = -I$(top_builddir)/.. -I$(top_srcdir)/..
AM_CFLAGS = $(WARNING_CFLAGS)
lib_LTLIBRARIES = libkpathsea.la
@@ -866,7 +866,7 @@ bin_links = mktexlsr:texhash
AM_TESTS_ENVIRONMENT = LN_S='$(LN_S)'; export LN_S; \
LT_OBJDIR='$(LT_OBJDIR)'; export LT_OBJDIR;
#
-TESTS = tests/cnfnewline.test tests/kpseaccess.test \
+TESTS = tests/cnfline.test tests/cnfnewline.test tests/kpseaccess.test \
tests/kpsereadlink.test tests/kpsestat.test \
tests/kpsewhich.test
@@ -2533,7 +2533,7 @@ install-exec-hook: install-bin-links
uninstall-hook: uninstall-bin-links
#
-tests/cnfnewline.log tests/kpsewhich.log: kpsewhich$(EXEEXT)
+tests/cnfline.log tests/cnfnewline.log tests/kpsewhich.log: kpsewhich$(EXEEXT)
tests/kpseaccess.log: kpseaccess$(EXEEXT)
tests/kpsereadlink.log: kpsereadlink$(EXEEXT)
tests/kpsestat.log: kpsestat$(EXEEXT)
diff --git a/Build/source/texk/kpathsea/cnf.c b/Build/source/texk/kpathsea/cnf.c
index 60a5df93e6d..9d3baeac84f 100644
--- a/Build/source/texk/kpathsea/cnf.c
+++ b/Build/source/texk/kpathsea/cnf.c
@@ -1,7 +1,7 @@
/* cnf.c: read config files.
Copyright 1994, 1995, 1996, 1997, 2008, 2009, 2011, 2012, 2016,
- 2017, 2018 Karl Berry.
+ 2017, 2018, 2019 Karl Berry.
Copyright 1997-2005 Olaf Weber.
This library is free software; you can redistribute it and/or
@@ -42,17 +42,23 @@
#define CNF_NAME "texmf.cnf"
-/* Do a single line in a cnf file: if it's blank or a comment or
+/* Do a single line LINE in a cnf file: if it's blank or a comment or
erroneous, skip it. Otherwise, parse
<variable>[.<program>] [=] <value>
- Do this even if the <variable> is already set in the environment,
- since the envvalue might contain a trailing :, in which case we'll be
- looking for the cnf value.
+ and insert it either into the cnf_hash structure in KPSE (if
+ ENV_PROGNAME is false), or in the environment (if ENV_PROGNAME is true).
+
+ Furthermore, if ENV_PROGNAME is true, and there is no .<program> in
+ LINE, then also insert <variable> "_" `kpse->program_name' with <value>
+ into the environment; see kpathsea_cnf_line_env_progname in cnf.h.
+
+ The name without _<progname> will usually never be looked up, but
+ just in case the program name changes, or whatever.
We return NULL if ok, an error string otherwise. */
static string
-do_line (kpathsea kpse, string line)
+do_line (kpathsea kpse, string line, boolean env_progname)
{
unsigned len;
string start;
@@ -157,26 +163,58 @@ do_line (kpathsea kpse, string line)
}
}
- /* We want TEXINPUTS.prog to override plain TEXINPUTS. The simplest
- way is to put both in the hash table (so we don't have to write
- hash_delete and hash_replace, and keep track of values' sources),
- and then look up the .prog version first in `kpse_cnf_get'. */
- if (prog) {
- string lhs = concat3 (var, ".", prog);
- free (var);
- free (prog);
- var = lhs;
+ /* If we're supposed to make the setting in the environment ... */
+ if (env_progname) {
+ string this_prog = prog ? prog : kpse->program_name; /* maybe with .prog */
+ /* last-ditch debug */
+ /* fprintf (stderr, "kpse/cnf.c xputenv(%s,%s)\n", var, value); */
+ xputenv (var, value);
+ /* Use the .prog name on the input line if specified. Otherwise,
+ although kpse->program_name should always be set at this point,
+ check just in case. */
+ if (this_prog) {
+ string var_prog = concat3 (var, "_", this_prog);
+ /* fprintf (stderr, "kpse/cnf.c xputenv(%s,%s) [implicit]\n",
+ var_prog, value); */
+ xputenv (var_prog, value);
+ free (var_prog); /* xputenv allocates its own */
+ }
+ free (var); /* again, xputenv allocated a copy */
+
+ } else {
+ /* Normal case of not ENV_PROGNAME, insert in cnf_hash, with .prog
+ if specified, which will override non-.prog. */
+ string lhs = prog ? concat3 (var, ".", prog) : var;
+ /* last-ditch debug */
+ /* fprintf (stderr, "kpse/cnf.c hash_insert(%s,%s)\n", lhs, value); */
+ hash_insert (&(kpse->cnf_hash), lhs, value);
+ if (prog) { /* the lhs string is new memory if we had .prog */
+ free (var);
+ /* If there was no .prog on the line, the original `var' memory gets
+ inserted into the hash table, so do not free. */
+ }
}
- /* last-ditch debug */
- /* fprintf (stderr, "kpse/cnf.c hash_insert(%s,%s)\n", var, value); */
- hash_insert (&(kpse->cnf_hash), var, value);
/* We should check that anything remaining is preceded by a comment
character, but we don't. Sorry. */
return NULL;
}
+
-/* Read all the configuration files in the path. */
+/* Just passing along env_progname = true to do_line. */
+
+void
+kpathsea_cnf_line_env_progname (kpathsea kpse, string line)
+{
+ string msg = do_line (kpse, line, /* env_progname = */ true);
+ if (msg) {
+ WARNING2 ("command line (kpathsea): %s in argument: %s",
+ msg, line);
+ }
+}
+
+
+/* Read all the kpathsea configuration files in the path. */
static void
read_all_cnf (kpathsea kpse)
@@ -185,8 +223,6 @@ read_all_cnf (kpathsea kpse)
string *cnf;
const_string cnf_path = kpathsea_init_format (kpse, kpse_cnf_format);
- kpse->cnf_hash = hash_create (CNF_HASH_SIZE);
-
cnf_files = kpathsea_all_path_search (kpse, cnf_path, CNF_NAME);
if (cnf_files && *cnf_files) {
for (cnf = cnf_files; *cnf; cnf++) {
@@ -223,7 +259,7 @@ read_all_cnf (kpathsea kpse)
}
}
- msg = do_line (kpse, line);
+ msg = do_line (kpse, line, /* env_progname= */ false);
if (msg) {
WARNING4 ("%s:%d: (kpathsea) %s on line: %s",
*cnf, lineno, msg, line);
@@ -255,15 +291,15 @@ kpathsea_cnf_get (kpathsea kpse, const_string name)
const_string ret, *ret_list;
/* When we expand the compile-time value for DEFAULT_TEXMFCNF,
- we end up needing the value for TETEXDIR and other variables,
- so kpse_var_expand ends up calling us again. No good. Except this
- code is not sufficient, somehow the ls-R path needs to be
- computed when initializing the cnf path. Better to ensure that the
- compile-time path does not contain variable references. */
+ we end up needing the value for assorted variables,
+ so kpse_var_expand ends up calling us again. Just return. */
if (kpse->doing_cnf_init)
return NULL;
+ /* If no cnf hash yet, initialize. */
if (kpse->cnf_hash.size == 0) {
+ kpse->cnf_hash = hash_create (CNF_HASH_SIZE);
+
/* Read configuration files and initialize databases. */
kpse->doing_cnf_init = true;
read_all_cnf (kpse);
@@ -303,4 +339,3 @@ kpse_cnf_get (const_string name)
return kpathsea_cnf_get(kpse_def, name);
}
#endif
-
diff --git a/Build/source/texk/kpathsea/cnf.h b/Build/source/texk/kpathsea/cnf.h
index 44c966841be..e218964b5b6 100644
--- a/Build/source/texk/kpathsea/cnf.h
+++ b/Build/source/texk/kpathsea/cnf.h
@@ -1,6 +1,6 @@
/* cnf.h: runtime config files.
- Copyright 1994, 1995, 2008, 2012 Karl Berry.
+ Copyright 1994, 1995, 2008, 2012, 2019 Karl Berry.
Copyright 1999, 2005 Olaf Weber.
This library is free software; you can redistribute it and/or
@@ -27,10 +27,30 @@ extern "C" {
#endif
/* Return the value in the last-read cnf file for VAR, or NULL if none.
- On the first call, also read all the `texmf.cnf' files in the
- path for kpse_cnf_format (and initialize the path). */
-
-extern KPSEDLL const_string kpathsea_cnf_get (kpathsea kpse, const_string name);
+ On the first call, also read all the `texmf.cnf' files in the path
+ for kpse_cnf_format (and initialize the path). Any error messages are
+ written to stderr. */
+
+extern KPSEDLL const_string kpathsea_cnf_get (kpathsea kpse, const_string var);
+
+
+/* Parse L as a texmf.cnf configuration line for the KPSE instance,
+ and insert any <variable> assignment in the environment, both as-is and
+ with the value (if all non-NULL) of <variable> "_" KPSE->program_name.
+ If <variable>[_<progname>] is already set in the environment, it is
+ overwritten.
+
+ All of this behavior is because if the user runs tex with
+ --cnf-line=TEXINPUTS=/foo:, it's not unreasonable to expect that
+ cmdline option to override both environment variables TEXINPUTS and
+ TEXINPUTS_tex, and also both configuration values TEXINPUTS and
+ TEXINPUTS.tex -- even though ordinarily <var>.<progname> overrides
+ plain <var>.
+
+ Any error message is written to stderr. */
+
+extern KPSEDLL void kpathsea_cnf_line_env_progname (kpathsea kpse,
+ string l);
#if defined(KPSE_COMPAT_API)
extern KPSEDLL const_string kpse_cnf_get (const_string var);
diff --git a/Build/source/texk/kpathsea/doc/kpathsea.info b/Build/source/texk/kpathsea/doc/kpathsea.info
index d5d49858ae5..19aca80756b 100644
--- a/Build/source/texk/kpathsea/doc/kpathsea.info
+++ b/Build/source/texk/kpathsea/doc/kpathsea.info
@@ -37,7 +37,7 @@ Kpathsea library
****************
This manual documents the Kpathsea library for path searching. It
-corresponds to version 6.3.1, released in March 2019.
+corresponds to version 6.3.2, released in August 2019.
* Menu:
@@ -61,8 +61,8 @@ File: kpathsea.info, Node: Introduction, Next: unixtex.ftp, Prev: Top, Up: T
1 Introduction
**************
-This manual corresponds to version 6.3.1 of the Kpathsea library,
-released in March 2019.
+This manual corresponds to version 6.3.2 of the Kpathsea library,
+released in August 2019.
The library's fundamental purpose is to return a filename from a list
of directories specified by the user, similar to what shells do when
@@ -467,7 +467,10 @@ File: kpathsea.info, Node: Path sources, Next: Path expansion, Prev: Searchin
A search path or other configuration value can come from many sources.
In the order in which Kpathsea looks for them:
- 1. A user-set environment variable, e.g., 'TEXINPUTS'. Environment
+ 1. A command-line option such as '--cnf-line', available in
+ 'kpsewhich' and most TeX engines. *Note Path searching options::.
+
+ A user-set environment variable, e.g., 'TEXINPUTS'. Environment
variables with an underscore and the program name appended
override; for example, 'TEXINPUTS_latex' overrides 'TEXINPUTS' if
the program being run is named 'latex'.
@@ -1182,6 +1185,27 @@ filename, and returns the first file found.
case-insensitive, it merely means that Kpathsea does not do any
casefolding itself.
+'--cnf-line=STR'
+ Parse STR as if it were a line in the 'texmf.cnf' configuration
+ file (*note Config files::), overriding settings in the actual
+ configuration files, and also in the environment (*note Path
+ sources::). This is implemented by making any settings from STR in
+ the environment, overwriting any value already there. Thus, an
+ extra colon in a '--cnf-line' value will refer to the value from a
+ configuration file, not a user-set environment variable.
+
+ Furthermore, any variable set from STR will also be set with the
+ program name suffix. For example, 'pdftex
+ --cnf-line=TEXINPUTS=/foo:' will set both 'TEXINPUTS' and
+ 'TEXINPUTS_pdftex' in the environment (and the value will be '/foo'
+ followed by the setting from 'texmf.cnf', ignoring any user-set
+ 'TEXINPUTS').
+
+ This behavior is desirable because, in practice, many variables in
+ the distributed 'texmf.cnf' are program-specific, and the intuitive
+ behavior is for values set on the command line with '--cnf-line' to
+ override them.
+
'--dpi=NUM'
Set the resolution to NUM; this only affects 'gf' and 'pk' lookups.
'-D' is a synonym, for compatibility with Dvips. Default is 600.
@@ -1499,8 +1523,8 @@ Kpsewhich provides some features in addition to path lookup as such:
Unix-ish system) '.:/home/karl', supposing the latter is the
current user's home directory. Note that the ';' in the source
value, as commonly used in 'texmf.cnf', has changed to a ':', as
- the normal path separator on the current system. (On a Windows-ish
- system, the ';' would remain.)
+ the normal path separator on the current system. On a Windows-ish
+ system, the ';' would remain.
'--var-value=VARIABLE'
Outputs the value of VARIABLE (a simple identifier like
@@ -1514,7 +1538,8 @@ Kpsewhich provides some features in addition to path lookup as such:
default is not changed) '1'.
Example to contrast with '--var-brace-value': 'FOO='.;~' kpsewhich
- --var-value=FOO' outputs '.;~', i.e., the same as the input value.
+ --var-value=FOO' outputs '.;~', i.e., the same as the input value,
+ on all systems.

File: kpathsea.info, Node: Standard options, Prev: Auxiliary tasks, Up: Invoking kpsewhich
@@ -2988,40 +3013,43 @@ Index
(line 12)
* --casefold-search: Path searching options.
(line 19)
+* --cnf-line: Path searching options.
+ (line 28)
+* --cnf-line, source for path: Path sources. (line 9)
* --color=tty: ls-R. (line 25)
* --debug=NUM: Auxiliary tasks. (line 9)
* --dpi=NUM: Path searching options.
- (line 28)
+ (line 49)
* --engine=NAME: Path searching options.
- (line 32)
+ (line 53)
* --expand-braces=STRING: Auxiliary tasks. (line 12)
* --expand-path=STRING: Auxiliary tasks. (line 16)
* --expand-var=STRING: Auxiliary tasks. (line 34)
* --format=NAME: Path searching options.
- (line 48)
+ (line 69)
* --help: Standard options. (line 8)
* --help-formats: Auxiliary tasks. (line 42)
* --interactive: Path searching options.
- (line 130)
+ (line 151)
* --mktex=FILETYPE: Path searching options.
- (line 135)
+ (line 156)
* --mode=STRING: Path searching options.
- (line 141)
+ (line 162)
* --must-exist: Path searching options.
- (line 146)
+ (line 167)
* --no-casefold-search: Path searching options.
(line 19)
* --no-mktex=FILETYPE: Path searching options.
- (line 135)
+ (line 156)
* --path=STRING: Path searching options.
- (line 151)
+ (line 172)
* --progname=NAME: Path searching options.
- (line 159)
+ (line 180)
* --safe-in-name=NAME: Auxiliary tasks. (line 48)
* --safe-out-name=NAME: Auxiliary tasks. (line 48)
* --show-path=NAME: Auxiliary tasks. (line 54)
* --subdir=STRING: Path searching options.
- (line 164)
+ (line 185)
* --var-brace-value=VARIABLE: Auxiliary tasks. (line 60)
* --var-value=VARIABLE: Auxiliary tasks. (line 74)
* --version: Standard options. (line 11)
@@ -3035,7 +3063,7 @@ Index
* -1 debugging value: Debugging. (line 23)
* -A option to ls: ls-R. (line 39)
* -D NUM: Path searching options.
- (line 28)
+ (line 49)
* -iname, find predicate: Casefolding examples.
(line 78)
* -L option to ls: ls-R. (line 44)
@@ -3236,7 +3264,7 @@ Index
* comments, making: Introduction. (line 29)
* common features in glyph lookup: Basic glyph lookup. (line 6)
* common problems: Common problems. (line 6)
-* compilation value, source for path: Path sources. (line 20)
+* compilation value, source for path: Path sources. (line 23)
* compiler bugs: TeX or Metafont failing.
(line 6)
* compiler bugs, finding: TeX or Metafont failing.
@@ -3256,7 +3284,7 @@ Index
(line 57)
* config.status: Bug checklist. (line 27)
* configuration bugs: Bug checklist. (line 27)
-* configuration file, source for path: Path sources. (line 17)
+* configuration file, source for path: Path sources. (line 20)
* configuration files as shell scripts.: Config files. (line 79)
* configuration of mktex scripts: mktex configuration. (line 6)
* configure options for mktex scripts: mktex configuration. (line 12)
@@ -3314,8 +3342,8 @@ Index
* ENCFONTS: Supported file formats.
(line 61)
* engine name: Path searching options.
- (line 32)
-* environment variable, source for path: Path sources. (line 9)
+ (line 53)
+* environment variable, source for path: Path sources. (line 12)
* environment variables for TeX: Supported file formats.
(line 6)
* environment variables in paths: Variable expansion. (line 6)
@@ -3422,14 +3450,14 @@ Index
(line 84)
* input lines, reading: Calling sequence. (line 110)
* interactive query: Path searching options.
- (line 130)
+ (line 151)
* interface, not frozen: Introduction. (line 29)
* introduction: Introduction. (line 6)
* kdebug:: Debugging. (line 105)
* kdefault.c: Default expansion. (line 48)
* Knuth, Donald E.: History. (line 6)
* Knuth, Donald E., archive of programs by: unixtex.ftp. (line 19)
-* Kpathsea config file, source for path: Path sources. (line 17)
+* Kpathsea config file, source for path: Path sources. (line 20)
* kpathsea.h: Programming overview.
(line 26)
* kpathsea_cnf_get: Programming with config files.
@@ -3645,7 +3673,7 @@ Index
* reporting bugs: Reporting bugs. (line 6)
* resident.c: Calling sequence. (line 47)
* resolution, setting: Path searching options.
- (line 28)
+ (line 49)
* resolutions, last-resort: Fallback font. (line 6)
* retrieving TeX: unixtex.ftp. (line 6)
* right-hand side of variable assignments: Config files. (line 56)
@@ -3780,7 +3808,7 @@ Index
* texmf.cnf missing, warning about: Config files. (line 18)
* texmf.cnf, and variable expansion: Variable expansion. (line 6)
* texmf.cnf, definition for: Config files. (line 6)
-* texmf.cnf, source for path: Path sources. (line 17)
+* texmf.cnf, source for path: Path sources. (line 20)
* TEXMFCNF: Config files. (line 6)
* TEXMFCNF <1>: Supported file formats.
(line 49)
@@ -3892,61 +3920,61 @@ Index

Tag Table:
Node: Top1480
-Node: Introduction2260
-Node: History4330
-Node: unixtex.ftp8926
-Node: Security10351
-Node: TeX directory structure12855
-Node: Path searching16903
-Node: Searching overview17630
-Node: Path sources21449
-Node: Config files22540
-Node: Path expansion26467
-Node: Default expansion27420
-Node: Variable expansion29490
-Node: Tilde expansion30891
-Node: Brace expansion31871
-Node: KPSE_DOT expansion32810
-Node: Subdirectory expansion33323
-Node: Casefolding search35677
-Node: Casefolding rationale36446
-Node: Casefolding examples37785
-Node: Filename database42835
-Node: ls-R43893
-Node: Filename aliases47569
-Node: Database format48747
-Node: Invoking kpsewhich49760
-Node: Path searching options50715
-Node: Specially-recognized files59234
-Node: Auxiliary tasks60589
-Node: Standard options64295
-Node: TeX support64651
-Node: Supported file formats66005
-Node: File lookup73670
-Node: Glyph lookup75419
-Node: Basic glyph lookup76543
-Node: Fontmap77423
-Node: Fallback font79952
-Node: Suppressing warnings80864
-Node: mktex scripts81991
-Node: mktex configuration83206
-Node: mktex script names89009
-Node: mktex script arguments90395
-Node: Programming91274
-Node: Programming overview91847
-Node: Calling sequence94708
-Node: Program-specific files101240
-Node: Programming with config files102263
-Node: Reporting bugs103850
-Node: Bug checklist104528
-Node: Mailing lists108000
-Node: Debugging108675
-Node: Logging113752
-Node: Common problems115619
-Node: Unable to find files116096
-Node: Slow path searching118506
-Node: Unable to generate fonts119881
-Node: TeX or Metafont failing122352
-Node: Index123554
+Node: Introduction2261
+Node: History4332
+Node: unixtex.ftp8928
+Node: Security10353
+Node: TeX directory structure12857
+Node: Path searching16905
+Node: Searching overview17632
+Node: Path sources21451
+Node: Config files22677
+Node: Path expansion26604
+Node: Default expansion27557
+Node: Variable expansion29627
+Node: Tilde expansion31028
+Node: Brace expansion32008
+Node: KPSE_DOT expansion32947
+Node: Subdirectory expansion33460
+Node: Casefolding search35814
+Node: Casefolding rationale36583
+Node: Casefolding examples37922
+Node: Filename database42972
+Node: ls-R44030
+Node: Filename aliases47706
+Node: Database format48884
+Node: Invoking kpsewhich49897
+Node: Path searching options50852
+Node: Specially-recognized files60450
+Node: Auxiliary tasks61805
+Node: Standard options65530
+Node: TeX support65886
+Node: Supported file formats67240
+Node: File lookup74905
+Node: Glyph lookup76654
+Node: Basic glyph lookup77778
+Node: Fontmap78658
+Node: Fallback font81187
+Node: Suppressing warnings82099
+Node: mktex scripts83226
+Node: mktex configuration84441
+Node: mktex script names90244
+Node: mktex script arguments91630
+Node: Programming92509
+Node: Programming overview93082
+Node: Calling sequence95943
+Node: Program-specific files102475
+Node: Programming with config files103498
+Node: Reporting bugs105085
+Node: Bug checklist105763
+Node: Mailing lists109235
+Node: Debugging109910
+Node: Logging114987
+Node: Common problems116854
+Node: Unable to find files117331
+Node: Slow path searching119741
+Node: Unable to generate fonts121116
+Node: TeX or Metafont failing123587
+Node: Index124789

End Tag Table
diff --git a/Build/source/texk/kpathsea/doc/kpathsea.texi b/Build/source/texk/kpathsea/doc/kpathsea.texi
index cbaa101867e..ff8fdbe8725 100644
--- a/Build/source/texk/kpathsea/doc/kpathsea.texi
+++ b/Build/source/texk/kpathsea/doc/kpathsea.texi
@@ -2,8 +2,8 @@
@setfilename kpathsea.info
@settitle Kpathsea: A library for path searching
-@set version 6.3.1
-@set month-year March 2019
+@set version 6.3.2
+@set month-year August 2019
@copying
This file documents the Kpathsea library for path searching.
@@ -570,6 +570,11 @@ In the order in which Kpathsea looks for them:
@enumerate
@item
+@opindex @samp{--cnf-line}, source for path
+A command-line option such as @code{--cnf-line}, available in
+@file{kpsewhich} and most @TeX{} engines. @xref{Path searching
+options}.
+
@cindex environment variable, source for path
A user-set environment variable, e.g., @code{TEXINPUTS}.
Environment variables with an underscore and the program name appended
@@ -1473,6 +1478,28 @@ become case-sensitive when the underlying (file)system is
case-insensitive, it merely means that Kpathsea does not do any
casefolding itself.
+@item --cnf-line=@var{str}
+@opindex --cnf-line
+Parse @var{str} as if it were a line in the @file{texmf.cnf}
+configuration file (@pxref{Config files}), overriding settings in the
+actual configuration files, and also in the environment (@pxref{Path
+sources}). This is implemented by making any settings from @var{str}
+in the environment, overwriting any value already there. Thus, an
+extra colon in a @samp{--cnf-line} value will refer to the value from
+a configuration file, not a user-set environment variable.
+
+Furthermore, any variable set from @var{str} will also be set with the
+program name suffix. For example, @code{pdftex
+--cnf-line=TEXINPUTS=/foo:} will set both @code{TEXINPUTS} and
+@code{TEXINPUTS_pdftex} in the environment (and the value will be
+@file{/foo} followed by the setting from @file{texmf.cnf}, ignoring
+any user-set @code{TEXINPUTS}).
+
+This behavior is desirable because, in practice, many variables in the
+distributed @file{texmf.cnf} are program-specific, and the intuitive
+behavior is for values set on the command line with @code{--cnf-line}
+to override them.
+
@item --dpi=@var{num}
@opindex --dpi=@var{num}
@opindex -D @var{num}
@@ -1857,8 +1884,8 @@ Example: @samp{FOO='.;~' kpsewhich --var-brace-value=FOO} outputs (on
a Unix-ish system) @samp{.:/home/karl}, supposing the latter is the
current user's home directory. Note that the @samp{;} in the source
value, as commonly used in @file{texmf.cnf}, has changed to a
-@samp{:}, as the normal path separator on the current system. (On a
-Windows-ish system, the @samp{;} would remain.)
+@samp{:}, as the normal path separator on the current system. On a
+Windows-ish system, the @samp{;} would remain.
@item --var-value=@var{variable}
@opindex --var-value=@var{variable}
@@ -1874,7 +1901,7 @@ default is not changed) @samp{1}.
Example to contrast with @samp{--var-brace-value}: @samp{FOO='.;~'
kpsewhich --var-value=FOO} outputs @samp{.;~}, i.e., the same as the
-input value.
+input value, on all systems.
@end table
diff --git a/Build/source/texk/kpathsea/kpsewhich.c b/Build/source/texk/kpathsea/kpsewhich.c
index 1be21f39889..119ebb5a9f1 100644
--- a/Build/source/texk/kpathsea/kpsewhich.c
+++ b/Build/source/texk/kpathsea/kpsewhich.c
@@ -19,6 +19,7 @@
#include <kpathsea/config.h>
#include <kpathsea/c-ctype.h>
#include <kpathsea/c-pathch.h>
+#include <kpathsea/cnf.h>
#include <kpathsea/expand.h>
#include <kpathsea/getopt.h>
#include <kpathsea/line.h>
@@ -39,10 +40,14 @@ string path_to_show = NULL;
string var_to_value = NULL;
string var_to_brace_value = NULL;
+/* Array/count of cnf lines from the command line. (--cnf-line) */
+static string *user_cnf_lines = NULL;
+static unsigned user_cnf_nlines = 0;
+
/* Base resolution. (-D, -dpi) */
unsigned dpi = 600;
-/* The engine name, for '$engine' construct in texmf.cnf. (-engine) */
+/* The engine name, for `$engine' construct in texmf.cnf. (-engine) */
string engine = NULL;
/* Interactively ask for names to look up? (-interactive) */
@@ -474,6 +479,7 @@ to also use -engine, or nothing will be returned; in particular,\n\
\n\
-all output all matches, one per line (no effect with pk/gf).\n\
[-no]-casefold-search fall back to case-insensitive search if no exact match.\n\
+-cnf-line=STRING parse STRING as a configuration file line.\n\
-debug=NUM set debugging flags.\n\
-D, -dpi=NUM use a base resolution of NUM; default 600.\n\
-engine=STRING set engine name to STRING.\n\
@@ -588,6 +594,7 @@ static struct option long_options[]
= { { "D", 1, 0, 0 },
{ "all", 0, (int *) &show_all, 1 },
{ "casefold-search", 0, 0, 0 },
+ { "cnf-line", 1, 0, 0 },
{ "debug", 1, 0, 0 },
{ "dpi", 1, 0, 0 },
{ "engine", 1, 0, 0 },
@@ -637,6 +644,17 @@ read_command_line (kpathsea kpse, int argc, string *argv)
(by default). */
xputenv ("texmf_casefold_search", "1");
+ } else if (ARGUMENT_IS ("cnf-line")) {
+ if (user_cnf_lines == NULL) {
+ user_cnf_nlines = 1;
+ user_cnf_lines = xmalloc (sizeof (const_string));
+ } else {
+ user_cnf_nlines++;
+ user_cnf_lines = xrealloc (user_cnf_lines,
+ user_cnf_nlines * sizeof (const_string));
+ }
+ user_cnf_lines[user_cnf_nlines-1] = xstrdup (optarg);
+
} else if (ARGUMENT_IS ("debug")) {
kpse->debug |= atoi (optarg);
@@ -742,6 +760,15 @@ init_more (kpathsea kpse)
if (engine)
kpathsea_xputenv (kpse, "engine", engine);
+ /* We want config lines from the command line to override config files. */
+ if (user_cnf_lines) {
+ unsigned i;
+ for (i = 0; i < user_cnf_nlines; i++) {
+ kpathsea_cnf_line_env_progname (kpse, user_cnf_lines[i]);
+ free (user_cnf_lines[i]);
+ }
+ }
+
/* Disable all mktex programs unless they were explicitly enabled on our
command line. */
#define DISABLE_MKTEX(fmt) \
diff --git a/Build/source/texk/kpathsea/tests/cnfline.test b/Build/source/texk/kpathsea/tests/cnfline.test
new file mode 100755
index 00000000000..bffe8808b9d
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/cnfline.test
@@ -0,0 +1,27 @@
+#!/bin/sh -vx
+# $Id$
+# Copyright 2019 Karl Berry <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+cnf_dir=$srcdir/tests/cnfline
+
+# Just for fun, let's first try the --cnf-line feature to set TEXMFCNF.
+val=`./kpsewhich "--cnf-line=TEXMFCNF=$cnf_dir" --var-value=othervar`
+test x"$val" = x300 || exit 1
+
+# But for the rest, just use the environment, to keep things simpler.
+TEXMFCNF=$cnf_dir; export TEXMFCNF
+
+# Make sure we get expected values from the test texmf.cnf.
+val=`./kpsewhich --var-value=maxpr`
+test x"$val" = x200 || exit 1
+#
+val=`./kpsewhich --progname=foo --var-value=maxpr`
+test x"$val" = x100 || exit 1
+#
+val=`./kpsewhich --var-value=othervar`
+test x"$val" = x300 || exit 1
+
+# Now override on cmd line -- both texmf.cnf values should get overridden.
+val=`./kpsewhich --cnf-line=maxpr=99 --var-value=maxpr`
+test x"$val" = x99 || exit 1
diff --git a/Build/source/texk/kpathsea/tests/cnfline/texmf.cnf b/Build/source/texk/kpathsea/tests/cnfline/texmf.cnf
new file mode 100644
index 00000000000..164f25744f5
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/cnfline/texmf.cnf
@@ -0,0 +1,5 @@
+# $Id$
+# Public domain. This tiny texmf.cnf is for kpathsea/tests/cnfline.test.
+maxpr=100
+maxpr.kpsewhich=200
+othervar=300
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index 100b340606e..f2a59c147ef 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,10 @@
+2019-08-06 Karl Berry <karl@freefriends.org>
+
+ * texmfmp-help.h (ALEPHHELP, EPTEXHELP, ETEXHELP, EUPTEXHELP,
+ MFHELP, PDFTEXHELP, PTEXHELP, TEXHELP, UPTEXHELP, XETEXHELP):
+ add -cnf-line. (I.e., everything but the lua-based engines,
+ as they do not share the common source.)
+
2019-08-04 Karl Berry <karl@freefriends.org>
* doc/web2c.texi (Shell escapes): default value no longer as stated.
diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in
index a4b5a7a0ec7..d08c62502fc 100644
--- a/Build/source/texk/web2c/Makefile.in
+++ b/Build/source/texk/web2c/Makefile.in
@@ -3081,12 +3081,13 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \
$(pdftex_tests) tests/wprob.tex pdftexdir/tests/pdfimage.tex \
tests/1-4.jpg tests/B.pdf tests/basic.tex \
tests/lily-ledger-broken.png tests/expanded.tex \
- $(ttf2afm_tests) pdftexdir/tests/postV3.afm \
- pdftexdir/tests/postV3.ttf pdftexdir/tests/postV7.afm \
- pdftexdir/tests/postV7.ttf $(pdftosrc_tests) \
- pdftexdir/tests/test-13.pdf pdftexdir/tests/test-13.xref \
- pdftexdir/tests/test-15.pdf pdftexdir/tests/test-15.xref \
- $(libluasocket_sources) luatexdir/luasocket/src/ftp_lua.c \
+ tests/expanded.txt tests/cnfline.tex $(ttf2afm_tests) \
+ pdftexdir/tests/postV3.afm pdftexdir/tests/postV3.ttf \
+ pdftexdir/tests/postV7.afm pdftexdir/tests/postV7.ttf \
+ $(pdftosrc_tests) pdftexdir/tests/test-13.pdf \
+ pdftexdir/tests/test-13.xref pdftexdir/tests/test-15.pdf \
+ pdftexdir/tests/test-15.xref $(libluasocket_sources) \
+ luatexdir/luasocket/src/ftp_lua.c \
luatexdir/luasocket/src/headers_lua.c \
luatexdir/luasocket/src/http_lua.c \
luatexdir/luasocket/src/ltn12_lua.c \
@@ -3397,10 +3398,10 @@ DISTCLEANFILES = CXXLD.sh tangle.c tangle.h tangle.p tangle-web2c \
pdfprimitive-euptex.* $(nodist_pdftex_SOURCES) pdftex.ch \
pdftex-web2c pdftex.p pdftex.pool pdftex-tangle pwprob.log \
pwprob.tex pdfimage.fmt pdfimage.log pdfimage.pdf expanded.log \
- postV3.afm postV7.afm test-13.pdf test-13.xref test-15.pdf \
- test-15.xref $(nodist_libluatex_sources) luaimage.* \
- luajitimage.* $(nodist_xetex_SOURCES) xetex.web xetex.ch \
- xetex-web2c xetex.p xetex.pool xetex-tangle bug73.fmt \
+ cnfline.log postV3.afm postV7.afm test-13.pdf test-13.xref \
+ test-15.pdf test-15.xref $(nodist_libluatex_sources) \
+ luaimage.* luajitimage.* $(nodist_xetex_SOURCES) xetex.web \
+ xetex.ch xetex-web2c xetex.p xetex.pool xetex-tangle bug73.fmt \
bug73.log bug73.out bug73.tex filedump.log filedump.out \
filedump.tex $(omegaware_programs:=.c) \
$(omegaware_programs:=.h) $(omegaware_programs:=.p) \
@@ -4062,7 +4063,8 @@ pdftex_ch_srcs = \
# pdfTeX tests
#
pdftex_tests = pdftexdir/wprob.test pdftexdir/pdftex.test \
- pdftexdir/pdfimage.test pdftexdir/expanded.test
+ pdftexdir/pdfimage.test pdftexdir/expanded.test \
+ pdftexdir/tests/cnfline.test
ttf2afm_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/pdftexdir
ttf2afm_SOURCES = pdftexdir/ttf2afm.c
@@ -19642,7 +19644,8 @@ pdftex.tex: $(srcdir)/pdftexdir/pdftex.web
weave $(srcdir)/pdftexdir/pdftex.web
pdftexdir/wprob.log pdftexdir/pdftex.log \
- pdftexdir/pdfimage.log pdftexdir/expanded.log: pdftex$(EXEEXT)
+ pdftexdir/pdfimage.log pdftexdir/expanded.log \
+ pdftexdir/cnfline.log: pdftex$(EXEEXT)
pdftexdir/ttf2afm.log: ttf2afm$(EXEEXT)
$(pdftosrc_OBJECTS): $(ZLIB_DEPEND) $(LIBPNG_DEPEND) $(XPDF_DEPEND)
diff --git a/Build/source/texk/web2c/NEWS b/Build/source/texk/web2c/NEWS
index a270ea4de6f..1c6943fa980 100644
--- a/Build/source/texk/web2c/NEWS
+++ b/Build/source/texk/web2c/NEWS
@@ -1,5 +1,9 @@
This file records noteworthy changes. (Public domain.)
+
+* New cross-engine option -cnf-line=STR.
+
+2019 (for TeX Live 2019, 7 April 2019)
BibTeX: subsidiary .aux files are looked for in the directory of the
main .aux file, if not found as-is (to work better with -output-directory).
@@ -8,7 +12,6 @@ CWEB: now comes from the CWEBbin package
more language support, and more.
-2019 (for TeX Live 2019, 7 April 2019)
2018 (for TeX Live 2018, 14 April 2018)
* Directories in the -output-directory do not mask files by the same name.
@@ -16,8 +19,6 @@ more language support, and more.
2016 (for TeX Live 2016, 21 May 2016)
2015 (for TeX Live 2015, 21 May 2015)
2014 (for TeX Live 2014, 24 May 2014)
-* Ditto.
-
2013 (for TeX Live 2013, 30 May 2013)
* Doc changes and bug fixes.
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index 68adeb1192a..b0d9c472d10 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,13 @@
+2019-08-06 Karl Berry <karl@freefriends.org>
+
+ * texmfmp.c (long_options): new option --cnf-line.
+ (user_cnf_lines, user_cnf_nlines): new globals.
+ (maininit): call kpathsea_cnf_line_env_progname
+ on each specified --cnf-line.
+ (parse_options): recognize it and save each arg.
+ Following suggestion from Pavel Sanda on ntg-pdftex,
+ 15 Jun 2019 19:02:11.
+
2019-07-01 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
* texmfmp.c (getcreationdate): Fix a wrong conditional (XeTeX only).
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index 9d8303777ca..5ebb35c84c1 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -14,6 +14,7 @@
#include <kpathsea/config.h>
#include <kpathsea/c-ctype.h>
+#include <kpathsea/cnf.h>
#include <kpathsea/line.h>
#include <kpathsea/readable.h>
#include <kpathsea/variable.h>
@@ -663,6 +664,10 @@ int argc;
/* If the user overrides argv[0] with -progname. */
static const_string user_progname;
+/* Array and count of values given with --config-line. */
+static string *user_cnf_lines = NULL;
+static unsigned user_cnf_nlines = 0;
+
/* The C version of the jobname, if given. */
static const_string c_job_name;
@@ -813,6 +818,15 @@ maininit (int ac, string *av)
/* FIXME: gather engine names in a single spot. */
xputenv ("engine", TEXMFENGINENAME);
+ if (user_cnf_lines) {
+ unsigned i;
+ for (i = 0; i < user_cnf_nlines; i++) {
+ /* debug printf ("ucnf%d: %s\n", i, user_cnf_lines[i]); */
+ kpathsea_cnf_line_env_progname (kpse_def, user_cnf_lines[i]);
+ free (user_cnf_lines[i]);
+ }
+ }
+
/* Were we given a simple filename? */
main_input_file = get_input_file_name ();
@@ -998,6 +1012,7 @@ maininit (int ac, string *av)
/* The entry point: set up for reading the command line, which will
happen in `topenin', then call the main body. */
+
int
#if defined(DLLPROC)
DLLPROC (int ac, string *av)
@@ -1633,17 +1648,18 @@ get_input_file_name (void)
static struct option long_options[]
= { { DUMP_OPTION, 1, 0, 0 },
#ifdef TeX
- /* FIXME: Obsolete -- for backward compatibility only. */
+ /* Obsolete -- for backward compatibility only. */
{ "efmt", 1, 0, 0 },
#endif
+ { "cnf-line", 1, 0, 0 },
{ "help", 0, 0, 0 },
{ "ini", 0, &iniversion, 1 },
{ "interaction", 1, 0, 0 },
{ "halt-on-error", 0, &haltonerrorp, 1 },
{ "kpathsea-debug", 1, 0, 0 },
{ "progname", 1, 0, 0 },
- { "version", 0, 0, 0 },
{ "recorder", 0, &recorder_enabled, 1 },
+ { "version", 0, 0, 0 },
#ifdef TeX
#ifdef IPC
{ "ipc", 0, &ipcon, 1 },
@@ -1740,6 +1756,17 @@ parse_options (int argc, string *argv)
} else if (ARGUMENT_IS ("progname")) {
user_progname = optarg;
+ } else if (ARGUMENT_IS ("cnf-line")) {
+ if (user_cnf_lines == NULL) {
+ user_cnf_nlines = 1;
+ user_cnf_lines = xmalloc (sizeof (const_string));
+ } else {
+ user_cnf_nlines++;
+ user_cnf_lines = xrealloc (user_cnf_lines,
+ user_cnf_nlines * sizeof (const_string));
+ }
+ user_cnf_lines[user_cnf_nlines-1] = xstrdup (optarg);
+
} else if (ARGUMENT_IS ("jobname")) {
#ifdef XeTeX
c_job_name = optarg;
diff --git a/Build/source/texk/web2c/man/ChangeLog b/Build/source/texk/web2c/man/ChangeLog
index 4cde33451fe..ad90435ff0f 100644
--- a/Build/source/texk/web2c/man/ChangeLog
+++ b/Build/source/texk/web2c/man/ChangeLog
@@ -1,3 +1,11 @@
+2019-08-06 Karl Berry <karl@freefriends.org>
+
+ * aleph.man,
+ * etex.man,
+ * mf.man,
+ * pdftex.man,
+ * tex.man: mention --cnf-line.
+
2019-08-04 Karl Berry <karl@freefriends.org>
* pdftex.man (-synctex, -8bit): add per https://bugs.debian.org/772928.
diff --git a/Build/source/texk/web2c/man/aleph.man b/Build/source/texk/web2c/man/aleph.man
index c61010acee7..9a34ad16c19 100644
--- a/Build/source/texk/web2c/man/aleph.man
+++ b/Build/source/texk/web2c/man/aleph.man
@@ -1,4 +1,4 @@
-.TH ALEPH 1 "27 May 2018" "Web2C @VERSION@"
+.TH ALEPH 1 "6 August 2019" "Web2C @VERSION@"
.\"=====================================================================
.if n .ds MF Metafont
.if t .ds MF Metafont
@@ -56,6 +56,13 @@ activity.
Run aleph --help to see the complete list of options; this is not
exhaustive.
.TP
+.BI -cnf-line \ string
+Parse
+.I string
+as a
+.I texmf.cnf
+configuration line. See the Kpathsea manual.
+.TP
.BI --fmt \ format
Use
.I format
diff --git a/Build/source/texk/web2c/man/etex.man b/Build/source/texk/web2c/man/etex.man
index d8a6d23cf4c..4e72d1b2ba9 100644
--- a/Build/source/texk/web2c/man/etex.man
+++ b/Build/source/texk/web2c/man/etex.man
@@ -1,4 +1,4 @@
-.TH ETEX 1 "27 May 2018" "Web2C @VERSION@"
+.TH ETEX 1 "6 August 2019" "Web2C @VERSION@"
.\"=====================================================================
.if n .ds MF Metafont
.if t .ds MF Metafont
@@ -68,7 +68,15 @@ the other \*(TX programs in the
implementation.
.\"=====================================================================
.SH OPTIONS
-This version of e-\*(TX understands the following command line options.
+Run etex --help to see the complete list of options; this is not
+exhaustive.
+.TP
+.BI -cnf-line \ string
+Parse
+.I string
+as a
+.I texmf.cnf
+configuration line. See the Kpathsea manual.
.TP
.BI -fmt \ format
Use
diff --git a/Build/source/texk/web2c/man/mf.man b/Build/source/texk/web2c/man/mf.man
index d4383062135..24c87f042cb 100644
--- a/Build/source/texk/web2c/man/mf.man
+++ b/Build/source/texk/web2c/man/mf.man
@@ -1,4 +1,4 @@
-.TH MF 1 "17 January 2018" "Web2C @VERSION@"
+.TH MF 1 "6 August 2019" "Web2C @VERSION@"
.\"=====================================================================
.if n .ds MF Metafont
.if t .ds MF Metafont
@@ -252,6 +252,13 @@ as the name of the base to be used, instead of the name by which
.I %&
line.
.TP
+.BI -cnf-line \ string
+Parse
+.I string
+as a
+.I texmf.cnf
+configuration line. See the Kpathsea manual.
+.TP
.B -file-line-error
Print error messages in the form
.I file:line:error
diff --git a/Build/source/texk/web2c/man/pdftex.man b/Build/source/texk/web2c/man/pdftex.man
index 421de6ad4fa..6f7302d91fa 100644
--- a/Build/source/texk/web2c/man/pdftex.man
+++ b/Build/source/texk/web2c/man/pdftex.man
@@ -1,4 +1,4 @@
-.TH PDFTEX 1 "4 August 2019" "Web2C @VERSION@"
+.TH PDFTEX 1 "6 August 2019" "Web2C @VERSION@"
.\"=====================================================================
.if n .ds MF Metafont
.if t .ds MF Metafont
@@ -95,6 +95,13 @@ extensions, and pdfe\*(TX is just a copy of pdf\*(TX. See
.SH OPTIONS
This version of pdf\*(TX understands the following command line options.
.TP
+.BI -cnf-line \ string
+Parse
+.I string
+as a
+.I texmf.cnf
+configuration line. See the Kpathsea manual.
+.TP
.B -draftmode
Sets \epdfdraftmode so pdf\*(TX doesn't write a PDF and doesn't read any
included images, thus speeding up execution.
@@ -104,7 +111,7 @@ Enable the enc\*(TX extensions. This option is only effective in
combination with
.BR -ini .
For documentation of the enc\*(TX extensions see
-.BR http://www.olsak.net/enctex.html .
+http://www.olsak.net/enctex.html.
.TP
.B -etex
Enable the e-\*(TX extensions. This option is only effective in
diff --git a/Build/source/texk/web2c/man/tex.man b/Build/source/texk/web2c/man/tex.man
index 445ab949c10..8260b0883b6 100644
--- a/Build/source/texk/web2c/man/tex.man
+++ b/Build/source/texk/web2c/man/tex.man
@@ -1,4 +1,4 @@
-.TH TEX 1 "16 June 2015" "Web2C @VERSION@"
+.TH TEX 1 "6 August 2019" "Web2C @VERSION@"
.\"=====================================================================
.if n .ds MF Metafont
.if t .ds MF Metafont
@@ -182,6 +182,13 @@ EOF character (usually control-D).
.SH OPTIONS
This version of \*(TX understands the following command line options.
.TP
+.BI -cnf-line \ string
+Parse
+.I string
+as a
+.I texmf.cnf
+configuration line. See the Kpathsea manual.
+.TP
.B -enc
Enable the enc\*(TX extensions. This option is only effective in
combination with
@@ -488,7 +495,7 @@ Addison-Wesley, 1985, ISBN 0-201-15790-X.
.br
K. Berry,
.IR "Eplain: Expanded plain \*(TX" ,
-ftp://ftp.cs.umb.edu/pub/tex/eplain/doc.
+https://tug.org/eplain
.br
Michael Spivak,
.IR "The Joy of \*(OX" ,
@@ -496,6 +503,7 @@ Michael Spivak,
.br
.I TUGboat
(the journal of the \*(TX Users Group).
+https://tug.org/TUGboat
.\"=====================================================================
.SH TRIVIA
\*(TX, pronounced properly, rhymes with ``blecchhh.'' The proper
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog
index 82c291e6702..10e4b6d8171 100644
--- a/Build/source/texk/web2c/pdftexdir/ChangeLog
+++ b/Build/source/texk/web2c/pdftexdir/ChangeLog
@@ -1,3 +1,10 @@
+2019-08-06 Karl Berry <karl@freefriends.org>
+
+ * tests/cnfline.test,
+ * tests/cnfline.tex: new files.
+ * am/pdftex.am (pdftex_tests): add pdftexdir/tests/cnfline.test.
+ (cnfline.log): depend on pdftex$(EXEEXT).
+
2019-05-08 Akira Kakuto <kakuto@w32tex.org>
* writeimg.c: Use a new function find_input_file() to find
diff --git a/Build/source/texk/web2c/pdftexdir/am/pdftex.am b/Build/source/texk/web2c/pdftexdir/am/pdftex.am
index 152787d77b3..e22dccfdf4a 100644
--- a/Build/source/texk/web2c/pdftexdir/am/pdftex.am
+++ b/Build/source/texk/web2c/pdftexdir/am/pdftex.am
@@ -1,6 +1,6 @@
## texk/web2c/pdftexdir/am/pdftex.am: Makefile fragment for pdfTeX.
##
-## Copyright 2016-2018 Karl Berry <tex-live@tug.org>
+## Copyright 2016-2019 Karl Berry <tex-live@tug.org>
## Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
@@ -95,10 +95,12 @@ EXTRA_DIST += \
# pdfTeX tests
#
pdftex_tests = pdftexdir/wprob.test pdftexdir/pdftex.test \
- pdftexdir/pdfimage.test pdftexdir/expanded.test
+ pdftexdir/pdfimage.test pdftexdir/expanded.test \
+ pdftexdir/tests/cnfline.test
pdftexdir/wprob.log pdftexdir/pdftex.log \
- pdftexdir/pdfimage.log pdftexdir/expanded.log: pdftex$(EXEEXT)
+ pdftexdir/pdfimage.log pdftexdir/expanded.log \
+ pdftexdir/cnfline.log: pdftex$(EXEEXT)
EXTRA_DIST += $(pdftex_tests)
@@ -116,5 +118,9 @@ EXTRA_DIST += pdftexdir/tests/pdfimage.tex \
DISTCLEANFILES += pdfimage.fmt pdfimage.log pdfimage.pdf
## expanded.test
-EXTRA_DIST += tests/expanded.tex
+EXTRA_DIST += tests/expanded.tex tests/expanded.txt
DISTCLEANFILES += expanded.log
+
+## cnfline.test
+EXTRA_DIST += tests/cnfline.tex
+DISTCLEANFILES += cnfline.log
diff --git a/Build/source/texk/web2c/pdftexdir/tests/cnfline.test b/Build/source/texk/web2c/pdftexdir/tests/cnfline.test
new file mode 100644
index 00000000000..0b9047a73d0
--- /dev/null
+++ b/Build/source/texk/web2c/pdftexdir/tests/cnfline.test
@@ -0,0 +1,23 @@
+#! /bin/sh -vx
+# $Id$
+# Public domain. Originally written by Karl Berry
+# Basic check that --cnf-line does something.
+
+LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE
+
+TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF
+TEXINPUTS=$srcdir/pdftexdir/tests; export TEXINPUTS
+
+./pdftex -ini --interaction=batchmode \
+ --cnf-line=max_print_line=500 cnfline.tex || exit $?
+
+if grep 'those hyphens are' cnfline.log >/dev/null; then
+ : # ok, all ended up on one line
+else
+ echo "log message got broken despite max_print_line" >&2
+ cat cnflinelog >&2
+ exit 1
+fi
+
+exit 0
+
diff --git a/Build/source/texk/web2c/pdftexdir/tests/cnfline.tex b/Build/source/texk/web2c/pdftexdir/tests/cnfline.tex
new file mode 100644
index 00000000000..f9f694aacde
--- /dev/null
+++ b/Build/source/texk/web2c/pdftexdir/tests/cnfline.tex
@@ -0,0 +1,13 @@
+% $Id$
+% Public domain. Test file for --cnf-line.
+% Originally written 2019 by Karl Berry.
+
+\catcode`\{=1 \catcode`\}=2 % can run under -ini
+
+\write-1{the idea is to write a message longer than the default
+ max-print-line (those hyphens are really underscores).}
+\end
+
+% with the default max_print_line, we get:
+% the idea is to write a message longer than the default max-print-line (those hy
+% phens are really underscores).
diff --git a/Build/source/texk/web2c/texmfmp-help.h b/Build/source/texk/web2c/texmfmp-help.h
index f8358656c19..1e720340c42 100644
--- a/Build/source/texk/web2c/texmfmp-help.h
+++ b/Build/source/texk/web2c/texmfmp-help.h
@@ -1,6 +1,6 @@
/* The help messages for TeX & MF family of programs.
-Copyright 1995, 1996, 2008-2016 Karl Berry.
+Copyright 1995, 1996, 2008-2019 Karl Berry.
Copyright 2001-05 Olaf Weber.
This program is free software; you can redistribute it and/or modify
@@ -40,6 +40,7 @@ const_string ALEPHHELP[] = {
"",
" If no arguments or options are specified, prompt for input.",
"",
+ "-cnf-line=STRING parse STRING as a configuration file line",
"-etex enable e-TeX extensions",
"[-no]-file-line-error disable/enable file:line:error style messages",
"-fmt=FMTNAME use FMTNAME instead of program name or a %& line",
@@ -95,6 +96,7 @@ const_string EPTEXHELP[] = {
"",
" If no arguments or options are specified, prompt for input.",
"",
+ "-cnf-line=STRING parse STRING as a configuration file line",
"-etex enable e-TeX extensions",
"-fmt=NAME use NAME instead of program name or %&format.",
#if defined(WIN32)
@@ -159,6 +161,7 @@ const_string ETEXHELP[] = {
"",
" If no arguments or options are specified, prompt for input.",
"",
+ "-cnf-line=STRING parse STRING as a configuration file line",
"-enc enable encTeX extensions such as \\mubyte",
"-etex enable e-TeX extensions",
"[-no]-file-line-error disable/enable file:line:error style messages",
@@ -222,6 +225,7 @@ const_string EUPTEXHELP[] = {
"",
" If no arguments or options are specified, prompt for input.",
"",
+ "-cnf-line=STRING parse STRING as a configuration file line",
"-etex enable e-TeX extensions",
"-fmt=NAME use NAME instead of program name or %&format.",
#if defined(WIN32)
@@ -289,6 +293,7 @@ const_string MFHELP[] = {
" If no arguments or options are specified, prompt for input.",
"",
"-base=BASENAME use BASENAME instead of program name or a %& line",
+ "-cnf-line=STRING parse STRING as a configuration file line",
"[-no]-file-line-error disable/enable file:line:error style messages",
"-halt-on-error stop processing at the first error",
"-ini be inimf, for dumping bases; this is implicitly",
@@ -421,6 +426,7 @@ const_string PDFTEXHELP[] = {
"",
" If no arguments or options are specified, prompt for input.",
"",
+ "-cnf-line=STRING parse STRING as a configuration file line",
"-draftmode switch on draft mode (generates no output PDF)",
"-enc enable encTeX extensions such as \\mubyte",
"-etex enable e-TeX extensions",
@@ -489,6 +495,7 @@ const_string PTEXHELP[] = {
"",
" If no arguments or options are specified, prompt for input.",
"",
+ "-cnf-line=STRING parse STRING as a configuration file line",
"-fmt=NAME use NAME instead of program name or %&format.",
#if defined(WIN32)
"[-no]-guess-input-enc disable/enable to guess input file encoding",
@@ -552,6 +559,7 @@ const_string TEXHELP[] = {
"",
" If no arguments or options are specified, prompt for input.",
"",
+ "-cnf-line=STRING parse STRING as a configuration file line",
"-enc enable encTeX extensions such as \\mubyte",
"[-no]-file-line-error disable/enable file:line:error style messages",
"-fmt=FMTNAME use FMTNAME instead of program name or a %& line",
@@ -614,6 +622,7 @@ const_string UPTEXHELP[] = {
"",
" If no arguments or options are specified, prompt for input.",
"",
+ "-cnf-line=STRING parse STRING as a configuration file line",
"-fmt=NAME use NAME instead of program name or %&format.",
#if defined(WIN32)
"[-no]-guess-input-enc disable/enable to guess input file encoding",
@@ -677,6 +686,7 @@ const_string XETEXHELP[] = {
"",
" If no arguments or options are specified, prompt for input.",
"",
+ "-cnf-line=STRING parse STRING as a configuration file line",
"-etex enable e-TeX extensions",
"[-no]-file-line-error disable/enable file:line:error style messages",
"-fmt=FMTNAME use FMTNAME instead of program name or a %& line",