texlive[69473] Build/source/texk/kpathsea: make kpse_* companions for
commits+karl at tug.org
commits+karl at tug.org
Wed Jan 17 23:59:12 CET 2024
Revision: 69473
https://tug.org/svn/texlive?view=revision&revision=69473
Author: karl
Date: 2024-01-17 23:59:12 +0100 (Wed, 17 Jan 2024)
Log Message:
-----------
make kpse_* companions for the new (and older) kpathsea_* fns
Modified Paths:
--------------
trunk/Build/source/texk/kpathsea/ChangeLog
trunk/Build/source/texk/kpathsea/doc/kpathsea.info
trunk/Build/source/texk/kpathsea/doc/kpathsea.texi
trunk/Build/source/texk/kpathsea/tex-file.c
trunk/Build/source/texk/kpathsea/tex-file.h
Modified: trunk/Build/source/texk/kpathsea/ChangeLog
===================================================================
--- trunk/Build/source/texk/kpathsea/ChangeLog 2024-01-17 20:39:32 UTC (rev 69472)
+++ trunk/Build/source/texk/kpathsea/ChangeLog 2024-01-17 22:59:12 UTC (rev 69473)
@@ -1,3 +1,12 @@
+2024-01-17 Karl Berry <karl at freefriends.org>
+
+ * tex-file.c (kpse_{in,out}_name_ok{,_silent}_extended):
+ declare the kpse_* abbreviations of the new (and old) kpathsea_*
+ functions. LuaTeX provides both kpse.* and kpathsea.* bindings,
+ so it's good to always have both.
+ * tex-file.h: declare them.
+ * doc/kpathsea.texi (Safe filenames): mention them.
+
2024-01-14 Karl Berry <karl at freefriends.org>
* version.ac: bump to 6.4.0/dev.
Modified: trunk/Build/source/texk/kpathsea/doc/kpathsea.info
===================================================================
--- trunk/Build/source/texk/kpathsea/doc/kpathsea.info 2024-01-17 20:39:32 UTC (rev 69472)
+++ trunk/Build/source/texk/kpathsea/doc/kpathsea.info 2024-01-17 22:59:12 UTC (rev 69473)
@@ -2635,6 +2635,11 @@
kpathsea_in_name_ok_silent
kpathsea_in_name_ok_silent_extended
+ Furthermore, there are ‘kpse_...’ versions of all the above functions
+(as usual), with the default library instance implicitly passed as the
+first argument. LuaTeX provides both ‘kpse.*’ and ‘kpathsea.*’
+bindings, so it's good to always have both.
+
Sorry for the combinatorial explosion, but we hope no further options
will ever be needed. If so, we'll likely provide a more generic
interface as well as the above.
@@ -4166,19 +4171,19 @@
Node: Calling sequence103755
Node: Safe filenames109092
Ref: openout_any109251
-Node: Program-specific files112839
-Node: Programming with config files113892
-Node: Reporting bugs115539
-Node: Bug checklist116217
-Node: Mailing lists119774
-Node: Debugging120451
-Node: Logging125708
-Node: Common problems127615
-Node: Unable to find files128092
-Node: Slow path searching130548
-Node: Unable to generate fonts131943
-Node: TeX or Metafont failing134479
-Node: Index135681
+Node: Program-specific files113104
+Node: Programming with config files114157
+Node: Reporting bugs115804
+Node: Bug checklist116482
+Node: Mailing lists120039
+Node: Debugging120716
+Node: Logging125973
+Node: Common problems127880
+Node: Unable to find files128357
+Node: Slow path searching130813
+Node: Unable to generate fonts132208
+Node: TeX or Metafont failing134744
+Node: Index135946
End Tag Table
Modified: trunk/Build/source/texk/kpathsea/doc/kpathsea.texi
===================================================================
--- trunk/Build/source/texk/kpathsea/doc/kpathsea.texi 2024-01-17 20:39:32 UTC (rev 69472)
+++ trunk/Build/source/texk/kpathsea/doc/kpathsea.texi 2024-01-17 22:59:12 UTC (rev 69473)
@@ -3475,6 +3475,11 @@
kpathsea_in_name_ok_silent_extended
@end example
+Furthermore, there are @code{kpse_...} versions of all the above
+functions (as usual), with the default library instance implicitly
+passed as the first argument. Lua at TeX{} provides both @code{kpse.*}
+and @code{kpathsea.*} bindings, so it's good to always have both.
+
Sorry for the combinatorial explosion, but we hope no further options
will ever be needed. If so, we'll likely provide a more generic
interface as well as the above.
Modified: trunk/Build/source/texk/kpathsea/tex-file.c
===================================================================
--- trunk/Build/source/texk/kpathsea/tex-file.c 2024-01-17 20:39:32 UTC (rev 69472)
+++ trunk/Build/source/texk/kpathsea/tex-file.c 2024-01-17 22:59:12 UTC (rev 69473)
@@ -1342,6 +1342,7 @@
boolean
kpathsea_in_name_ok_silent (kpathsea kpse, const_string fname)
{
+ /* For input default to all. */
return
kpathsea_name_ok (kpse, fname, "openin_any", "a", ok_reading, true, false);
}
@@ -1470,22 +1471,33 @@
}
#if defined (KPSE_COMPAT_API)
-boolean
-kpse_in_name_ok (const_string fname)
-{
- /* For input default to all. */
- return kpathsea_in_name_ok (kpse_def, fname);
-}
+boolean kpse_in_name_ok (const_string fname)
+{ return kpathsea_in_name_ok (kpse_def, fname); }
-boolean
-kpse_out_name_ok (const_string fname)
-{
- /* For output, default to paranoid. */
- return kpathsea_out_name_ok (kpse_def, fname);
-}
-#endif
+boolean kpse_out_name_ok (const_string fname)
+{ return kpathsea_out_name_ok (kpse_def, fname); }
+boolean kpse_in_name_ok_silent (const_string fname)
+{ return kpathsea_in_name_ok_silent (kpse_def, fname); }
+boolean kpse_out_name_ok_silent (const_string fname)
+{ return kpathsea_out_name_ok_silent (kpse_def, fname); }
+
+boolean kpse_in_name_ok_extended (const_string fname)
+{ return kpathsea_in_name_ok_extended (kpse_def, fname); }
+
+boolean kpse_out_name_ok_extended (const_string fname)
+{ return kpathsea_out_name_ok_extended (kpse_def, fname); }
+
+boolean kpse_in_name_ok_silent_extended (const_string fname)
+{ return kpathsea_in_name_ok_silent_extended (kpse_def, fname); }
+
+boolean kpse_out_name_ok_silent_extended (const_string fname)
+{ return kpathsea_out_name_ok_silent_extended (kpse_def, fname); }
+
+#endif /* KPSE_COMPAT_API */
+
+
/* Open NAME along the search path for TYPE for reading and return the
resulting file, or exit with an error message. */
Modified: trunk/Build/source/texk/kpathsea/tex-file.h
===================================================================
--- trunk/Build/source/texk/kpathsea/tex-file.h 2024-01-17 20:39:32 UTC (rev 69472)
+++ trunk/Build/source/texk/kpathsea/tex-file.h 2024-01-17 22:59:12 UTC (rev 69473)
@@ -112,6 +112,7 @@
#if defined (KPSE_COMPAT_API)
+/* Abbreviations without the initial kpathsea argument. */
extern void kpse_init_fallback_resolutions (string envvar);
extern KPSEDLL void kpse_set_program_enabled (kpse_file_format_type fmt,
@@ -134,6 +135,15 @@
extern KPSEDLL boolean kpse_in_name_ok (const_string fname);
extern KPSEDLL boolean kpse_out_name_ok (const_string fname);
+extern KPSEDLL boolean kpse_in_name_ok_silent (const_string fname);
+extern KPSEDLL boolean kpse_out_name_ok_silent (const_string fname);
+
+extern KPSEDLL boolean kpse_in_name_ok_extended (const_string fname);
+extern KPSEDLL boolean kpse_out_name_ok_extended (const_string fname);
+
+extern KPSEDLL boolean kpse_in_name_ok_silent_extended (const_string fname);
+extern KPSEDLL boolean kpse_out_name_ok_silent_extended (const_string fname);
+
/* Here are some abbreviations. */
#define kpse_find_mf(name) kpse_find_file (name, kpse_mf_format, true)
#define kpse_find_mft(name) kpse_find_file (name, kpse_mft_format, true)
More information about the tex-live-commits
mailing list.