diff options
author | Nancy Durgin <nancy.durgin@artifex.com> | 2018-09-19 09:14:02 -0700 |
---|---|---|
committer | Nancy Durgin <nancy.durgin@artifex.com> | 2018-09-20 08:47:43 -0700 |
commit | caa8b4c279a078419ee9c002106a84703c090d5d (patch) | |
tree | f602279cf2cfd8ee73980893fc40ba4dbddaa426 | |
parent | b0222e5e39712999f22084996a6b85a120b9389e (diff) | |
download | ghostpdl-caa8b4c279a078419ee9c002106a84703c090d5d.tar.gz |
Cleanups for FAPI functions
Fix .FAPIAvailable to check for stack underflow
Undefine FAPI functions at end of gs_fapi.ps
(.FAPIavailable, .FAPIpassfont, .FAPIrebuildfont)
The rendering functions, .FAPIBuildGlyph, .FAPIBuildChar, .FAPIBuildGlyph9,
are still defined. I noticed similar rendering funcs for other fonts are also
exposed -- not sure if this is fixable or not.
-rw-r--r-- | Resource/Init/gs_fapi.ps | 3 | ||||
-rw-r--r-- | Resource/Init/gs_init.ps | 2 | ||||
-rw-r--r-- | psi/zfapi.c | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/Resource/Init/gs_fapi.ps b/Resource/Init/gs_fapi.ps index deb6b3e19..ac3c27d29 100644 --- a/Resource/Init/gs_fapi.ps +++ b/Resource/Init/gs_fapi.ps @@ -455,6 +455,9 @@ bind def end % the temporary dictionary for local binding. odef odef odef odef odef odef +% Undef these, not needed outside this file +[ /.FAPIavailable /.FAPIpassfont /.FAPIrebuildfont ] {systemdict exch .forceundef} forall + .setlanguagelevel %END FAPI diff --git a/Resource/Init/gs_init.ps b/Resource/Init/gs_init.ps index 68ed5703e..8ed70ec5b 100644 --- a/Resource/Init/gs_init.ps +++ b/Resource/Init/gs_init.ps @@ -2232,7 +2232,7 @@ SAFER { .setsafeglobal } if %/currentdevice /.sort /.buildfont0 /.buildfont1 /.buildfont2 /.buildfont3 /.buildfont4 /.buildfont9 /.buildfont10 /.buildfont11 %/.buildfont32 /.buildfont42 /.type9mapcid /.type11mapcid /.swapcolors %/currentdevice /.quit /.setuseciecolor /.needinput /.setoverprintmode /.special_op /.dicttomark /.knownget - %/.FAPIavailable /.FAPIpassfont /.FAPIrebuildfont /.FAPIBuildGlyph /.FAPIBuildChar /.FAPIBuildGlyph9 + %/.FAPIBuildGlyph /.FAPIBuildChar /.FAPIBuildGlyph9 %/.tempfile /.numicc_components /.set_outputintent /.max /.min /.vmreclaim /.getpath /.setglobal %/.setdebug /.mementolistnewblocks /getenv ] diff --git a/psi/zfapi.c b/psi/zfapi.c index 48e1d548f..b73844287 100644 --- a/psi/zfapi.c +++ b/psi/zfapi.c @@ -1855,6 +1855,7 @@ zFAPIavailable(i_ctx_t *i_ctx_p) char *serv_name = NULL; ref name_ref; + check_op(1); if (r_has_type(op, t_name)) { name_string_ref(imemory, op, &name_ref); |