summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/lua
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-07-05 09:06:38 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-07-05 09:06:38 +0000
commitcf1fc7b4d3f71633ca71e17dd7044722d19ceda4 (patch)
tree5ba3680df0c5362e3f3137ed207d76f70b745caf /Build/source/texk/web2c/luatexdir/lua
parent1a6220d23fab3c902247d61da5771bfae9a2450c (diff)
luatex, mpost, omfonts: Use kpse_program_basename()
git-svn-id: svn://tug.org/texlive/trunk@31094 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua')
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luainit.w25
1 files changed, 6 insertions, 19 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/luainit.w b/Build/source/texk/web2c/luatexdir/lua/luainit.w
index 90b970c648c..5f8f12d5592 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luainit.w
+++ b/Build/source/texk/web2c/luatexdir/lua/luainit.w
@@ -43,9 +43,9 @@ In fact, it sets three C variables:
|kpse_invocation_name| |kpse_invocation_short_name| |kpse->program_name|
-and four environment variables:
+and five environment variables:
- SELFAUTOLOC SELFAUTODIR SELFAUTOPARENT progname
+ SELFAUTOLOC SELFAUTODIR SELFAUTOPARENT SELFAUTOGRANDPARENT progname
@c
const_string LUATEX_IHELP[] = {
@@ -478,19 +478,6 @@ static char *find_filename(char *name, const char *envkey)
@ @c
-static char *cleaned_invocation_name(char *arg)
-{
- char *ret, *dot;
- const char *start = xbasename(arg);
- ret = xstrdup(start);
- dot = strchr(ret, '.');
- if (dot != NULL) {
- *dot = 0; /* chop */
- }
- return ret;
-}
-
-@ @c
static void init_kpse(void)
{
@@ -514,11 +501,11 @@ static void init_kpse(void)
user_progname = remove_suffix (input_name);
}
if (!user_progname) {
- user_progname = cleaned_invocation_name(argv[0]);
+ user_progname = kpse_program_basename(argv[0]);
}
} else {
if (!dump_name) {
- dump_name = cleaned_invocation_name(argv[0]);
+ dump_name = kpse_program_basename(argv[0]);
}
user_progname = dump_name;
}
@@ -787,11 +774,11 @@ void lua_initialize(int ac, char **av)
}
ptexbanner = banner;
- kpse_invocation_name = cleaned_invocation_name(argv[0]);
+ kpse_invocation_name = kpse_program_basename(argv[0]);
/* be 'luac' */
if (argc >1) {
- if (STREQ(kpse_invocation_name, "texluac"))
+ if (FILESTRCASEEQ(kpse_invocation_name, "texluac"))
exit(luac_main(ac, av));
if (STREQ(argv[1], "--luaconly") || STREQ(argv[1], "--luac")) {
strcpy(av[1], "luatex");