Two small tweaks to the prologue:
authorben <ben@cda61777-01e9-0310-a592-d414129be87e>
Mon, 20 Sep 2004 14:04:07 +0000 (14:04 +0000)
committerben <ben@cda61777-01e9-0310-a592-d414129be87e>
Mon, 20 Sep 2004 14:04:07 +0000 (14:04 +0000)
* 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.

git-svn-id: svn://svn.tartarus.org/sgt/halibut@4552 cda61777-01e9-0310-a592-d414129be87e

bk_ps.c

diff --git a/bk_ps.c b/bk_ps.c
index 7b2f439..d64bc6a 100644 (file)
--- 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");