summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2004-09-20 14:04:07 +0000
committerBen Harris <bjh21@bjh21.me.uk>2004-09-20 14:04:07 +0000
commit10443f15627090be563b1e73996cf38ef6742097 (patch)
tree330db5610288086be77e27a8b7723b4a11d8f4c4
parent296362c853373ac3e4add7c5dfb23c1bc8b004cf (diff)
downloadhalibut-10443f15627090be563b1e73996cf38ef6742097.zip
halibut-10443f15627090be563b1e73996cf38ef6742097.tar.gz
halibut-10443f15627090be563b1e73996cf38ef6742097.tar.bz2
halibut-10443f15627090be563b1e73996cf38ef6742097.tar.xz
Two small tweaks to the prologue:
* Use "/arraytype" etc rather than "[] type" etc. Should be faster and not fill local VM with empty arrays. * Use "bind" on the procedure, since it's conventional and will probably help speed too. [originally from svn r4552]
-rw-r--r--bk_ps.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/bk_ps.c b/bk_ps.c
index 7b2f439..d64bc6a 100644
--- a/bk_ps.c
+++ b/bk_ps.c
@@ -77,11 +77,12 @@ void ps_backend(paragraph *sourceform, keywordlist *keywords,
"/t {\n"
" exch /y exch def {\n"
" /x exch def\n"
- " x type [] type eq {x aload pop scalefont setfont} if\n"
- " x type dup 1 type eq exch 1.0 type eq or {x y moveto} if\n"
- " x type () type eq {x show} if\n"
+ " x type /arraytype eq {x aload pop scalefont setfont} if\n"
+ " x type dup /integertype eq exch /realtype eq or "
+ "{x y moveto} if\n"
+ " x type /stringtype eq {x show} if\n"
" } forall\n"
- "} def\n");
+ "} bind def\n");
fprintf(fp, "%%%%EndResource\n");
fprintf(fp, "%%%%EndProlog\n");