-
- if (TERMTYPE_CHAR == p->type) {
- /* Emit the header and be done. */
- (*p->headf)(p, p->argf);
- return;
- }
-
- /*
- * Emit the standard PostScript prologue, set our initial page
- * position, then run pageopen() on the initial page.
- */
-
- printf("%s\n", "%!PS");
- printf("%s\n", "/Courier");
- printf("%s\n", "10 selectfont");
-
- p->pspage = 1;
- p->psstate = 0;
- pageopen(p);
-}
-
-
-/*
- * Open a page. This is only used for -Tps at the moment. It opens a
- * page context, printing the header and the footer. THE OUTPUT BUFFER
- * MUST BE EMPTY. If it is not, output will ghost on the next line and
- * we'll be all gross and out of state.
- */
-static void
-pageopen(struct termp *p)
-{
-
- assert(TERMTYPE_PS == p->type);
- assert(0 == p->psstate);
-
- p->pscol = PS_CHAR_LEFT;
- p->psrow = PS_CHAR_TOPMARG;
- p->psstate |= PS_MARGINS;
-
- (*p->headf)(p, p->argf);
- endline(p);
-
- p->psstate &= ~PS_MARGINS;
- assert(0 == p->psstate);
-
- p->pscol = PS_CHAR_LEFT;
- p->psrow = PS_CHAR_BOTMARG;
- p->psstate |= PS_MARGINS;
-
- (*p->footf)(p, p->argf);
- endline(p);
-
- p->psstate &= ~PS_MARGINS;
- assert(0 == p->psstate);
-
- p->pscol = PS_CHAR_LEFT;
- p->psrow = PS_CHAR_TOP;
-