Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Commit

Permalink
sync with experimental rev. 7124.
Browse files Browse the repository at this point in the history
git-svn-id: https://serveur-svn.lri.fr/svn/modhel/luatex/trunk@7125 0b2b3880-5936-4365-a048-eb17d2e5a6bf
  • Loading branch information
luigiScarso committed Mar 23, 2019
1 parent 2f136a4 commit 5f945e8
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 10 deletions.
16 changes: 8 additions & 8 deletions manual/luatex-backend.tex
Original file line number Diff line number Diff line change
Expand Up @@ -578,12 +578,12 @@

\stopsubsection

\startsubsection[title={\type {open}, \type {new}, \type {status}, \type {close}, \type {unencrypt}}]
\startsubsection[title={\type {open}, \type {new}, \type {getstatus}, \type {close}, \type {unencrypt}}]

\libindex {open}
\libindex {new}
\libindex {new}
\libindex {status}
\libindex {getstatus}
\libindex {close}
\libindex {unencrypt}

Expand All @@ -603,7 +603,7 @@
You can check if a document opened well by:

\starttyping
pdfe.status(<pdfe document>)
pdfe.getstatus(<pdfe document>)
\stoptyping

The returned codes are:
Expand All @@ -627,18 +627,18 @@

\stopsubsection

\startsubsection[title={\type {size}, \type {version}, \type {getnofobjects}, \type {getnofpages}}]
\startsubsection[title={\type {getsize}, \type {getversion}, \type {getnofobjects}, \type {getnofpages}}]

\libindex {size}
\libindex {version}
\libindex {getsize}
\libindex {getversion}
\libindex {getnofobjects}
\libindex {getnofpages}

A successfully opened document can provide some information:

\starttyping
bytes = size(<pdfe document>)
major, minor = version(<pdfe document>)
bytes = getsize(<pdfe document>)
major, minor = getversion(<pdfe document>)
n = getnofobjects(<pdfe document>)
n = getnofpages(<pdfe document>)
bytes, waste = getnofpages(<pdfe document>)
Expand Down
17 changes: 17 additions & 0 deletions manual/luatex-tex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2504,6 +2504,23 @@ \subsubsection{\type {getlocallevel}}
\stopsubsection
\startsubsection[title={\type {record_input_file} and \type {record_output_file}}]
\topicindex {files+recording}
\libindex{record_input_file}
\libindex{record_output_file}
These two function can be used to register used files. Because callbacks can load
files themselves you might need these helpers (if you use recording at all).
\startfunctioncall
kpse.record_input_file(<string> name)
kpse.record_output_file(<string> name)
\stopfunctioncall
\stopsubsection
\startsubsection[title={\type {find_file}}]
\topicindex {files+finding}
Expand Down
Binary file modified manual/luatex.pdf
Binary file not shown.
10 changes: 10 additions & 0 deletions source/texk/web2c/luatexdir/NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
==============================================================
LuaTeX 1.10.0 2019-03-15
==============================================================

This the release for TeX Live 2019.
Small bug fixes, code clean up.
This is a stable release: only bug-fixes until the next TeX Live.



==============================================================
LuaTeX 1.09.2 2019-01-19
==============================================================
Expand Down
2 changes: 2 additions & 0 deletions source/texk/web2c/luatexdir/font/mapfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ static void fm_read_info(void)
&file_opened, &fm_buffer, &fm_size)) {
if (file_opened) {
if (fm_size > 0) {
recorder_record_input(cur_file_name);
report_start_file(filetype_map,cur_file_name);
while (!fm_eof()) {
fm_scan_line();
Expand All @@ -539,6 +540,7 @@ static void fm_read_info(void)
} else {
fm_read_file();
report_start_file(filetype_map,cur_file_name);
recorder_record_input(cur_file_name);
while (!fm_eof()) {
fm_scan_line();
mitem->lineno++;
Expand Down
20 changes: 20 additions & 0 deletions source/texk/web2c/luatexdir/lua/lkpselib.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,24 @@ static int lua_kpathsea_new(lua_State * L)
return 1;
}

static int lua_record_input_file(lua_State * L)
{
const char *name = lua_tostring(L, 1);
if (name != NULL) {
recorder_record_input(name);
}
return 0;
}

static int lua_record_output_file(lua_State * L)
{
const char *name = lua_tostring(L, 1);
if (name != NULL) {
recorder_record_output(name);
}
return 0;
}

static const struct luaL_Reg kpselib_m[] = {
{"__gc", lua_kpathsea_finish},
{"init_prog", lua_kpathsea_init_prog},
Expand All @@ -838,6 +856,8 @@ static const struct luaL_Reg kpselib_m[] = {
{"lookup", lua_kpathsea_lookup},
{"version", lua_kpse_version},
{"default_texmfcnf", show_texmfcnf},
{"record_input_file", lua_record_input_file},
{"record_output_file", lua_record_output_file},
{NULL, NULL} /* sentinel */
};

Expand Down
2 changes: 1 addition & 1 deletion source/texk/web2c/luatexdir/lua/lpdfelib.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ define_to_string(stream, "pdfe.stream")
static int pdfelib_tostring_reference(lua_State * L) { \
pdfe_reference *p = check_isreference(L, 1); \
if (p != NULL) { \
lua_pushfstring(L, "<pdfe.reference " "%i>", p->onum); \
lua_pushfstring(L, "<pdfe.reference " "%i>", (int) p->onum); \
return 1; \
} \
return 0; \
Expand Down
2 changes: 1 addition & 1 deletion source/texk/web2c/luatexdir/luatex_svnversion.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define luatex_svn_revision 7120
#define luatex_svn_revision 7124

0 comments on commit 5f945e8

Please sign in to comment.