From 10443f15627090be563b1e73996cf38ef6742097 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 20 Sep 2004 14:04:07 +0000 Subject: 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] --- bk_ps.c | 9 +++++---- 1 file 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"); -- cgit v1.1