summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/doc/kpathsea.texi
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-08-13 22:43:09 +0000
committerKarl Berry <karl@freefriends.org>2019-08-13 22:43:09 +0000
commit0104a8417f2ddda2d30bbfa2b7fa33e75405676a (patch)
tree6a068385addff93e0ebf338b23f76be88b64db43 /Build/source/texk/kpathsea/doc/kpathsea.texi
parent43853632d39f7c6ddc69d0d5adbb2d336e450c4a (diff)
warn about unusual characters in program name qualifiers
git-svn-id: svn://tug.org/texlive/trunk@51875 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/doc/kpathsea.texi')
-rw-r--r--Build/source/texk/kpathsea/doc/kpathsea.texi24
1 files changed, 18 insertions, 6 deletions
diff --git a/Build/source/texk/kpathsea/doc/kpathsea.texi b/Build/source/texk/kpathsea/doc/kpathsea.texi
index ff8fdbe8725..db619f50129 100644
--- a/Build/source/texk/kpathsea/doc/kpathsea.texi
+++ b/Build/source/texk/kpathsea/doc/kpathsea.texi
@@ -647,7 +647,7 @@ mentions most features. The format of @file{texmf.cnf} files follows:
@cindex comments, in @file{texmf.cnf}
Comments start with @samp{%}, either at the beginning of a line or
preceded by whitespace, and continue to the end of the line. That is,
-as with most shells, a @samp{%} in the ``middle'' of a value does not
+similar to most shells, a @samp{%} in the ``middle'' of a value does not
start a comment. Examples:
@example
@@ -681,11 +681,13 @@ lines is not ignored.
The @var{variable} name may contain any character other than whitespace,
@samp{=}, or @samp{.}, but sticking to @samp{A-Za-z_} is safest.
-@item If @samp{.@var{progname}} is present, the definition only
-applies if the program that is running is named (i.e., the last
-component of @code{argv[0]} is) @var{progname} or
-@file{@var{progname}.@{exe,bat,cmd,...@}}. Most notably, this allows
-different flavors of @TeX{} to have different search paths.
+@item If @samp{.@var{progname}} is present (preceding spaces are
+ignored), the definition only applies if the program that is running
+is named (i.e., the last component of @code{argv[0]} is)
+@var{progname} or @file{@var{progname}.@{exe,bat,cmd,...@}}. Most
+notably, this allows different flavors of @TeX{} to have different
+search paths. The @var{progname} value is used literally, without
+variable or other expansions.
@item
@cindex right-hand side of variable assignments
@@ -727,6 +729,16 @@ advantage in this, since all the information would have to passed back
to Kpathsea and parsed there anyway, since the @code{sh} process
couldn't affect its parent's environment.
+The combination of spaces being ignored before the @code{.} of a
+program name qualifer and the optional @samp{=} for the assignment has
+an unexpected consequence: if the value begins with a literal @samp{.}
+and the @samp{=} is omitted, the intended value is interpreted as a
+program name. For example, a line @code{var .;/some/path} is taken as
+an empty value for @code{var} running under the program named
+@samp{;/some/path}. To diagnose this, Kpathsea warns if the program
+name contains a path separator or other special character. The
+simplest way to avoid the problem is to use the @code{=}.
+
@flindex cnf.c
The implementation of all this is in @file{kpathsea/cnf.c}.