Article View: comp.lang.postscript
Article #2003Re: Compiling PostScript code
From: Jim DeLaHunt
Date: Fri, 28 Aug 1992 03:21
Date: Fri, 28 Aug 1992 03:21
39 lines
1560 bytes
1560 bytes
In article <1992Aug24.023510.25470@cs.brown.edu> jgm@cs.brown.edu (Jonathan Monsarrat) writes:
>Is there a "PostScript Compiler" that generates compressed PS from
>big ol' whitespace-filled long-named PS?
Do you have a C compiler available? Use its preprocessor to macro-
substitute short names for long ones. To use your example:
/d /def load def
#define def d
#define MyFunctionMapper A
#define elvis e
/* etc.... */
% This function does some cool stuff
/MyFunctionMapper
{
/elvis 2 def % etc....
/jackson elvis manilow add berry add def
jackson
} bind def
After C pre-processing you'd have:
/d /def load def
% This function does some cool stuff
/A
{
/e 2 d % etc....
/j e m add b add d
j
} bind d
PackPS could then get rid of the comments and whitespace for you.
I've used this technique on a major PostScript language project and it has
worked great!
--Jim DeLaHunt, Developer Support, Adobe Systems Incorporated
delahunt@adobe.com ...!{apple,decwrl}!adobe!delahunt +1-415-962-3790
Technical Details
Message-ID:
<1992Aug28.032106.28216@adobe.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!decwrl!adobe!delahuntReferences:
<1992Aug24.023510.25470@cs.brown.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!adobe!delahunt From: delahunt@adobe.com (Jim DeLaHunt) Subject: Re: Compiling PostScript code Message-ID: <1992Aug28.032106.28216@adobe.com> Followup-To: comp.lang.postscript Summary: Use C compiler preprocessor Sender: usenet@adobe.com (USENET NEWS) Organization: Adobe Systems Incorporated References: <1992Aug24.023510.25470@cs.brown.edu> Distribution: comp.lang.postscript Date: Fri, 28 Aug 1992 03:21:06 GMT Lines: 39