texlive[55533] Build/source/texk/kpathsea: (kpathsea_make_tex): do
commits+karl at tug.org
commits+karl at tug.org
Sat Jun 13 02:39:50 CEST 2020
Revision: 55533
http://tug.org/svn/texlive?view=revision&revision=55533
Author: karl
Date: 2020-06-13 02:39:50 +0200 (Sat, 13 Jun 2020)
Log Message:
-----------
(kpathsea_make_tex): do not emit warning if filename has unusual characters
Modified Paths:
--------------
trunk/Build/source/texk/kpathsea/ChangeLog
trunk/Build/source/texk/kpathsea/tex-make.c
Modified: trunk/Build/source/texk/kpathsea/ChangeLog
===================================================================
--- trunk/Build/source/texk/kpathsea/ChangeLog 2020-06-12 23:53:23 UTC (rev 55532)
+++ trunk/Build/source/texk/kpathsea/ChangeLog 2020-06-13 00:39:50 UTC (rev 55533)
@@ -1,3 +1,10 @@
+2020-06-12 Karl Berry <karl at freefriends.org>
+
+ * tex-make.c (kpathsea_make_tex): do not emit any warnings for
+ filenames that we don't like, e.g., [Some Fnt]. Leave it up to
+ the caller. Suggestion from David Carlisle,
+ https://tug.org/pipermail/tex-k/2020-June/003214.html
+
2020-06-06 Akira Kakuto <kakuto at w32tex.org>
* readable.c, knj.c: /../, /./, \..\, \.\ should not exist
Modified: trunk/Build/source/texk/kpathsea/tex-make.c
===================================================================
--- trunk/Build/source/texk/kpathsea/tex-make.c 2020-06-12 23:53:23 UTC (rev 55532)
+++ trunk/Build/source/texk/kpathsea/tex-make.c 2020-06-13 00:39:50 UTC (rev 55533)
@@ -1,6 +1,6 @@
/* tex-make.c: run external programs to make TeX-related files.
- Copyright 1993, 1994, 1995, 1996, 1997, 2008-2013, 2018 Karl Berry.
+ Copyright 1993, 1994, 1995, 1996, 1997, 2008-2020 Karl Berry.
Copyright 1997, 1998, 2001-05 Olaf Weber.
This library is free software; you can redistribute it and/or
@@ -417,7 +417,11 @@
/* Create BASE in FORMAT and return the generated filename, or
- return NULL. */
+ return NULL. We used to emit warnings for names we declined to pass
+ on to the scripts, but such names are common with system fonts, so
+ now we are silent (just returning NULL). That is arguably better
+ behavior anyway. Presumably the caller always reports "font not
+ found" anyway. */
string
kpathsea_make_tex (kpathsea kpse, kpse_file_format_type format,
@@ -440,17 +444,18 @@
int argnum;
int i;
- /* FIXME
- * Check whether the name we were given is likely to be a problem.
- * Right now we err on the side of strictness:
- * - may not start with a hyphen (fixable in the scripts).
- * - allowed are: alphanumeric, underscore, hyphen, period, plus
- * ? also allowed DIRSEP, as we can be fed that when creating pk fonts
- * No doubt some possibilities were overlooked.
- */
+ /* Check whether the name we were given is likely to be a problem.
+ All could be fixed in the scripts and/or invocation, but in
+ practice our names are simple, so let's err on the side of strictness:
+ - may not start with a hyphen
+ - allowed are: alphanumeric, underscore, hyphen, period, plus
+ - also allowed: DIRSEP, as we can be fed that when creating pk fonts
+
+ For example, system fonts are likely to contain spaces, and
+ (for filename lookups) be enclosed in square brackets. We don't
+ want to try calling our mktex* scripts on those.
+ */
if (base[0] == '-' /* || IS_DIR_SEP(base[0]) */) {
- fprintf(stderr, "kpathsea:make_tex: Invalid filename `%s', starts with '%c'\n",
- base, base[0]);
return NULL;
}
for (i = 0; base[i]; i++) {
@@ -461,8 +466,6 @@
&& base[i] != '.'
&& !IS_DIR_SEP(base[i]))
{
- fprintf(stderr, "kpathsea:make_tex: Invalid filename `%s', contains '%c'\n",
- base, base[i]);
return NULL;
}
}
More information about the tex-live-commits
mailing list.