diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-11-15 03:48:57 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-11-15 03:48:57 +0000 |
commit | c89886bd0aa4448961266c5fdd6ef6b78035a7e0 (patch) | |
tree | e40ba38c883e2acdbe37cd5508f5909d3c9b4bf9 /Build/source/texk | |
parent | 690d94784c133d0cee9298485f4a574a67e5e1b3 (diff) |
web2c/luatexdir: Sync with the upstream trunk.
git-svn-id: svn://tug.org/texlive/trunk@38854 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/NEWS | 122 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/image/writejpg.w | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luatex.c | 13 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/textoken.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/textoken.w | 7 |
5 files changed, 138 insertions, 11 deletions
diff --git a/Build/source/texk/web2c/luatexdir/NEWS b/Build/source/texk/web2c/luatexdir/NEWS index 0f36f279eca..61b7f284c05 100644 --- a/Build/source/texk/web2c/luatexdir/NEWS +++ b/Build/source/texk/web2c/luatexdir/NEWS @@ -2,6 +2,126 @@ This file is in the public domain. ============================================================== +Luatex beta-0.85.0 was released 2015111400 (5509) +============================================================== + + +-- roadmap + +The 0.85 release is has a lot of changes. It is the prelude to 0.90 which itself is +a prelude to the 0.95 that will go on texlive 2016. The 1.00 release will happen +around the 2016 context meeting. After that 2.* will become the next experimental +branch (leading to 3.*). The most important changes between 0.80 and 0.85 are mentioned +below. For more information consult the manual. + +-- the backend commands + +There is a better separation between front- and backend code. Some of the generic +\pdf* commands have been promoted to core primitives (with different names), some +have been removes like ximagecolordepth and ximagebbox have been removed and +all that are left have been organized differently. The backend is now more abstract +and provides three primitives only + + \pdfextension <keyword> <optional spec> + \pdfvariable <keyword> + \pdffeedback <keyword> + +The first replaces \pdfannot and alike, the second replaces the variables that can +be sused to control behaviour, and the third accesses the read only variables. See +luatex-pdf.tex in the context distribution for a plain definition file. + +The big advantage of the separation (basically core (lua)tex + extensions) is that +changes in the backend don't have consequences for the frontend and it's easier to +locate possible issues in the code. We might split a bit more at the lua end too. + +-- nodes + +The boundary, dir and localpar whatsits are now normal nodes. The xforms and ximage +whatsits are now a special kind of rule nodes (subtypes 1 and 2) and known as box- +and image resources (see manual). Also, empty rules are now a valid subtype (subtype +3) with related commands \nohrule and \novrule. + +At the lua end one can now access the fields of a spec subnode directly in the parent, +which has the benefit of more control and robust assignments (no need to check for +writeability) while we keep the concept of shared glue specs (tex internals). By +staying close to traditional TeX the Knuthian documentation still applies in most +cases. + +The pdf action nodes are now pdf_action whatsit nodes (so no longer a pseudo core +node). + +You can get the node subtypes with the node.subtypes function which adds a layer +of abstraction (foo.subtype = "string" might be added in the future). + +-- expansion + +The hz optimization already only supported level 2 optimization, but now has a variant +3 that does only stretch glyphs and not kerns. Pending is a change where we go back to +percentages instead of fractions of em. + +-- math + +The old/new codepath has been checked and italic correction which is fundamental +different between the engines has been (partially) redone. + +We now have \mathsurroundskip that replaces mathsurround when it's non zero. + +The \mathtoptions (old 1) directive can be used for testing. This primitive is mostly for +ourselves and used for development. + +The \Umathcharclass, \Umathcharfam and \Umathcharslot primitives can be used to fetch +properties of a math character. + +The new \Uleft, \Uright and \Umiddle fence operators accept "height <dimen>", "depth +<dimen>" and the "noaxis" keyword as well the "exact" keyword for non-fitting ones. There +is also \Uvextension. Optionally one can specify a 'class'. + +The \Udelimiter[under|over] and \U[under|over]delimiter primitives accept a width as well +as left, middle and right keywords (for non fitting ones). There is also \Uhextension. + +The \abovewithdelimiter command accepts 'exact' as keyword (before the dimension) which nils +the excessive spacing. The normal vgaps still apply. + +We have a new fraction primitive \Uskewed with a companion \Uskewedwithdelims. Optional +keywords are 'noaxis' and 'exact'. + +There is a new directive \mathdisplayskipmode (esp for controlling the > 0 below skip check). + +With \mathscriptsmode you can fix anchoring of scripts (as needed for chemistry). + +The \Umathaccent commands accept a width and fraction argument. + +-- hyhenation + +The discretionary command now accept an optional "penalty <number>" specification +where the penalty will be stored with the node. Default is hyphenpenalty. + +-- file io + +texio.write/write_nl now writes to file if the first argument is a (valid) number +reference to a file opened at the tex end + +-- lua interface + +The tex.<internal variable> is hopefully better now. The tex.get* also can handle +the built in registers. Especially prevdepth access should work out ok now. + +-- and ... + +As usual there are lots of small fixes, improvements, overhauls, small additions, +hopefully all mentioned in the manual. + +-- warning + +This version is probably not compatible with the macro package that you use as some +engine specific initializations need to take place (\pdf commands) and some node types +have been changed. We now have separated pdf backend commands and the only left +primitive categories are: core, (tex), etex and luatex, so no more pdftex, omega and +umath (where the distinction became to fuzzy). Of course you can still prefix. + + + +============================================================== Luatex beta-0.81.0 was released 2015100722 (5350) ============================================================== @@ -2445,7 +2565,7 @@ Other news: we probably introduced new problems as well). * Most (all?) files now have a corrected Copyright header, - and link in $Id: NEWS 5348 2015-10-07 13:45:11Z luigi $ and $URL: https://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/NEWS $ into the object file. + and link in $Id: NEWS 5508 2015-11-14 11:58:08Z luigi $ and $URL: https://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/NEWS $ into the object file. * Some unnecessary files were removed from the distribution. diff --git a/Build/source/texk/web2c/luatexdir/image/writejpg.w b/Build/source/texk/web2c/luatexdir/image/writejpg.w index bfb218fdc46..7780f312922 100644 --- a/Build/source/texk/web2c/luatexdir/image/writejpg.w +++ b/Build/source/texk/web2c/luatexdir/image/writejpg.w @@ -164,7 +164,10 @@ read_APP1_Exif (FILE *fp, unsigned short length, int *xx, int *yy) double xres = 72.0; double yres = 72.0; double res_unit = 1.0; - fread(buffer, length, 1, fp); + size_t ret_len; + ret_len = fread(buffer, length, 1, fp); + if (ret_len != 1) + goto err ; p = buffer; while ((p < buffer + length) && (*p == 0)) ++p; diff --git a/Build/source/texk/web2c/luatexdir/luatex.c b/Build/source/texk/web2c/luatexdir/luatex.c index 726288a6176..43e1079191a 100644 --- a/Build/source/texk/web2c/luatexdir/luatex.c +++ b/Build/source/texk/web2c/luatexdir/luatex.c @@ -422,7 +422,7 @@ int runsystem(const char *cmd) int allow = 0; char *safecmd = NULL; char *cmdname = NULL; - + int status = 0; if (shellenabledp <= 0) { return 0; } @@ -432,12 +432,15 @@ int runsystem(const char *cmd) allow = 1; else allow = shell_cmd_is_allowed(cmd, &safecmd, &cmdname); - + if (allow == 1) - (void) system(cmd); + status = system(cmd); else if (allow == 2) - (void) system(safecmd); - + status = system(safecmd); + /* Not really meaningful, but we have to manage the return value of system. */ + if (status != 0) + fprintf(stderr,"system returned with code %d\n", status); + if (safecmd) free(safecmd); if (cmdname) diff --git a/Build/source/texk/web2c/luatexdir/tex/textoken.h b/Build/source/texk/web2c/luatexdir/tex/textoken.h index 321799551f5..9da21492ce3 100644 --- a/Build/source/texk/web2c/luatexdir/tex/textoken.h +++ b/Build/source/texk/web2c/luatexdir/tex/textoken.h @@ -128,7 +128,7 @@ extern void check_outer_validity(void); extern boolean scan_keyword(const char *); extern halfword active_to_cs(int, int); extern void get_token_lua(void); -halfword string_to_toks(char *); +halfword string_to_toks(const char *); extern int get_char_cat_code(int); /* diff --git a/Build/source/texk/web2c/luatexdir/tex/textoken.w b/Build/source/texk/web2c/luatexdir/tex/textoken.w index b22f3cdd62e..dc010805116 100644 --- a/Build/source/texk/web2c/luatexdir/tex/textoken.w +++ b/Build/source/texk/web2c/luatexdir/tex/textoken.w @@ -1500,16 +1500,17 @@ void get_token_lua(void) @ changes the string |s| to a token list @c -halfword string_to_toks(char *ss) +halfword string_to_toks(const char *ss) { halfword p; /* tail of the token list */ halfword q; /* new node being added to the token list via |store_new_token| */ halfword t; /* token being appended */ - char *s = ss, *se = ss + strlen(s); + const char *s = ss; + const char *se = ss + strlen(s); p = temp_token_head; set_token_link(p, null); while (s < se) { - t = (halfword) str2uni((unsigned char *) s); + t = (halfword) str2uni((const unsigned char *) s); s += utf8_size(t); if (t == ' ') t = space_token; |