diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2021-01-16 05:54:04 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2021-01-16 05:54:04 +0000 |
commit | 77ab6ed5ef1f461991eac129796fcfa887c3576e (patch) | |
tree | e8fe1108d51542456ec973b4adfaaf9ca2803752 /Build/source/texk/web2c/luatexdir/tex | |
parent | 2787bcb50d7936fe64a7b4c389d373a432b8404d (diff) |
sync with the upstream
git-svn-id: svn://tug.org/texlive/trunk@57441 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/backend.c | 1 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/dumpdata.c | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/errors.c | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/extensions.c | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/texnodes.c | 44 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/texnodes.h | 11 |
6 files changed, 49 insertions, 22 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/backend.c b/Build/source/texk/web2c/luatexdir/tex/backend.c index d8c7daed251..3115a88a7e3 100644 --- a/Build/source/texk/web2c/luatexdir/tex/backend.c +++ b/Build/source/texk/web2c/luatexdir/tex/backend.c @@ -45,6 +45,7 @@ static void init_pdf_backend_functions(void) p->whatsit_fu[pdf_setmatrix_node] = &pdf_out_setmatrix; p->whatsit_fu[pdf_save_node] = &pdf_out_save; p->whatsit_fu[pdf_restore_node] = &pdf_out_restore; + p->whatsit_fu[pdf_link_state_node] = &pdf_out_link_state; p->control_fu[backend_control_push_list] = &pdf_push_list; p->control_fu[backend_control_pop_list] = &pdf_pop_list; p->control_fu[backend_control_begin_page] = &pdf_begin_page; diff --git a/Build/source/texk/web2c/luatexdir/tex/dumpdata.c b/Build/source/texk/web2c/luatexdir/tex/dumpdata.c index 215cd686fd2..e7d53050b29 100644 --- a/Build/source/texk/web2c/luatexdir/tex/dumpdata.c +++ b/Build/source/texk/web2c/luatexdir/tex/dumpdata.c @@ -32,7 +32,7 @@ with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */ -#define FORMAT_ID (907+53) +#define FORMAT_ID (907+54) #if ((FORMAT_ID>=0) && (FORMAT_ID<=256)) #error Wrong value for FORMAT_ID. #endif diff --git a/Build/source/texk/web2c/luatexdir/tex/errors.c b/Build/source/texk/web2c/luatexdir/tex/errors.c index 19be6570379..ce80df99e7e 100644 --- a/Build/source/texk/web2c/luatexdir/tex/errors.c +++ b/Build/source/texk/web2c/luatexdir/tex/errors.c @@ -290,7 +290,8 @@ static int Isspace (char c) __attribute__ ((noreturn)) static void luatex_calledit (int baseptr, int linenumber) { - char *temp, *command, *fullcmd; + char *temp, *command; + char *fullcmd = NULL; /* avoid compiler warning */ char c; int sdone, ddone, i; char *filename = makecstring(input_stack[base_ptr].name_field); @@ -442,7 +443,7 @@ void error(void) /*tex Get user's advice and |return|. */ while (1) { CONTINUE: - /*tex + /*tex Original reports: https://tex.stackexchange.com/questions/551313/ @@ -455,7 +456,7 @@ void error(void) selector from 16 to 15 in term_input, due to the lack of this check in recursive error() call. */ - if (interaction !=error_stop_mode) + if (interaction !=error_stop_mode) return; clear_for_error_prompt(); prompt_input("? "); @@ -986,7 +987,7 @@ void normal_warning(const char *t, const char *p) new_line_char_par = 10; report_id = callback_defined(show_lua_error_hook_callback); if (report_id == 0) { - if (p != NULL) + if (p != NULL) tprint(p); help2( "The lua interpreter ran into a problem, so the", diff --git a/Build/source/texk/web2c/luatexdir/tex/extensions.c b/Build/source/texk/web2c/luatexdir/tex/extensions.c index 60deb747a85..19d4e444173 100644 --- a/Build/source/texk/web2c/luatexdir/tex/extensions.c +++ b/Build/source/texk/web2c/luatexdir/tex/extensions.c @@ -156,6 +156,10 @@ static void do_extension_pdf(int immediate) new_whatsit(pdf_save_node); } else if (scan_keyword("restore")) { new_whatsit(pdf_restore_node); + } else if (scan_keyword("linkstate")) { + new_whatsit(pdf_link_state_node); + scan_int(); + pdf_link_state(tail) = cur_val; } else if (scan_keyword("setmatrix")) { new_whatsit(pdf_setmatrix_node); scan_toks(false, true); diff --git a/Build/source/texk/web2c/luatexdir/tex/texnodes.c b/Build/source/texk/web2c/luatexdir/tex/texnodes.c index 0d7bcd5dec2..02e117a876b 100644 --- a/Build/source/texk/web2c/luatexdir/tex/texnodes.c +++ b/Build/source/texk/web2c/luatexdir/tex/texnodes.c @@ -136,12 +136,14 @@ field_info node_fields_whatsit_pdf_end_thread[2]; field_info node_fields_whatsit_pdf_literal[4]; field_info node_fields_whatsit_pdf_refobj[3]; field_info node_fields_whatsit_pdf_restore[2]; +field_info node_fields_whatsit_pdf_link_state[3]; field_info node_fields_whatsit_pdf_save[2]; field_info node_fields_whatsit_pdf_setmatrix[3]; field_info node_fields_whatsit_pdf_start_link[8]; field_info node_fields_whatsit_pdf_start_thread[8]; field_info node_fields_whatsit_pdf_thread[8]; + /*tex The values of fields. */ subtype_info node_values_dir[] = { @@ -997,6 +999,7 @@ node_info whatsit_node_data[] = { { pdf_setmatrix_node, pdf_setmatrix_node_size, NULL, node_fields_whatsit_pdf_setmatrix, NULL, -1, 0 }, { pdf_save_node, pdf_save_node_size, NULL, node_fields_whatsit_pdf_save, NULL, -1, 0 }, { pdf_restore_node, pdf_restore_node_size, NULL, node_fields_whatsit_pdf_restore, NULL, -1, 0 }, + { pdf_link_state_node, pdf_link_state_node_size, NULL, node_fields_whatsit_pdf_link_state, NULL, -1, 0 }, /*tex That's it. */ @@ -1065,6 +1068,7 @@ void l_set_whatsit_data(void) { init_node_key(whatsit_node_data, pdf_setmatrix_node, pdf_setmatrix) init_node_key(whatsit_node_data, pdf_save_node, pdf_save) init_node_key(whatsit_node_data, pdf_restore_node, pdf_restore) + init_node_key(whatsit_node_data, pdf_link_state_node, pdf_link_state) init_node_key(node_values_pdf_destination, 0, xyz) init_node_key(node_values_pdf_destination, 1, fit) @@ -1133,6 +1137,10 @@ void l_set_whatsit_data(void) { init_field_key(node_fields_whatsit_pdf_end_link, 0, attr); init_field_nop(node_fields_whatsit_pdf_end_link, 1); + init_field_key(node_fields_whatsit_pdf_link_state, 0, attr); + init_field_key(node_fields_whatsit_pdf_link_state, 1, value); + init_field_nop(node_fields_whatsit_pdf_link_state, 2); + init_field_key(node_fields_whatsit_pdf_end_thread, 0, attr); init_field_nop(node_fields_whatsit_pdf_end_thread, 1); @@ -2257,6 +2265,7 @@ void flush_node_wrapup_pdf(halfword p) switch(subtype(p)) { case pdf_save_node: case pdf_restore_node: + case pdf_link_state_node: case pdf_refobj_node: case pdf_end_link_node: case pdf_end_thread_node: @@ -2559,6 +2568,7 @@ void check_node_wrapup_pdf(halfword p) break; case pdf_save_node: case pdf_restore_node: + case pdf_link_state_node: case pdf_refobj_node: case pdf_end_link_node: case pdf_end_thread_node: @@ -3550,21 +3560,21 @@ void show_node_wrapup_pdf(int p) tprint_esc("pdfcolorstack "); print_int(pdf_colorstack_stack(p)); switch (pdf_colorstack_cmd(p)) { - case colorstack_set: - tprint(" set "); - break; - case colorstack_push: - tprint(" push "); - break; - case colorstack_pop: - tprint(" pop"); - break; - case colorstack_current: - tprint(" current"); - break; - default: - confusion("colorstack"); - break; + case colorstack_set: + tprint(" set "); + break; + case colorstack_push: + tprint(" push "); + break; + case colorstack_pop: + tprint(" pop"); + break; + case colorstack_current: + tprint(" current"); + break; + default: + confusion("colorstack"); + break; } if (pdf_colorstack_cmd(p) <= colorstack_data) print_mark(pdf_colorstack_data(p)); @@ -3579,6 +3589,10 @@ void show_node_wrapup_pdf(int p) case pdf_restore_node: tprint_esc("pdfrestore"); break; + case pdf_link_state_node: + tprint_esc("pdflinkstate "); + print_int(pdf_link_state(p)); + break; case pdf_refobj_node: tprint_esc("pdfrefobj"); if (obj_obj_is_stream(static_pdf, pdf_obj_objnum(p))) { diff --git a/Build/source/texk/web2c/luatexdir/tex/texnodes.h b/Build/source/texk/web2c/luatexdir/tex/texnodes.h index 121511bc098..9742ca4966c 100644 --- a/Build/source/texk/web2c/luatexdir/tex/texnodes.h +++ b/Build/source/texk/web2c/luatexdir/tex/texnodes.h @@ -734,6 +734,7 @@ typedef enum { pdf_setmatrix_node, pdf_save_node, pdf_restore_node, + pdf_link_state_node, } whatsit_types; # define first_common_whatsit 0 @@ -741,9 +742,11 @@ typedef enum { # define backend_first_dvi_whatsit 15 # define backend_last_dvi_whatsit 15 # define backend_first_pdf_whatsit 16 -# define backend_last_pdf_whatsit 31 +# define backend_last_pdf_whatsit 32 -# define MAX_WHATSIT_TYPE 32 +/* add some slack for the future */ + +# define MAX_WHATSIT_TYPE 34 # define known_whatsit_type(i) ( \ (i >= first_common_whatsit && i <= last_common_whatsit) || \ @@ -920,6 +923,10 @@ typedef enum { # define pdf_save_node_size 3 # define pdf_restore_node_size 3 +# define pdf_link_state_node_size 3 + +# define pdf_link_state(a) vinfo((a) + 2) + # define pdf_colorstack_node_size 4 # define pdf_colorstack_stack(a) vlink((a)+2) # define pdf_colorstack_cmd(a) vinfo((a)+2) |