texlive[51830] Build/source/texk: new cross-engine (and kpsewhich)

commits+karl at tug.org commits+karl at tug.org
Wed Aug 7 01:33:18 CEST 2019


Revision: 51830
          http://tug.org/svn/texlive?view=revision&revision=51830
Author:   karl
Date:     2019-08-07 01:33:17 +0200 (Wed, 07 Aug 2019)
Log Message:
-----------
new cross-engine (and kpsewhich) option --cnf-line

Modified Paths:
--------------
    trunk/Build/source/texk/kpathsea/ChangeLog
    trunk/Build/source/texk/kpathsea/Makefile.am
    trunk/Build/source/texk/kpathsea/Makefile.in
    trunk/Build/source/texk/kpathsea/cnf.c
    trunk/Build/source/texk/kpathsea/cnf.h
    trunk/Build/source/texk/kpathsea/doc/kpathsea.info
    trunk/Build/source/texk/kpathsea/doc/kpathsea.texi
    trunk/Build/source/texk/kpathsea/kpsewhich.c
    trunk/Build/source/texk/web2c/ChangeLog
    trunk/Build/source/texk/web2c/Makefile.in
    trunk/Build/source/texk/web2c/NEWS
    trunk/Build/source/texk/web2c/lib/ChangeLog
    trunk/Build/source/texk/web2c/lib/texmfmp.c
    trunk/Build/source/texk/web2c/man/ChangeLog
    trunk/Build/source/texk/web2c/man/aleph.man
    trunk/Build/source/texk/web2c/man/etex.man
    trunk/Build/source/texk/web2c/man/mf.man
    trunk/Build/source/texk/web2c/man/pdftex.man
    trunk/Build/source/texk/web2c/man/tex.man
    trunk/Build/source/texk/web2c/pdftexdir/ChangeLog
    trunk/Build/source/texk/web2c/pdftexdir/am/pdftex.am
    trunk/Build/source/texk/web2c/texmfmp-help.h

Added Paths:
-----------
    trunk/Build/source/texk/kpathsea/tests/cnfline/
    trunk/Build/source/texk/kpathsea/tests/cnfline/texmf.cnf
    trunk/Build/source/texk/kpathsea/tests/cnfline.test
    trunk/Build/source/texk/web2c/pdftexdir/tests/cnfline.test
    trunk/Build/source/texk/web2c/pdftexdir/tests/cnfline.tex

Modified: trunk/Build/source/texk/kpathsea/ChangeLog
===================================================================
--- trunk/Build/source/texk/kpathsea/ChangeLog	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/kpathsea/ChangeLog	2019-08-06 23:33:17 UTC (rev 51830)
@@ -1,3 +1,25 @@
+2019-08-06  Karl Berry  <karl at 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 at tug.org>
 
 	* texmf.cnf (TEXINPUTS, etc.): include explicit latex,
@@ -1288,7 +1310,7 @@
 
 2012-03-04  Peter Breitenlohner  <peb at 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.
 

Modified: trunk/Build/source/texk/kpathsea/Makefile.am
===================================================================
--- trunk/Build/source/texk/kpathsea/Makefile.am	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/kpathsea/Makefile.am	2019-08-06 23:33:17 UTC (rev 51830)
@@ -1,7 +1,7 @@
 ## $Id$
 ## Makefile.am for the TeX Live subdirectory texk/kpathsea/
 ##
-## Copyright 2017 Karl Berry <tex-live at tug.org>
+## Copyright 2017-2019 Karl Berry <tex-live at tug.org>
 ## Copyright 2009-2015 Peter Breitenlohner <tex-live at tug.org>
 ## You may freely use, modify and/or distribute this file.
 
@@ -307,10 +307,10 @@
 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)
@@ -317,6 +317,7 @@
 #
 EXTRA_DIST += $(TESTS)
 EXTRA_DIST += tests/cnfnewline/texmf.cnf
+EXTRA_DIST += tests/cnfline/texmf.cnf
 
 # Rebuild
 rebuild_prereq =

