diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2019-10-23 10:18:54 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2019-10-23 10:18:54 +0000 |
commit | 51f7cee7467569b9546d4d6d734f17da517b2b7a (patch) | |
tree | 540f68a0e6492622fe14f5a9072aa705847fcd35 /Build/source/texk | |
parent | 4d6504c339b37aa04c36ab3e5af83c5d3ed170d4 (diff) |
luatex: different page reshuffle callback. WARNING: DROPPED the "page_objnum_provider" callback, replaced with "page_order_index". (HH)
git-svn-id: svn://tug.org/texlive/trunk@52497 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/NEWS | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luatex_svnversion.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luatexcallbackids.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdfgen.c | 7 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdfpagetree.c | 27 |
7 files changed, 24 insertions, 26 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog index 105d8d80e50..25ba382c856 100644 --- a/Build/source/texk/web2c/luatexdir/ChangeLog +++ b/Build/source/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,7 @@ +2019-10-22 Luigi Scarso <luigi.scarso@gmail.com> + * *** DROPPED "page_objnum_provider" callback , replaced with "page_order_index" *** + + 2019-10-18 Luigi Scarso <luigi.scarso@gmail.com> * following https://tug.org/pipermail/tlbuild/2019q3/004553.html we have now define(__sparc) diff --git a/Build/source/texk/web2c/luatexdir/NEWS b/Build/source/texk/web2c/luatexdir/NEWS index 8c7f2cae84f..ba63f727ae4 100644 --- a/Build/source/texk/web2c/luatexdir/NEWS +++ b/Build/source/texk/web2c/luatexdir/NEWS @@ -1,12 +1,14 @@ ============================================================== -LuaTeX 1.11.1 2019-10-18 +LuaTeX 1.11.1 2019-10-22 ============================================================== First release of luahbtex / luajithbtex, luatex / luajittex with harfbuzz. Small bug fixes, code clean up and a couple of new primitives -to match eTeX. See ChangeLog and the manual. +to match eTeX. +*** DROPPED the "page_objnum_provider" callback, replaced with "page_order_index". *** +See ChangeLog and the manual. diff --git a/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c b/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c index 163906eedf5..5654bc71410 100644 --- a/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c +++ b/Build/source/texk/web2c/luatexdir/lua/lcallbacklib.c @@ -81,7 +81,7 @@ static const char *const callbacknames[] = { "finish_synctex", "wrapup_run", "new_graf", - "page_objnum_provider", + "page_order_index", "make_extensible", "process_pdf_image_content", NULL diff --git a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h index f681f59a1b2..18305fd208a 100644 --- a/Build/source/texk/web2c/luatexdir/luatex_svnversion.h +++ b/Build/source/texk/web2c/luatexdir/luatex_svnversion.h @@ -1 +1 @@ -#define luatex_svn_revision 7198 +#define luatex_svn_revision 7208 diff --git a/Build/source/texk/web2c/luatexdir/luatexcallbackids.h b/Build/source/texk/web2c/luatexdir/luatexcallbackids.h index b3b55ce09ea..dc2f05ca955 100644 --- a/Build/source/texk/web2c/luatexdir/luatexcallbackids.h +++ b/Build/source/texk/web2c/luatexdir/luatexcallbackids.h @@ -73,7 +73,7 @@ typedef enum { finish_synctex_callback, wrapup_run_callback, new_graf_callback, - page_objnum_provider_callback, + page_order_index_callback, make_extensible_callback, process_pdf_image_content_callback, total_callbacks, diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c index 0bd5a3a7b12..3d37102b29a 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c +++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.c @@ -1777,7 +1777,12 @@ void pdf_end_page(PDF pdf) if (callback_id > 0) run_callback(callback_id, "b->",(global_shipping_mode == SHIPPING_PAGE)); if (global_shipping_mode == SHIPPING_PAGE) { - pdf->last_pages = pdf_do_page_divert(pdf, pdf->last_page, 0); + int location = 0; + int callback_id = callback_defined(page_order_index_callback); + if (callback_id) { + run_callback(callback_id, "d->d", total_pages, &location); + } + pdf->last_pages = pdf_do_page_divert(pdf, pdf->last_page, location); /*tex Write out the |/Page| object. */ pdf_begin_obj(pdf, pdf->last_page, OBJSTM_ALWAYS); pdf_begin_dict(pdf); diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfpagetree.c b/Build/source/texk/web2c/luatexdir/pdf/pdfpagetree.c index 4fcd48e341f..f21412f9a98 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdfpagetree.c +++ b/Build/source/texk/web2c/luatexdir/pdf/pdfpagetree.c @@ -162,7 +162,7 @@ void pdf_do_page_undivert(int divnum, int curdivnum) /*tex Write a |/Pages| object. */ -static void write_pages(PDF pdf, pages_entry * p, int parent, int callback_id) +static void write_pages(PDF pdf, pages_entry * p, int parent) { int i; int pages_attributes ; @@ -185,19 +185,7 @@ static void write_pages(PDF pdf, pages_entry * p, int parent, int callback_id) pdf_add_name(pdf, "Kids"); pdf_begin_array(pdf); for (i = 0; i < p->number_of_kids; i++) { - if (callback_id) { - /* new */ - int objnum = (int) p->kids[i]; - if (obj_type(pdf, objnum) == obj_type_page) { - run_callback(callback_id, "d->d", objnum, &objnum); - check_obj_exists(pdf, objnum); - pdf_add_ref(pdf, (int) objnum); - } else { - pdf_add_ref(pdf, (int) p->kids[i]); - } - } else { - pdf_add_ref(pdf, (int) p->kids[i]); - } + pdf_add_ref(pdf, (int) p->kids[i]); } pdf_end_array(pdf); pdf_end_dict(pdf); @@ -211,12 +199,12 @@ static void write_pages(PDF pdf, pages_entry * p, int parent, int callback_id) */ -static int output_pages_list(PDF pdf, pages_entry * pe, int callback_id) +static int output_pages_list(PDF pdf, pages_entry * pe) { pages_entry *p, *q, *r; if (pe->next == NULL) { /*tex Everything fits into one |pages_entry|. */ - write_pages(pdf, pe, 0, callback_id); + write_pages(pdf, pe, 0); return pe->objnum; } /*tex One level higher needed. */ @@ -228,19 +216,18 @@ static int output_pages_list(PDF pdf, pages_entry * pe, int callback_id) } q->kids[q->number_of_kids++] = p->objnum; q->number_of_pages += p->number_of_pages; - write_pages(pdf, p, q->objnum, callback_id); + write_pages(pdf, p, q->objnum); } /*tex Recurse through next higher level. */ - return output_pages_list(pdf, r, callback_id); + return output_pages_list(pdf, r); } int output_pages_tree(PDF pdf) { - int callback_id = callback_defined(page_objnum_provider_callback); divert_list_entry *d; /*tex Concatenate all diversions into diversion 0. */ pdf_do_page_undivert(0, 0); /*tex Get diversion 0. */ d = get_divert_list(0); - return output_pages_list(pdf, d->first, callback_id); + return output_pages_list(pdf, d->first); } |