diff options
author | Henry Stiles <henry.stiles@artifex.com> | 1998-10-05 06:08:27 +0000 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 1998-10-05 06:08:27 +0000 |
commit | db8ceaee2fcb75ccb2c170ebde7054582b88bf05 (patch) | |
tree | 549a2e0bb87941df319a1a02b26b9b4cc90a5ca6 | |
parent | 58147a461299efa9a31ee674d4f543902fc6e8b2 (diff) |
changes to support new pjl parser interface
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@467 06663e23-700e-0410-b217-a244a6096597
-rw-r--r-- | pxl/pxmain.c | 6 | ||||
-rw-r--r-- | pxl/pxstate.h | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/pxl/pxmain.c b/pxl/pxmain.c index 33515708b..7ef20e800 100644 --- a/pxl/pxmain.c +++ b/pxl/pxmain.c @@ -119,7 +119,6 @@ main(int argc, char *argv[]) px_parser_state_t *st; px_state_t *pxs; const char *arg; - pjl_parser_state_t pjstate; arg_list args; /* Initialize the library. */ @@ -167,7 +166,7 @@ main(int argc, char *argv[]) exit(1); } - pjl_process_init(&pjstate); + pxs->pjls = pjl_process_init(mem); r.limit = buf - 1; for ( ; ; ) { if_debug1('i', "%% file pos=%ld\n", (long)ftell(in)); @@ -187,7 +186,7 @@ process: switch ( in_pjl ) in_pjl = 1; goto move; case 1: /* PJL */ - code = pjl_process(&pjstate, NULL, &r); + code = pjl_process(pxs->pjls, NULL, &r); if ( code > 0 ) { byte chr; in_pjl = 0; @@ -281,6 +280,7 @@ move: /* Move unread data to the start of the buffer. */ r.limit = buf + (len - 1); } gs_reclaim(&inst.spaces, true); + pjl_process_destroy(pxs->pjls, mem); /* Reset the GC trigger. */ { gs_memory_status_t status; gs_memory_status(mem, &status); diff --git a/pxl/pxstate.h b/pxl/pxstate.h index 6d1631872..85976b291 100644 --- a/pxl/pxstate.h +++ b/pxl/pxstate.h @@ -10,7 +10,7 @@ #include "gsmemory.h" #include "pxgstate.h" - +#include "pjparse.h" /* Define an abstract type for a font directory. */ #ifndef gs_font_dir_DEFINED # define gs_font_dir_DEFINED @@ -126,7 +126,8 @@ struct px_state_s { #define px_max_warning_message 500 uint warning_length; char warnings[px_max_warning_message + 1]; - + /* ---------------- PJL state -------------------- */ + pjl_parser_state *pjls; }; #define private_st_px_state() /* in pxstate.c */\ gs_private_st_composite(st_px_state, px_state_t, "px_state",\ |