summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/lua
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2010-04-20 14:22:21 +0000
committerTaco Hoekwater <taco@elvenkind.com>2010-04-20 14:22:21 +0000
commit05f8d0158547b0198f0615e2b5dd51542ba48b41 (patch)
treecf1624e4a0cf28e07fd2c197ad5507791167025d /Build/source/texk/web2c/luatexdir/lua
parentfb7b7f390bf542b5455bf9aae21fb48d8efb1f65 (diff)
new luatex HEAD
git-svn-id: svn://tug.org/texlive/trunk@17944 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua')
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/loslibext.c4
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lpdflib.c4
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luainit.w56
3 files changed, 32 insertions, 32 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/loslibext.c b/Build/source/texk/web2c/luatexdir/lua/loslibext.c
index 8ddc2d2a7e4..467dc975670 100644
--- a/Build/source/texk/web2c/luatexdir/lua/loslibext.c
+++ b/Build/source/texk/web2c/luatexdir/lua/loslibext.c
@@ -25,7 +25,7 @@
#include <time.h>
static const char _svn_version[] =
- "$Id: loslibext.c 3612 2010-04-13 09:29:42Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/loslibext.c $";
+ "$Id: loslibext.c 3634 2010-04-19 19:52:48Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/loslibext.c $";
#if defined(_WIN32) || defined(__NT__)
# define MKDIR(a,b) mkdir(a)
@@ -268,7 +268,7 @@ static char *get_command_name(char *maincmd)
int i, k, quoted;
quoted = k = 0;
for (i = 0; (i < MAX_PATH) && maincmd[i] &&
- (maincmd[i] != ' ' && maincmd[i] != '\t' || quoted); i++) {
+ ((maincmd[i] != ' ' && maincmd[i] != '\t') || quoted); i++) {
if (maincmd[i] == '"') {
quoted = !quoted;
} else {
diff --git a/Build/source/texk/web2c/luatexdir/lua/lpdflib.c b/Build/source/texk/web2c/luatexdir/lua/lpdflib.c
index ff31b6c1dae..e5f688400e9 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lpdflib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lpdflib.c
@@ -18,7 +18,7 @@
with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
static const char _svn_version[] =
- "$Id: lpdflib.c 3612 2010-04-13 09:29:42Z taco $ "
+ "$Id: lpdflib.c 3618 2010-04-15 05:54:45Z taco $ "
"$URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/lpdflib.c $";
#include "lua/luatex-api.h"
@@ -577,7 +577,7 @@ static int l_registerannot(lua_State * L)
if (i <= 0)
luaL_error(L,
"pdf.registerannot() can only register positive object numbers");
- addto_page_resources(static_pdf, obj_type_annot, -i);
+ addto_page_resources(static_pdf, obj_type_annot, i);
break;
default:
luaL_error(L, "pdf.registerannot() needs exactly 1 argument");
diff --git a/Build/source/texk/web2c/luatexdir/lua/luainit.w b/Build/source/texk/web2c/luatexdir/lua/luainit.w
index 3393716b36a..1e5f8681ba5 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luainit.w
+++ b/Build/source/texk/web2c/luatexdir/lua/luainit.w
@@ -28,7 +28,7 @@
#include "ptexlib.h"
static const char _svn_version[] =
- "$Id: luainit.w 3612 2010-04-13 09:29:42Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/luainit.w $";
+ "$Id: luainit.w 3621 2010-04-15 16:08:22Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/branches/0.60.x/source/texk/web2c/luatexdir/lua/luainit.w $";
@
TH: TODO
@@ -224,6 +224,11 @@ static void parse_options(int argc, char **argv)
int option_index;
char *firstfile = NULL;
opterr = 0; /* dont whine */
+ if ((strstr(argv[0], "luatexlua") != NULL) ||
+ (strstr(argv[0], "texlua") != NULL)) {
+ lua_only = 1;
+ luainit = 1;
+ }
for (;;) {
g = getopt_long_only(argc, argv, "+", long_options, &option_index);
@@ -356,42 +361,37 @@ static void parse_options(int argc, char **argv)
uexit(0);
}
}
- /* attempt to find |dump_name| */
- if (argv[optind] && argv[optind][0] == '&') {
+ /* attempt to find |input_name| / |dump_name| */
+ if (lua_only) {
+ if (argv[optind]) {
+ startup_filename = strdup(argv[optind]);
+ lua_offset = optind;
+ }
+ } else if (argv[optind] && argv[optind][0] == '&') {
dump_name = strdup(argv[optind] + 1);
} else if (argv[optind] && argv[optind][0] != '\\') {
if (argv[optind][0] == '*') {
input_name = strdup(argv[optind] + 1);
} else {
firstfile = strdup(argv[optind]);
- if (lua_only) {
- startup_filename = firstfile;
- } else {
- if ((strstr(firstfile, ".lua") ==
- firstfile + strlen(firstfile) - 4)
- || (strstr(firstfile, ".luc") ==
- firstfile + strlen(firstfile) - 4)
- || (strstr(firstfile, ".LUA") ==
- firstfile + strlen(firstfile) - 4)
- || (strstr(firstfile, ".LUC") ==
- firstfile + strlen(firstfile) - 4)
- || (strstr(argv[0], "luatexlua") != NULL)
- || (strstr(argv[0], "texlua") != NULL)) {
- startup_filename = firstfile;
- lua_only = 1;
- lua_offset = optind;
- luainit = 1;
- } else {
- input_name = firstfile;
+ if ((strstr(firstfile, ".lua") ==
+ firstfile + strlen(firstfile) - 4)
+ || (strstr(firstfile, ".luc") ==
+ firstfile + strlen(firstfile) - 4)
+ || (strstr(firstfile, ".LUA") ==
+ firstfile + strlen(firstfile) - 4)
+ || (strstr(firstfile, ".LUC") ==
+ firstfile + strlen(firstfile) - 4)) {
+ if (startup_filename == NULL) {
+ startup_filename = firstfile;
+ lua_offset = optind;
+ lua_only = 1;
+ luainit = 1;
}
+ } else {
+ input_name = firstfile;
}
}
- } else {
- if ((strstr(argv[0], "luatexlua") != NULL) ||
- (strstr(argv[0], "texlua") != NULL)) {
- lua_only = 1;
- luainit = 1;
- }
}
if (safer_option) /* --safer implies --nosocket */
nosocket_option = 1;