Modified: trunk/Build/source/texk/kpathsea/Makefile.in
===================================================================
--- trunk/Build/source/texk/kpathsea/Makefile.in	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/kpathsea/Makefile.in	2019-08-06 23:33:17 UTC (rev 51830)
@@ -759,7 +759,7 @@
 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 @@
 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 @@
 
 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)

Modified: trunk/Build/source/texk/kpathsea/cnf.c
===================================================================
--- trunk/Build/source/texk/kpathsea/cnf.c	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/kpathsea/cnf.c	2019-08-06 23:33:17 UTC (rev 51830)
@@ -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,27 +163,59 @@
       }
   }
 
-  /* 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 @@
   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 @@
           }
         }
 
-        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 @@
   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 @@
     return kpathsea_cnf_get(kpse_def, name);
 }
 #endif
-

Modified: trunk/Build/source/texk/kpathsea/cnf.h
===================================================================
--- trunk/Build/source/texk/kpathsea/cnf.h	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/kpathsea/cnf.h	2019-08-06 23:33:17 UTC (rev 51830)
@@ -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,11 +27,31 @@
 #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).  */
+   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 name);
+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);
 #endif

Modified: trunk/Build/source/texk/kpathsea/doc/kpathsea.info
===================================================================
--- trunk/Build/source/texk/kpathsea/doc/kpathsea.info	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/kpathsea/doc/kpathsea.info	2019-08-06 23:33:17 UTC (rev 51830)
@@ -37,7 +37,7 @@
 ****************
 
 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 @@
 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 @@
 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 @@
      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 @@
      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 @@
      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 @@
                                                               (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 @@
 * -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 @@
 * 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 @@
                                                               (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 @@
 * 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,7 +3450,7 @@
                                                               (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)
@@ -3429,7 +3457,7 @@
 * 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 @@
 * 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 @@
 * 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 @@
 
 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

Modified: trunk/Build/source/texk/kpathsea/doc/kpathsea.texi
===================================================================
--- trunk/Build/source/texk/kpathsea/doc/kpathsea.texi	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/kpathsea/doc/kpathsea.texi	2019-08-06 23:33:17 UTC (rev 51830)
@@ -2,8 +2,8 @@
 @setfilename kpathsea.info
 @settitle Kpathsea: A library for path searching
 
- at set version 6.3.1
- at set month-year March 2019
+ at set version 6.3.2
+ at set month-year August 2019
 
 @copying
 This file documents the Kpathsea library for path searching.
@@ -570,6 +570,11 @@
 
 @enumerate
 @item
+ at opindex @samp{--cnf-line}, source for path
+A command-line option such as @code{--cnf-line}, available in
+ at 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 @@
 case-insensitive, it merely means that Kpathsea does not do any
 casefolding itself.
 
+ at item --cnf-line=@var{str}
+ at 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
+ at code{TEXINPUTS_pdftex} in the environment (and the value will be
+ at 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 @@
 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
- at samp{:}, as the normal path separator on the current system. (On a
-Windows-ish system, the @samp{;} would remain.)
+ at 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 @@
 
 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
 

Modified: trunk/Build/source/texk/kpathsea/kpsewhich.c
===================================================================
--- trunk/Build/source/texk/kpathsea/kpsewhich.c	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/kpathsea/kpsewhich.c	2019-08-06 23:33:17 UTC (rev 51830)
@@ -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 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 @@
 \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 @@
   = { { "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 @@
          (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 @@
   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) \

Added: trunk/Build/source/texk/kpathsea/tests/cnfline/texmf.cnf
===================================================================
--- trunk/Build/source/texk/kpathsea/tests/cnfline/texmf.cnf	                        (rev 0)
+++ trunk/Build/source/texk/kpathsea/tests/cnfline/texmf.cnf	2019-08-06 23:33:17 UTC (rev 51830)
@@ -0,0 +1,5 @@
+# $Id$
+# Public domain. This tiny texmf.cnf is for kpathsea/tests/cnfline.test. 
+maxpr=100
+maxpr.kpsewhich=200
+othervar=300


Property changes on: trunk/Build/source/texk/kpathsea/tests/cnfline/texmf.cnf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Added: trunk/Build/source/texk/kpathsea/tests/cnfline.test
===================================================================
--- trunk/Build/source/texk/kpathsea/tests/cnfline.test	                        (rev 0)
+++ trunk/Build/source/texk/kpathsea/tests/cnfline.test	2019-08-06 23:33:17 UTC (rev 51830)
@@ -0,0 +1,27 @@
+#!/bin/sh -vx
+# $Id$
+# Copyright 2019 Karl Berry <tex-live at 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


Property changes on: trunk/Build/source/texk/kpathsea/tests/cnfline.test
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Modified: trunk/Build/source/texk/web2c/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ChangeLog	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/web2c/ChangeLog	2019-08-06 23:33:17 UTC (rev 51830)
@@ -1,3 +1,10 @@
+2019-08-06  Karl Berry  <karl at 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 at freefriends.org>
 
 	* doc/web2c.texi (Shell escapes): default value no longer as stated.

Modified: trunk/Build/source/texk/web2c/Makefile.in
===================================================================
--- trunk/Build/source/texk/web2c/Makefile.in	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/web2c/Makefile.in	2019-08-06 23:33:17 UTC (rev 51830)
@@ -3081,12 +3081,13 @@
 	$(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 @@
 	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 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 @@
 	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)

Modified: trunk/Build/source/texk/web2c/NEWS
===================================================================
--- trunk/Build/source/texk/web2c/NEWS	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/web2c/NEWS	2019-08-06 23:33:17 UTC (rev 51830)
@@ -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 @@
 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 @@
 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.
 

Modified: trunk/Build/source/texk/web2c/lib/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/lib/ChangeLog	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/web2c/lib/ChangeLog	2019-08-06 23:33:17 UTC (rev 51830)
@@ -1,3 +1,13 @@
+2019-08-06  Karl Berry  <karl at 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 at gmail.com>
 
 	* texmfmp.c (getcreationdate): Fix a wrong conditional (XeTeX only).

Modified: trunk/Build/source/texk/web2c/lib/texmfmp.c
===================================================================
--- trunk/Build/source/texk/web2c/lib/texmfmp.c	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/web2c/lib/texmfmp.c	2019-08-06 23:33:17 UTC (rev 51830)
@@ -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 @@
 /* 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 @@
   /* 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 @@
 /* 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,9 +1648,10 @@
 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 },
@@ -1642,8 +1658,8 @@
       { "halt-on-error",             0, &haltonerrorp, 1 },
       { "kpathsea-debug",            1, 0, 0 },
       { "progname",                  1, 0, 0 },
+      { "recorder",                  0, &recorder_enabled, 1 },
       { "version",                   0, 0, 0 },
-      { "recorder",                  0, &recorder_enabled, 1 },
 #ifdef TeX
 #ifdef IPC
       { "ipc",                       0, &ipcon, 1 },
@@ -1740,6 +1756,17 @@
     } 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;

Modified: trunk/Build/source/texk/web2c/man/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/man/ChangeLog	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/web2c/man/ChangeLog	2019-08-06 23:33:17 UTC (rev 51830)
@@ -1,3 +1,11 @@
+2019-08-06  Karl Berry  <karl at freefriends.org>
+
+	* aleph.man,
+	* etex.man,
+	* mf.man,
+	* pdftex.man,
+	* tex.man: mention --cnf-line.
+	
 2019-08-04  Karl Berry  <karl at freefriends.org>
 
 	* pdftex.man (-synctex, -8bit): add per https://bugs.debian.org/772928.

Modified: trunk/Build/source/texk/web2c/man/aleph.man
===================================================================
--- trunk/Build/source/texk/web2c/man/aleph.man	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/web2c/man/aleph.man	2019-08-06 23:33:17 UTC (rev 51830)
@@ -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 @@
 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

Modified: trunk/Build/source/texk/web2c/man/etex.man
===================================================================
--- trunk/Build/source/texk/web2c/man/etex.man	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/web2c/man/etex.man	2019-08-06 23:33:17 UTC (rev 51830)
@@ -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,8 +68,16 @@
 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
 .I format

Modified: trunk/Build/source/texk/web2c/man/mf.man
===================================================================
--- trunk/Build/source/texk/web2c/man/mf.man	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/web2c/man/mf.man	2019-08-06 23:33:17 UTC (rev 51830)
@@ -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 @@
 .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

Modified: trunk/Build/source/texk/web2c/man/pdftex.man
===================================================================
--- trunk/Build/source/texk/web2c/man/pdftex.man	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/web2c/man/pdftex.man	2019-08-06 23:33:17 UTC (rev 51830)
@@ -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 @@
 .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 @@
 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

Modified: trunk/Build/source/texk/web2c/man/tex.man
===================================================================
--- trunk/Build/source/texk/web2c/man/tex.man	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/web2c/man/tex.man	2019-08-06 23:33:17 UTC (rev 51830)
@@ -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 @@
 .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 @@
 .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 @@
 .br
 .I TUGboat
 (the journal of the \*(TX Users Group).
+https://tug.org/TUGboat
 .\"=====================================================================
 .SH TRIVIA
 \*(TX, pronounced properly, rhymes with ``blecchhh.''  The proper

Modified: trunk/Build/source/texk/web2c/pdftexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/ChangeLog	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/web2c/pdftexdir/ChangeLog	2019-08-06 23:33:17 UTC (rev 51830)
@@ -1,3 +1,10 @@
+2019-08-06  Karl Berry  <karl at 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 at w32tex.org>
 
 	* writeimg.c: Use a new function find_input_file() to find

Modified: trunk/Build/source/texk/web2c/pdftexdir/am/pdftex.am
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/am/pdftex.am	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/web2c/pdftexdir/am/pdftex.am	2019-08-06 23:33:17 UTC (rev 51830)
@@ -1,6 +1,6 @@
 ## texk/web2c/pdftexdir/am/pdftex.am: Makefile fragment for pdfTeX.
 ##
-## Copyright 2016-2018 Karl Berry <tex-live at tug.org>
+## Copyright 2016-2019 Karl Berry <tex-live at tug.org>
 ## Copyright 2009-2015 Peter Breitenlohner <tex-live at tug.org>
 ## You may freely use, modify and/or distribute this file.
 
@@ -95,10 +95,12 @@
 # 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 @@
 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

Added: trunk/Build/source/texk/web2c/pdftexdir/tests/cnfline.test
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/tests/cnfline.test	                        (rev 0)
+++ trunk/Build/source/texk/web2c/pdftexdir/tests/cnfline.test	2019-08-06 23:33:17 UTC (rev 51830)
@@ -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
+


Property changes on: trunk/Build/source/texk/web2c/pdftexdir/tests/cnfline.test
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Added: trunk/Build/source/texk/web2c/pdftexdir/tests/cnfline.tex
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/tests/cnfline.tex	                        (rev 0)
+++ trunk/Build/source/texk/web2c/pdftexdir/tests/cnfline.tex	2019-08-06 23:33:17 UTC (rev 51830)
@@ -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).


Property changes on: trunk/Build/source/texk/web2c/pdftexdir/tests/cnfline.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Modified: trunk/Build/source/texk/web2c/texmfmp-help.h
===================================================================
--- trunk/Build/source/texk/web2c/texmfmp-help.h	2019-08-06 21:45:44 UTC (rev 51829)
+++ trunk/Build/source/texk/web2c/texmfmp-help.h	2019-08-06 23:33:17 UTC (rev 51830)
@@ -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 @@
     "",
     "  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 @@
     "",
     "  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 @@
     "",
     "  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 @@
     "",
     "  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 @@
     "  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 @@
     "",
     "  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 @@
     "",
     "  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 @@
     "",
     "  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 @@
     "",
     "  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 @@
     "",
     "  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",



More information about the tex-live-commits mailing list