diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/lfontlib.c | 18 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/limglib.c | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/lpdflib.c | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/lstatslib.c | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/ltexiolib.c | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/ltexlib.c | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/ltokenlib.c | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/luainit.c | 37 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/luastuff.c | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/luatex.c | 5 |
10 files changed, 49 insertions, 48 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/lfontlib.c b/Build/source/texk/web2c/luatexdir/lua/lfontlib.c index 266553aef45..78e6aa3bf4b 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lfontlib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lfontlib.c @@ -22,7 +22,7 @@ #include "nodes.h" static const char _svn_version[] = - "$Id: lfontlib.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/lfontlib.c $"; + "$Id: lfontlib.c 2347 2009-04-22 11:51:15Z taco $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/lfontlib.c $"; #define TIMERS 0 @@ -34,6 +34,14 @@ static const char _svn_version[] = /* this function is in vfovf.c for the moment */ extern int make_vf_table(lua_State * L, char *name, scaled s); +static int get_fontid (void) +{ + if (font_tables==NULL || font_tables[0]==NULL) { + create_null_font(); + } + return new_font(); +} + static int font_read_tfm(lua_State * L) { internalfontnumber f; @@ -45,8 +53,8 @@ static int font_read_tfm(lua_State * L) if (lua_isnumber(L, 2)) { s = (integer) lua_tonumber(L, 2); if (strlen(cnom)) { - f = new_font(); - if (read_tfm_info(f, cnom, "", s)) { + f = get_fontid(); + if (read_tfm_info(f, cnom, s)) { k = font_to_lua(L, f); delete_font(f); return k; @@ -201,7 +209,7 @@ static int deffont(lua_State * L) double tvdiff; #endif luaL_checktype(L, -1, LUA_TTABLE); - i = new_font(); + i = get_fontid(); #if TIMERS gettimeofday(&tva, NULL); #endif @@ -230,7 +238,7 @@ static int deffont(lua_State * L) /* this returns the expected (!) next fontid. */ static int nextfontid(lua_State * L) { - int i = new_font(); + int i = get_fontid(); lua_pushnumber(L, i); delete_font(i); return 1; diff --git a/Build/source/texk/web2c/luatexdir/lua/limglib.c b/Build/source/texk/web2c/luatexdir/lua/limglib.c index 1054a03a779..ac93fb4305d 100644 --- a/Build/source/texk/web2c/luatexdir/lua/limglib.c +++ b/Build/source/texk/web2c/luatexdir/lua/limglib.c @@ -23,11 +23,11 @@ #include <../lua51/lua.h> #include <../lua51/lauxlib.h> #include <ptexlib.h> -#include "../image/image.h" #include "../luatex-api.h" static const char _svn_version[] = - "$Id: limglib.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/limglib.c $"; + "$Id: limglib.c 2329 2009-04-18 14:25:30Z hhenkel $ " + "$URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/limglib.c $"; /**********************************************************************/ @@ -568,11 +568,6 @@ static int l_scan_image(lua_State * L) return 1; /* image */ } -/* DANGER! these should go into some header file... */ -#define obj_type_ximage 7 -#define obj_aux(a) obj_tab[a].int4 /* auxiliary pointer */ -#define obj_data_ptr obj_aux /* pointer to |pdf_mem| */ - static halfword img_to_node(image * a, integer ref) { image_dict *ad; diff --git a/Build/source/texk/web2c/luatexdir/lua/lpdflib.c b/Build/source/texk/web2c/luatexdir/lua/lpdflib.c index da9f4328a04..ab2761ea13d 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lpdflib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lpdflib.c @@ -21,7 +21,8 @@ #include <ptexlib.h> static const char _svn_version[] = - "$Id: lpdflib.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/lpdflib.c $"; + "$Id: lpdflib.c 2329 2009-04-18 14:25:30Z hhenkel $ " + "$URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/lpdflib.c $"; static int findcurv(lua_State * L) { @@ -98,9 +99,6 @@ int luapdfprint(lua_State * L) return 0; } -/* DANGER! this should go into some header file */ -#define obj_type_others 0 - static int l_immediateobj(lua_State * L) { unsigned i; diff --git a/Build/source/texk/web2c/luatexdir/lua/lstatslib.c b/Build/source/texk/web2c/luatexdir/lua/lstatslib.c index d98cfadfcb4..e012a7bcb69 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lstatslib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lstatslib.c @@ -22,7 +22,7 @@ static const char _svn_version[] = - "$Id: lstatslib.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/lstatslib.c $"; + "$Id: lstatslib.c 2306 2009-04-16 15:01:45Z taco $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/lstatslib.c $"; typedef struct statistic { const char *name; @@ -219,6 +219,7 @@ static int getstats(lua_State * L) static int setstats(lua_State * L) { + (void)L; return 0; } diff --git a/Build/source/texk/web2c/luatexdir/lua/ltexiolib.c b/Build/source/texk/web2c/luatexdir/lua/ltexiolib.c index 28d6a1e1a22..e938c856340 100644 --- a/Build/source/texk/web2c/luatexdir/lua/ltexiolib.c +++ b/Build/source/texk/web2c/luatexdir/lua/ltexiolib.c @@ -21,9 +21,9 @@ #include <ptexlib.h> static const char _svn_version[] = - "$Id: ltexiolib.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/ltexiolib.c $"; + "$Id: ltexiolib.c 2321 2009-04-18 09:17:13Z hhenkel $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/ltexiolib.c $"; -typedef void (*texio_printer) (strnumber s); +typedef void (*texio_printer) (str_number s); static char *loggable_info = NULL; @@ -51,11 +51,11 @@ static boolean get_selector_value(lua_State * L, int i, char *l) static int do_texio_print(lua_State * L, texio_printer printfunction) { - strnumber texs; + str_number texs; char *s; size_t k; int i = 1; - strnumber u = 0; + str_number u = 0; char save_selector = selector; int n = lua_gettop(L); if (n == 0 || !lua_isstring(L, -1)) { diff --git a/Build/source/texk/web2c/luatexdir/lua/ltexlib.c b/Build/source/texk/web2c/luatexdir/lua/ltexlib.c index e7384a40ec2..6326f00c39a 100644 --- a/Build/source/texk/web2c/luatexdir/lua/ltexlib.c +++ b/Build/source/texk/web2c/luatexdir/lua/ltexlib.c @@ -24,7 +24,7 @@ #include "tokens.h" static const char _svn_version[] = - "$Id: ltexlib.c 2282 2009-04-14 11:00:47Z taco $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/ltexlib.c $"; + "$Id: ltexlib.c 2321 2009-04-18 09:17:13Z hhenkel $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/ltexlib.c $"; extern halfword *check_isnode(lua_State * L, int ud); extern void lua_nodelib_push_fast(lua_State * L, halfword n); @@ -521,7 +521,7 @@ static int settoks (lua_State * L) static int gettoks(lua_State * L) { integer k; - strnumber t; + str_number t; k = get_item_index (L, lua_gettop(L), get_toks_base()); check_index_range(k,"gettoks"); t = get_tex_toks_register(k); diff --git a/Build/source/texk/web2c/luatexdir/lua/ltokenlib.c b/Build/source/texk/web2c/luatexdir/lua/ltokenlib.c index 06d1f72359f..41df1101814 100644 --- a/Build/source/texk/web2c/luatexdir/lua/ltokenlib.c +++ b/Build/source/texk/web2c/luatexdir/lua/ltokenlib.c @@ -22,7 +22,7 @@ #include "tokens.h" static const char _svn_version[] = - "$Id: ltokenlib.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/ltokenlib.c $"; + "$Id: ltokenlib.c 2306 2009-04-16 15:01:45Z taco $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/ltokenlib.c $"; extern int get_command_id(char *); @@ -204,6 +204,7 @@ static int run_get_next(lua_State * L) static int run_expand(lua_State * L) { + (void)L; expand(); return 0; } diff --git a/Build/source/texk/web2c/luatexdir/lua/luainit.c b/Build/source/texk/web2c/luatexdir/lua/luainit.c index 5aecc526921..18db3984e4f 100644 --- a/Build/source/texk/web2c/luatexdir/lua/luainit.c +++ b/Build/source/texk/web2c/luatexdir/lua/luainit.c @@ -25,7 +25,7 @@ #include <luatexdir/luatexextra.h> static const char _svn_version[] = - "$Id: luainit.c 2288 2009-04-14 22:56:09Z hhenkel $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/luainit.c $"; + "$Id: luainit.c 2330 2009-04-18 16:21:21Z taco $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/luainit.c $"; /* TH: TODO * @@ -438,20 +438,16 @@ void init_kpse(void) if (!user_progname) { if (ini_version) { user_progname = input_name; + if (!user_progname) { + user_progname = cleaned_invocation_name(argv[0]); + } } else { - if (!startup_filename) { - if (!dump_name) { - dump_name = cleaned_invocation_name(argv[0]); - user_progname = dump_name; - } + if (!dump_name) { + dump_name = cleaned_invocation_name(argv[0]); } + user_progname = dump_name; } } - if (!user_progname) { - fprintf(stdout, "kpathsea mode needs a --progname or --fmt switch\n"); - exit(1); - } - kpse_set_program_enabled(kpse_fmt_format, MAKE_TEX_FMT_BY_DEFAULT, kpse_src_compile); @@ -506,7 +502,6 @@ void lua_initialize(int ac, char **av) interactionoption = 4; dump_name = NULL; -#warning SyncTeX: -synctex command line option available /* 0 means "disable Synchronize TeXnology". * synctexoption is a *.web variable. * We initialize it to a weird value to catch the -synctex command line flag @@ -655,16 +650,16 @@ void write_svnversion(char *v) { char *a_head, *n; char *a = strdup(v); - int l = strlen("$Id: luatex.web "); + size_t l = strlen("$Id: luatex.web "); if (a != NULL) { a_head = a; - if (strlen(a)>l) - a+=l; - n = a; - while (*n!='\0' && *n!=' ') - n++; - *n = '\0'; - fprintf(stdout, " luatex.web v%s", a); - free (a_head); + if (strlen(a)>l) + a+=l; + n = a; + while (*n!='\0' && *n!=' ') + n++; + *n = '\0'; + fprintf(stdout, " luatex.web >= v%s", a); + free (a_head); } } diff --git a/Build/source/texk/web2c/luatexdir/lua/luastuff.c b/Build/source/texk/web2c/luatexdir/lua/luastuff.c index a8ac317b5f1..493e515f7e8 100644 --- a/Build/source/texk/web2c/luatexdir/lua/luastuff.c +++ b/Build/source/texk/web2c/luatexdir/lua/luastuff.c @@ -21,7 +21,7 @@ #include <ptexlib.h> static const char _svn_version[] = - "$Id: luastuff.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/luastuff.c $"; + "$Id: luastuff.c 2321 2009-04-18 09:17:13Z hhenkel $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/luastuff.c $"; lua_State *Luas = NULL; @@ -381,7 +381,7 @@ void luatex_load_init(int s, LoadS * ls) lua_State *luatex_error(lua_State * L, int is_fatal) { - strnumber s; + str_number s; const char *luaerr; size_t len = 0; char *err = NULL; diff --git a/Build/source/texk/web2c/luatexdir/lua/luatex.c b/Build/source/texk/web2c/luatexdir/lua/luatex.c index 41987c681cc..eed9adf27eb 100644 --- a/Build/source/texk/web2c/luatexdir/lua/luatex.c +++ b/Build/source/texk/web2c/luatexdir/lua/luatex.c @@ -22,7 +22,7 @@ #include <zlib.h> static const char _svn_version[] = - "$Id: luatex.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/luatex.c $"; + "$Id: luatex.c 2306 2009-04-16 15:01:45Z taco $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/lua/luatex.c $"; /* do this aleph stuff here, for now */ @@ -251,6 +251,7 @@ static gzFile gz_fmtfile = NULL; void do_zdump(char *p, int item_size, int nitems, FILE * out_file) { int err; + (void)out_file; if (nitems == 0) return; if (gzwrite(gz_fmtfile, (void *) p, item_size * nitems) != @@ -264,6 +265,7 @@ void do_zdump(char *p, int item_size, int nitems, FILE * out_file) void do_zundump(char *p, int item_size, int nitems, FILE * in_file) { int err; + (void)in_file; if (nitems == 0) return; if (gzread(gz_fmtfile, (void *) p, item_size * nitems) <= 0) { @@ -323,6 +325,7 @@ boolean zopen_w_output(FILE ** f, const_string fopen_mode) void zwclose(FILE * f) { + (void)f; gzclose(gz_fmtfile); } |