summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-01-17 22:59:12 +0000
committerKarl Berry <karl@freefriends.org>2024-01-17 22:59:12 +0000
commit5035efb71ab96c5066cc16cdabf7b1b336558145 (patch)
tree52b19847f77e88de1a3e70e532bb8be3460e040f /Build
parent87fef8b2e4f617ccb2a04a5728821bf5eaef7dff (diff)
make kpse_* companions for the new (and older) kpathsea_* fns
git-svn-id: svn://tug.org/texlive/trunk@69473 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog9
-rw-r--r--Build/source/texk/kpathsea/doc/kpathsea.info31
-rw-r--r--Build/source/texk/kpathsea/doc/kpathsea.texi5
-rw-r--r--Build/source/texk/kpathsea/tex-file.c38
-rw-r--r--Build/source/texk/kpathsea/tex-file.h10
5 files changed, 67 insertions, 26 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index e58bb8552c8..624632621eb 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,12 @@
+2024-01-17 Karl Berry <karl@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@freefriends.org>
* version.ac: bump to 6.4.0/dev.
diff --git a/Build/source/texk/kpathsea/doc/kpathsea.info b/Build/source/texk/kpathsea/doc/kpathsea.info
index 3a9ad5f4bf6..702aff57799 100644
--- a/Build/source/texk/kpathsea/doc/kpathsea.info
+++ b/Build/source/texk/kpathsea/doc/kpathsea.info
@@ -2635,6 +2635,11 @@ Thus:
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: Programming overview100844
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
diff --git a/Build/source/texk/kpathsea/doc/kpathsea.texi b/Build/source/texk/kpathsea/doc/kpathsea.texi
index 2f848ae81d2..cf1e27255f4 100644
--- a/Build/source/texk/kpathsea/doc/kpathsea.texi
+++ b/Build/source/texk/kpathsea/doc/kpathsea.texi
@@ -3475,6 +3475,11 @@ kpathsea_in_name_ok_silent
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@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.
diff --git a/Build/source/texk/kpathsea/tex-file.c b/Build/source/texk/kpathsea/tex-file.c
index 57eefee941c..203841075ee 100644
--- a/Build/source/texk/kpathsea/tex-file.c
+++ b/Build/source/texk/kpathsea/tex-file.c
@@ -1342,6 +1342,7 @@ kpathsea_name_ok (kpathsea kpse, const_string fname, const_string check_var,
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,20 +1471,31 @@ kpathsea_out_name_ok_extended (kpathsea kpse, const_string fname)
}
#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 */
diff --git a/Build/source/texk/kpathsea/tex-file.h b/Build/source/texk/kpathsea/tex-file.h
index dd7602a2bcc..0457f992cda 100644
--- a/Build/source/texk/kpathsea/tex-file.h
+++ b/Build/source/texk/kpathsea/tex-file.h
@@ -112,6 +112,7 @@ extern KPSEDLL void kpathsea_reset_program_name (kpathsea kpse,
#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 string *kpse_find_file_generic
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)