diff options
Diffstat (limited to 'Build/source/texk/dvipdfm-x/specials.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/specials.c | 64 |
1 files changed, 60 insertions, 4 deletions
diff --git a/Build/source/texk/dvipdfm-x/specials.c b/Build/source/texk/dvipdfm-x/specials.c index 0b51e5eb350..1b73b35be72 100644 --- a/Build/source/texk/dvipdfm-x/specials.c +++ b/Build/source/texk/dvipdfm-x/specials.c @@ -528,6 +528,8 @@ static struct { int (*eodhk_func) (void); int (*bophk_func) (void); int (*eophk_func) (void); + int (*bofhk_func) (void); + int (*eofhk_func) (void); int (*check_func) (const char *, int); int (*setup_func) (struct spc_handler *, struct spc_env *, struct spc_arg *); } known_specials[] = { @@ -537,6 +539,8 @@ static struct { spc_pdfm_at_end_document, NULL, spc_pdfm_at_end_page, + NULL, + NULL, spc_pdfm_check_special, spc_pdfm_setup_handler }, @@ -546,6 +550,8 @@ static struct { NULL, NULL, NULL, + NULL, + NULL, spc_xtx_check_special, spc_xtx_setup_handler }, @@ -555,6 +561,8 @@ static struct { NULL, NULL, NULL, + NULL, + NULL, spc_dvipdfmx_check_special, spc_dvipdfmx_setup_handler }, @@ -564,6 +572,8 @@ static struct { spc_dvips_at_end_document, spc_dvips_at_begin_page, spc_dvips_at_end_page, + NULL, + NULL, spc_dvips_check_special, spc_dvips_setup_handler }, @@ -573,6 +583,8 @@ static struct { NULL, NULL, NULL, + NULL, + NULL, spc_color_check_special, spc_color_setup_handler }, @@ -582,6 +594,8 @@ static struct { spc_tpic_at_end_document, spc_tpic_at_begin_page, spc_tpic_at_end_page, + NULL, + NULL, spc_tpic_check_special, spc_tpic_setup_handler }, @@ -591,15 +605,19 @@ static struct { spc_html_at_end_document, spc_html_at_begin_page, spc_html_at_end_page, + NULL, + NULL, spc_html_check_special, spc_html_setup_handler }, - {"unknown", - NULL, - NULL, - NULL, + {"compat", + spc_misc_at_begin_document, + spc_misc_at_end_document, + spc_misc_at_begin_page, NULL, + spc_misc_at_begin_form, + spc_misc_at_end_form, spc_misc_check_special, spc_misc_setup_handler }, @@ -608,6 +626,44 @@ static struct { }; int +spc_begin_form (struct spc_env *spe, const char *ident, pdf_coord cp, pdf_rect *cropbox) +{ + int error = 0; + int i, xobj_id; + + xobj_id = pdf_doc_begin_grabbing(ident, cp.x, cp.y, cropbox); + + if (xobj_id < 0) { + error = -1; + } else { + for (i = 0; known_specials[i].key != NULL; i++) { + if (known_specials[i].bofhk_func) { + error = known_specials[i].bofhk_func(); + } + } + } + + return error; +} + +int +spc_end_form (struct spc_env *spe, pdf_obj *attr) +{ + int error = 0; + int i; + + pdf_doc_end_grabbing(attr); + + for (i = 0; known_specials[i].key != NULL; i++) { + if (known_specials[i].eofhk_func) { + error = known_specials[i].eofhk_func(); + } + } + + return error; +} + +int spc_exec_at_begin_page (void) { int error = 0; |