Return-Path: mccall!tp@!mccall.com Delivery-Date: Tue, 27 Oct 92 18:53:20 -0600 Return-Path: mccall!tp@!mccall.com Received: from cs.wisc.edu by appenzell.cs.wisc.edu; Tue, 27 Oct 92 18:53:18 -0600 Received: from depot.cis.ksu.edu by cs.wisc.edu; Tue, 27 Oct 92 18:53:14 -0600 Return-Path: Received: from mccall.UUCP by depot.cis.ksu.edu UUCP (5.65a) id AA16968; Tue, 27 Oct 92 18:52:28 -0600 Received: by mccall.com (DECUS UUCP /1.3-1/2.5/); Tue, 27 Oct 92 18:30:23 CST Received: by mccall.com (MX V3.1C) id 12831; Tue, 27 Oct 1992 18:30:19 CST Date: Tue, 27 Oct 1992 18:30:18 CST From: Terry Poot To: tim Message-Id: <00962BAE.507EF5C0.12831@mccall.com> Subject: Ghostview for VMS 00/14 OK, here it finally is, for those of you without FTP access. This is the full distribution of Ghostview 1.4, and should be identical to what you get via FTP. One slight update to the readme.vms file is that it has now been tested (however lightly) with Ghostscript 2.5.2. Also not mentioned, because I didn't know it at the time, is that it ONLY works properly with Postscript files that have DSC comments (they start with "%!Adobe" and have the pages marked). This bug is specific to the VMS version (some sort of problem with LIB$SPAWN that I haven't tracked down yet). I'll try to take a look at it reasonably soon and come up with a fix, but no promises. -- Terry Poot The McCall Pattern Company (uucp: ...!rutgers!depot!mccall!tp) 615 McCall Road (800)255-2762, in KS (913)776-4041 Manhattan, KS 66502, USA Return-Path: mccall!tp@!mccall.com Delivery-Date: Tue, 27 Oct 92 18:54:07 -0600 Return-Path: mccall!tp@!mccall.com Received: from cs.wisc.edu by appenzell.cs.wisc.edu; Tue, 27 Oct 92 18:53:49 -0600 Received: from depot.cis.ksu.edu by cs.wisc.edu; Tue, 27 Oct 92 18:53:24 -0600 Return-Path: Received: from mccall.UUCP by depot.cis.ksu.edu UUCP (5.65a) id AA16977; Tue, 27 Oct 92 18:52:29 -0600 Received: by mccall.com (DECUS UUCP /1.3-1/2.5/); Tue, 27 Oct 92 18:30:56 CST Received: by mccall.com (MX V3.1C) id 12833; Tue, 27 Oct 1992 18:30:47 CST Date: Tue, 27 Oct 1992 18:30:46 CST From: Terry Poot To: tim Message-Id: <00962BAE.616F8200.12833@mccall.com> Subject: Ghostview for VMS 01/14 $! ------------------ CUT HERE ----------------------- $ v='f$verify(f$trnlnm("SHARE_VERIFY"))' $! $! This archive created by VMS_SHARE Version 7.2-007 22-FEB-1990 $! On 27-OCT-1992 16:42:54.60 By user TP $! $! This VMS_SHARE Written by: $! Andy Harper, Kings College London UK $! $! Acknowledgements to: $! James Gray - Original VMS_SHARE $! Michael Bednarek - Original Concept and implementation $! $!+ THIS PACKAGE DISTRIBUTED IN 14 PARTS, TO KEEP EACH PART $! BELOW 98 BLOCKS $! $! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER $! AND EXECUTE AS A COMMAND PROCEDURE ( @name ) $! $! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING: $! 1. ACTIONS.C;1 $! 2. AD2C.;1 $! 3. CALLBACKS.C;1 $! 4. COMMENTS.DOC;1 $! 5. COPYING.;1 $! 6. DESCRIP.MMS;1 $! 7. DIALOGS.C;1 $! 8. DIR.C;1 $! 9. DRAW.C;1 $! 10. GETENV.C;1 $! 11. GHOSTVIEW.AD;1 $! 12. GHOSTVIEW.C;1 $! 13. GHOSTVIEW.H;1 $! 14. GHOSTVIEW.MAN;1 $! 15. GHOSTVIEW.PS;1 $! 16. GHOSTVIEWP.H;1 $! 17. GS.INTERFACE;1 $! 18. GV.H;1 $! 19. HISTORY.;1 $! 20. IMAKEFILE.;1 $! 21. MAIN.C;1 $! 22. MAKEFILE.;1 $! 23. MISC.C;1 $! 24. PATH.C;1 $! 25. PS.C;1 $! 26. PS.H;1 $! 27. README.;1 $! 28. README.SELFILE;1 $! 29. README.VMS;1 $! 30. RUN-AD2C.;1 $! 31. SELFILE.C;1 $! 32. SETENV.C;1 $! 33. SFINTERNAL.H;1 $! 34. STDC.H;1 $! 35. STRCASECMP.C;1 $! 36. VMS_BUILD.COM;1 $! 37. VMS_TYPES.H;1 $! 38. XSTAT.H;1 $! $set="set" $set symbol/scope=(nolocal,noglobal) $f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID")) $e="write sys$error ""%UNPACK"", " $w="write sys$output ""%UNPACK"", " $ if f$trnlnm("SHARE_LOG") then $ w = "!" $ ve=f$getsyi("version") $ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START $ e "-E-OLDVER, Must run at least VMS 4.4" $ v=f$verify(v) $ exit 44 $UNPACK: SUBROUTINE ! P1=filename, P2=checksum $ if f$search(P1) .eqs. "" then $ goto file_absent $ e "-W-EXISTS, File ''P1' exists. Skipped." $ delete 'f'* $ exit $file_absent: $ if f$parse(P1) .nes. "" then $ goto dirok $ dn=f$parse(P1,,,"DIRECTORY") $ w "-I-CREDIR, Creating directory ''dn'." $ create/dir 'dn' $ if $status then $ goto dirok $ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped." $ delete 'f'* $ exit $dirok: $ w "-I-PROCESS, Processing file ''P1'." $ if .not. f$verify() then $ define/user sys$output nl: $ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1' PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET( SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:= CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b)); LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION( BEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1); IF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE; MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1; ERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")= 1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF"; POSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r); ERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1; COPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE, "output_file"));ENDPROCEDURE;Unpacker;QUIT; $ delete/nolog 'f'* $ CHECKSUM 'P1' $ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT $ e "-E-CHKSMFAIL, Checksum of ''P1' failed." $ ENDSUBROUTINE $START: $ create 'f' X/* X * actions.c -- X11 actions for ghostview. X * Copyright (C) 1992 Timothy O. Theisen X * X * This program is free software; you can redistribute it and/or modify X * it under the terms of the GNU General Public License as published by X * the Free Software Foundation; either version 2 of the License, or X * (at your option) any later version. X * X * This program is distributed in the hope that it will be useful, X * but WITHOUT ANY WARRANTY; without even the implied warranty of X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X * GNU General Public License for more details. X * X * You should have received a copy of the GNU General Public License X * along with this program; if not, write to the Free Software X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X * X * Author: Tim Theisen Systems Programmer X * Internet: tim@cs.wisc.edu Department of Computer Sciences X * UUCP: uwvax!tim University of Wisconsin-Madison X * Phone: (608)262-0438 1210 West Dayton Street X * FAX: (608)262-9777 Madison, WI 53706 X */ X X#include X#include X#include X#include X#include "gv.h" X#include "ps.h" X X/* Popup the copyright window */ Xvoid Xgv_copyright(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X popup(w, (XtPointer)copyrightpopup, NULL); X`7D X X/* Call the quit callback to stop ghostview */ Xvoid Xgv_quit(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X quit_ghostview(w, NULL, NULL); X`7D X X/* Popup the open file dialog box. */ Xvoid Xgv_open(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X popup_dialog(w, (XtPointer)OPEN, NULL); X`7D X X/* Popup the open file dialog box. */ Xvoid Xgv_reopen(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X if (!XtIsSensitive(reopenbutton)) return; X reopen_file(w, NULL, NULL); X`7D X X/* Popup the save file dialog box. */ Xvoid Xgv_save(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X if (!XtIsSensitive(savebutton)) return; X popup_dialog(w, (XtPointer)SAVE, NULL); X`7D X X/* Popup the print file dialog box. */ Xvoid Xgv_print_whole(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X if (!XtIsSensitive(printwholebutton)) return; X popup_dialog(w, (XtPointer)PRINT_WHOLE, NULL); X`7D X X/* Popup the print file dialog box. */ Xvoid Xgv_print_marked(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X if (!XtIsSensitive(printmarkedbutton)) return; X popup_dialog(w, (XtPointer)PRINT_MARKED, NULL); X`7D X X/* Call the prev_page callback */ Xvoid Xgv_prev(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X if (!XtIsSensitive(prevbutton)) return; X prev_page(w, NULL, NULL); X`7D X X/* Call the this_page callback */ Xvoid Xgv_show(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X if (!XtIsSensitive(showbutton)) return; X this_page(w, NULL, NULL); X`7D X X/* Call the next_page callback */ Xvoid Xgv_next(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X if (!XtIsSensitive(nextbutton)) return; X next_page(w, NULL, NULL); X`7D X X/* Call the center_page callback */ Xvoid Xgv_center(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X if (!XtIsSensitive(centerbutton)) return; X center_page(w, NULL, NULL); X`7D X X/* Call the mark_page callback */ Xvoid Xgv_mark(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X if (!XtIsSensitive(markbutton)) return; X mark_page(w, NULL, NULL); X`7D X X/* Call the unmark_page callback */ Xvoid Xgv_unmark(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X if (!XtIsSensitive(unmarkbutton)) return; X unmark_page(w, NULL, NULL); X`7D X X/* Get the magstep from the parameter string and X * call the set_magstep callback with that magstep */ Xvoid Xgv_set_magstep(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X int i; X X if (*num_params < 1) return; X i = atoi(params`5B0`5D); X set_magstep(w, (XtPointer)i, NULL); X`7D X X/* Increment the magstep and X * call the set_magstep callback with that magstep */ Xvoid Xgv_increase_magstep(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X int i; X X i = app_res.magstep + 1; X if (i <= app_res.maximum_magstep) X`09set_magstep(w, (XtPointer)i, NULL); X`7D X X/* Decrement the magstep and X * call the set_magstep callback with that magstep */ Xvoid Xgv_decrease_magstep(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X int i; X X i = app_res.magstep - 1; X if (i >= app_res.minimum_magstep) X`09set_magstep(w, (XtPointer)i, NULL); X`7D X X/* Set orientation action routine. Converts text parameter X * to XtPageOrientation and all set_orientation callback */ Xvoid Xgv_set_orientation(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X XrmValue from, to; X XtPageOrientation orient; X X if (*num_params < 1) return; X from.size = sizeof(String); X from.addr = params`5B0`5D; X to.size = 0; X to.addr = NULL; X if (XmuCvtStringToPageOrientation(XtDisplay(w), NULL, ZERO, X`09`09`09`09 &from, &to, NULL)) `7B X`09orient = *(XtPageOrientation *)(to.addr); X`09set_orientation(w, (XtPointer)orient, NULL); X `7D X`7D X X/* Call the swap_landscape callback */ Xvoid Xgv_swap_landscape(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X swap_landscape(w, NULL, NULL); X`7D X X/* Set pagemedia action routine. Converts text parameter X * to index into the pagemedia widgets and calls the set_pagemedia X * callback. */ Xvoid Xgv_set_pagemedia(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X int i; X X if (*num_params < 1) return; X X /* First check pagemedia defined within the document */ X if (doc && doc->nummedia) `7B X`09for (i = 0; i < doc->nummedia; i++) `7B X`09 if (!strcmp(params`5B0`5D, doc->media`5Bi`5D.name)) `7B X`09`09set_pagemedia(w, (XtPointer)i, NULL); X`09`09break; X`09 `7D X`09`7D X `7D X X /* Then check the standard ones */ X for (i = 0; papersizes`5Bi`5D.name; i++) `7B X`09if (!strcmp(params`5B0`5D, papersizes`5Bi`5D.name)) `7B X `09 set_pagemedia(w, (XtPointer)(base_papersize+i), NULL); X`09 break; X`09`7D X `7D X`7D X X X/* Reset the force flag. */ X/* (force flag is checked when setting orientaion and pagemedia) */ Xvoid Xgv_default(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X force_setting = False; X`7D X X/* Set the force flag. */ X/* (force flag is checked when setting orientaion and pagemedia) */ Xvoid Xgv_force(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X force_setting = True; X`7D X X/* Implement WM_DELETE_WINDOW protocol */ Xvoid Xgv_delete_window(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X if (event->type == ClientMessage && X`09event->xclient.data.l`5B0`5D != wm_delete_window) return; X XtDestroyWidget(w); X`7D X X X/* Destroy popup zoom window */ Xvoid Xgv_delete_zoom(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X XtDestroyWidget(XtParent(w)); X`7D X X/* dismiss a popup window */ Xvoid Xgv_dismiss(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X XtPopdown(w); X if (w == infopopup) info_up = False; X`7D X X/* scroll main viewport up */ Xvoid Xgv_scroll_up(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X Arg args`5B2`5D; X Widget scroll; X float top, shown; X X scroll = XtNameToWidget(pageview, "vertical"); X if (scroll) `7B X`09XtSetArg(args`5B0`5D, XtNshown, &shown); X`09XtSetArg(args`5B1`5D, XtNtopOfThumb, &top); X`09XtGetValues(scroll, args, TWO); X X`09top = top - shown; X`09if (top < 0.0) top = 0.0; X`09XtCallCallbacks(scroll, XtNjumpProc, &top); X `7D X`7D X X/* scroll main viewport down */ Xvoid Xgv_scroll_down(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X Arg args`5B2`5D; X Widget scroll; X float top, shown; X X scroll = XtNameToWidget(pageview, "vertical"); X if (scroll) `7B X`09XtSetArg(args`5B0`5D, XtNshown, &shown); X`09XtSetArg(args`5B1`5D, XtNtopOfThumb, &top); X`09XtGetValues(scroll, args, TWO); X X`09top = top + shown; X`09if (top > (1.0 - shown)) top = (1.0 - shown); X`09XtCallCallbacks(scroll, XtNjumpProc, &top); X `7D X`7D X X/* scroll main viewport left */ Xvoid Xgv_scroll_left(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X Arg args`5B2`5D; X Widget scroll; X float top, shown; X X scroll = XtNameToWidget(pageview, "horizontal"); X if (scroll) `7B X`09XtSetArg(args`5B0`5D, XtNshown, &shown); X`09XtSetArg(args`5B1`5D, XtNtopOfThumb, &top); X`09XtGetValues(scroll, args, TWO); X X`09top = top - shown; X`09if (top < 0.0) top = 0.0; X`09XtCallCallbacks(scroll, XtNjumpProc, &top); X `7D X`7D X X/* scroll main viewport right */ Xvoid Xgv_scroll_right(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X Arg args`5B2`5D; X Widget scroll; X float top, shown; X X scroll = XtNameToWidget(pageview, "horizontal"); X if (scroll) `7B X`09XtSetArg(args`5B0`5D, XtNshown, &shown); X`09XtSetArg(args`5B1`5D, XtNtopOfThumb, &top); X`09XtGetValues(scroll, args, TWO); X X`09top = top + shown; X`09if (top > (1.0 - shown)) top = (1.0 - shown); X`09XtCallCallbacks(scroll, XtNjumpProc, &top); X `7D X`7D X X/* Pop down locator window */ Xvoid Xgv_erase_locator(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X Arg args`5B1`5D; X X if (!app_res.show_locator) return; X XtSetArg(args`5B0`5D, XtNlabel, ""); X XtSetValues(locator, args, ONE); X`7D X X/* Check to see if file was updated */ Xvoid Xgv_check_file(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X struct stat sbuf; X X if (psfile) `7B X`09if (!stat(filename, &sbuf) && mtime != sbuf.st_mtime) `7B X`09 show_page(current_page); X`09`7D X `7D X`7D $ CALL UNPACK ACTIONS.C;1 741768195 $ create 'f' X#!/bin/sh X# X#`09ad2c : Convert app-defaults file to C strings decls. X# X#`09George Ferguson, ferguson@cs.rcohester.edu, 12 Nov 1990. X#`0919 Mar 1991 : gf X#`09`09Made it self-contained. X#`096 Jan 1992 : mycroft@gnu.ai.mit.edu (Charles Hannum) X#`09`09Removed use of "-n" and ":read" label since Gnu and X#`09`09IBM sed print pattern space on "n" command. Still works X#`09`09with Sun sed, of course. X#`097 Jan 1992: matthew@sunpix.East.Sun.COM (Matthew Stier) X#`09`09Escape quotes after escaping backslashes. X# X Xsed ' X/`5E!/d X/`5E$/d Xs/\\/\\\\/g Xs/\\$//g Xs/"/\\"/g Xs/`5E/"/ X: test X/\\$/b slash Xs/$/",/ Xp Xd X: slash Xn X/`5E!/d X/`5E$/d Xs/"/\\"/g Xs/\\\\/\\/g Xs/\\n/\\\\n/g Xs/\\t/\\\\t/g Xs/\\f/\\\\f/g Xs/\\b/\\\\b/g Xb test' "$@" $ CALL UNPACK AD2C.;1 1431710482 $ create 'f' X/* X * callbacks.c -- X11 callbacks for ghostview. X * Copyright (C) 1992 Timothy O. Theisen X * X * This program is free software; you can redistribute it and/or modify X * it under the terms of the GNU General Public License as published by X * the Free Software Foundation; either version 2 of the License, or X * (at your option) any later version. X * X * This program is distributed in the hope that it will be useful, X * but WITHOUT ANY WARRANTY; without even the implied warranty of X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X * GNU General Public License for more details. X * X * You should have received a copy of the GNU General Public License X * along with this program; if not, write to the Free Software X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X * X * Author: Tim Theisen Systems Programmer X * Internet: tim@cs.wisc.edu Department of Computer Sciences X * UUCP: uwvax!tim University of Wisconsin-Madison X * Phone: (608)262-0438 1210 West Dayton Street X * FAX: (608)262-9777 Madison, WI 53706 X */ X X#include X#ifndef BUFSIZ X#define BUFSIZ 1024 X#endif X X#ifdef VMS X#define getenv _getenv X#endif X Xextern char *getenv(); X X#include X#include X#include X#include X#include X#include X#include X#include X X#include "Ghostview.h" X#include "gv.h" X#include "ps.h" X X/* Start application folding up by Destroying the top level widget. */ X/* The application exits when the last interpreter is killed during */ X/* a destroy callback from ghostview widgets. */ Xvoid Xquit_ghostview(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X XtDestroyWidget(toplevel); X`7D X X/* Popup a window. */ Xvoid Xpopup(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X positionpopup((Widget)client_data); X XtPopup((Widget)client_data, XtGrabNone); X XRaiseWindow(XtDisplay((Widget)client_data), XtWindow((Widget)client_dat Va)); X`7D X X/* Popup a dialog box. */ Xvoid Xpopup_dialog(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X#ifdef SELFILE X Widget button; X String okay, cancel; X String name, init_path; X Arg args`5B1`5D; X FILE* fp; X struct stat sbuf; X extern FILE *XsraSelFile(); X X button = XtNameToWidget(dialog, "cancel"); X if (button) `7B X`09XtSetArg(args`5B0`5D, XtNlabel, &cancel); X`09XtGetValues(button, args, ONE); X `7D X button = XtNameToWidget(dialog, "okay"); X if (button) `7B X`09XtSetArg(args`5B0`5D, XtNlabel, &okay); X`09XtGetValues(button, args, ONE); X `7D X#endif X X mode = (int) client_data; X switch (mode) `7B X case PRINT_WHOLE: X case PRINT_MARKED: X`09SetDialogPrompt(dialog, app_res.print_prompt); X`09if (app_res.default_printer) X`09 SetDialogResponse(dialog, app_res.default_printer); X`09else X`09 ClearDialogResponse(dialog); X`09popup(w, (XtPointer)dialogpopup, call_data); X`09break; X case OPEN: X#ifdef SELFILE X`09if (filename && strcmp(filename, "-")) init_path = filename; X`09else init_path = NULL; X`09fp = XsraSelFile(toplevel, app_res.open_prompt, okay, cancel, X`09`09`09 app_res.open_fail, init_path, "r", NULL, &name); X`09if (fp == NULL) break; X`09if (oldfilename) XtFree(oldfilename); X`09oldfilename = filename; X`09filename = name; X`09if (psfile) fclose(psfile); X`09psfile = fp; X`09stat(filename, &sbuf); X`09mtime = sbuf.st_mtime; X`09new_file(0); X`09show_page(0); X#else X`09SetDialogPrompt(dialog, app_res.open_prompt); X`09if (filename && strcmp(filename, "-")) X`09 SetDialogResponse(dialog, filename); X`09else X`09 ClearDialogResponse(dialog); X`09popup(w, dialogpopup, call_data); X#endif X`09break; X case SAVE: X#ifdef SELFILE X`09fp = XsraSelFile(toplevel, app_res.save_prompt, okay, cancel, X`09`09`09 app_res.save_fail, "", "w", NULL, &name); X`09if (fp == NULL) break; X`09pscopydoc(fp); X`09fclose(fp); X`09XtFree(name); X#else X`09SetDialogPrompt(dialog, app_res.save_prompt); X`09ClearDialogResponse(dialog); X`09popup(w, dialogpopup, call_data); X#endif X`09break; X `7D X`7D X X/* Explicitly reopen the file. */ Xvoid Xreopen_file(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X struct stat sbuf; X int number = current_page; X X fclose(psfile); X psfile = fopen(filename, "r"); X mtime = sbuf.st_mtime; X if (oldfilename) XtFree(oldfilename); X oldfilename = XtNewString(filename); X new_file(number); X show_page(number); X`7D X X/* Get the selection, if no selection, get the insertion point. */ X/* If the new_page is different from the current page show it. */ X/* If not at the first page, show the previous page. */ Xvoid Xprev_page(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X XawTextPosition pos, end; X int new_page; X X XawTextGetSelectionPos(toc, &pos, &end); X if (pos == end) `7B`09`09/* Nothing selected */ X`09pos = XawTextGetInsertionPoint(toc); X `7D X if ((new_page = pos/toc_entry_length) == current_page) `7B X`09new_page = current_page - 1; X `7D X if (new_page < 0) return; X show_page(new_page); X`7D X X/* Get the selection, if no selection, get the insertion point. */ X/* Show this page. */ Xvoid Xthis_page(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X if (toc_text) `7B X`09XawTextPosition pos, end; X`09int new_page; X X`09XawTextGetSelectionPos(toc, &pos, &end); X`09if (pos == end) `7B`09`09/* Nothing selected */ X`09 pos = XawTextGetInsertionPoint(toc); X`09`7D X`09new_page = pos/toc_entry_length; X`09show_page(new_page); X `7D else `7B X`09GhostviewDisableInterpreter(page); X`09show_page(0); X `7D X`7D X X/* Get the selection, if no selection, get the insertion point. */ X/* If the new_page is different from the current page show it. */ X/* If not at the last page, show the next page. */ Xvoid Xnext_page(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X XawTextPosition pos, end; X int new_page = 0; X X if (toc_text) `7B X`09XawTextGetSelectionPos(toc, &pos, &end); X`09if (pos == end) `7B`09`09/* Nothing selected */ X`09 pos = XawTextGetInsertionPoint(toc); X`09`7D X`09if ((new_page = pos/toc_entry_length) == current_page) `7B X`09 new_page = current_page + 1; X`09`7D X`09if (new_page >= doc->numpages) return; X `7D X show_page(new_page); X`7D X X/* Center the viewport over the page */ Xvoid Xcenter_page(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X Arg args`5B2`5D; X Widget scroll; X float top, shown; X X scroll = XtNameToWidget(pageview, "vertical"); X if (scroll) `7B X`09XtSetArg(args`5B0`5D, XtNshown, &shown); X`09XtSetArg(args`5B1`5D, XtNtopOfThumb, &top); X`09XtGetValues(scroll, args, TWO); X X`09top = (1.0 - shown) / 2.0; X`09XtCallCallbacks(scroll, XtNjumpProc, &top); X `7D X X scroll = XtNameToWidget(pageview, "horizontal"); X if (scroll) `7B X`09XtSetArg(args`5B0`5D, XtNshown, &shown); X`09XtSetArg(args`5B1`5D, XtNtopOfThumb, &top); X`09XtGetValues(scroll, args, TWO); X X`09top = (1.0 - shown) / 2.0; X`09XtCallCallbacks(scroll, XtNjumpProc, &top); X `7D X`7D X X/* Get the selection, if no selection, get the insertion point. */ X/* Mark all pages in range, and cause toc to update. */ Xvoid Xmark_page(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X XawTextPosition begin, end; X int i; X X XawTextGetSelectionPos(toc, &begin, &end); X if (begin == end) `7B`09`09/* Nothing selected */ X`09begin = end = XawTextGetInsertionPoint(toc); X `7D else `7B X`09end--;`09`09`09/* Sometimes end spills onto next line */ X `7D X for (i = begin/toc_entry_length; i <= end/toc_entry_length; i++) `7B X`09toc_text`5Bi*toc_entry_length`5D = '*'; X`09XawTextInvalidate(toc, i*toc_entry_length, i*toc_entry_length+1); X `7D X`7D X X/* Get the selection, if no selection, get the insertion point. */ X/* Unmark all pages in range, and cause toc to update. */ Xvoid Xunmark_page(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X XawTextPosition begin, end; X int i; X X XawTextGetSelectionPos(toc, &begin, &end); X if (begin == end) `7B`09`09/* Nothing selected */ X`09begin = end = XawTextGetInsertionPoint(toc); X `7D else `7B X`09end--;`09`09`09/* Sometimes end spills onto next line */ X `7D X for (i = begin/toc_entry_length; i <= end/toc_entry_length; i++) `7B X`09toc_text`5Bi*toc_entry_length`5D = ' '; X`09XawTextInvalidate(toc, i*toc_entry_length, i*toc_entry_length+1); X `7D X`7D X X/* Set new magstep. Reshow the current page if magstep changed. */ Xvoid Xset_magstep(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X app_res.magstep = (int)client_data; X if (set_new_magstep()) `7B X`09layout_ghostview(); X`09show_page(current_page); X `7D X`7D X X/* Set new orientation. Reshow the current page if orientation changed. */ Xvoid Xset_orientation(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X app_res.force_orientation = force_setting; X app_res.orientation = (XtPageOrientation) client_data; X if (set_new_orientation(current_page)) `7B X`09layout_ghostview(); X`09show_page(current_page); X `7D X`7D X X/* Swap the landscape labels and change the flag. */ Xvoid Xswap_landscape(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X Arg args`5B1`5D; X String s1, s2; X X app_res.swap_landscape = !app_res.swap_landscape; X X XtSetArg(args`5B0`5D, XtNlabel, &s1); X XtGetValues(landscapebutton, args, ONE); X s1 = XtNewString(s1); X XtSetArg(args`5B0`5D, XtNlabel, &s2); X XtGetValues(seascapebutton, args, ONE); X s2 = XtNewString(s2); X XtSetArg(args`5B0`5D, XtNlabel, s2); X XtSetValues(landscapebutton, args, ONE); X XtSetArg(args`5B0`5D, XtNlabel, s1); X XtSetValues(seascapebutton, args, ONE); X XtFree(s1); X XtFree(s2); X X if (set_new_orientation(current_page)) `7B X`09layout_ghostview(); X`09show_page(current_page); X `7D X`7D X X/* Set new page media. If new page media is different, update app_resources V */ X/* and redisplay page. */ Xvoid Xset_pagemedia(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X int new_pagemedia = (int) client_data; X if (new_pagemedia >= base_papersize) `7B X`09default_pagemedia = new_pagemedia; X`09app_res.force_pagemedia = force_setting; X `7D else `7B X`09document_media = new_pagemedia; X`09force_document_media = force_setting; X `7D X if (set_new_pagemedia(current_page)) `7B X`09layout_ghostview(); X`09show_page(current_page); X `7D X`7D X X/* track mouse pointer and popup zoom window */ Xvoid Xtrack_and_zoom(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X Arg args`5B20`5D; X Cardinal num_args; X Dimension width, height; X Widget zoom; X Widget zoomform; X Widget zoompage; X Widget zoomdismiss; X FILE *zoomfile; X struct stat sbuf; X GhostviewReturnStruct *p = (GhostviewReturnStruct *)call_data; X int llx; X int lly; X int urx; X int ury; X int bottom_margin; X int left_margin; X int right_margin; X int top_margin; X int i; X X /* locator events have zero width and height */ X if ((p->width == 0) `7C`7C (p->height == 0)) `7B X`09char buf`5B32`5D; X`09if (!app_res.show_locator) return; X`09sprintf(buf, "(%d, %d)", p->psx, p->psy); X`09XtSetArg(args`5B0`5D, XtNlabel, buf); X`09XtSetValues(locator, args, ONE); X`09return; X `7D X X /* If no file, nothing to zoom. */ X if (!psfile) return; X X /* If the file changed, cannot zoom */ X stat(filename, &sbuf); X if (mtime != sbuf.st_mtime) return; X`09`09`09`09`09`09`09num_args = 0; X XtSetArg(args`5Bnum_args`5D, XtNcolormap, cmap);`09num_args++; X if (special_cmap) `7B X`09XtSetArg(args`5Bnum_args`5D, XtNbackground, white);`09num_args++; X `7D X zoom = XtCreatePopupShell("zoom", topLevelShellWidgetClass, X`09`09`09 toplevel, args, num_args); X X`09`09`09`09`09`09`09num_args = 0; X if (special_cmap) `7B X`09XtSetArg(args`5Bnum_args`5D, XtNbackground, white);`09num_args++; X `7D X zoomform = XtCreateManagedWidget("form", formWidgetClass, X`09`09`09`09 zoom, args, num_args); X X llx = p->psx - p->width/2; X lly = p->psy - p->height/2; X urx = p->psx + p->width/2; X ury = p->psy + p->height/2; X X /* Make sure zoom window doesn't go off the edge of the page */ X if (llx < current_llx) `7B X`09llx = current_llx; X`09urx = llx + p->width; X `7D X if (lly < current_lly) `7B X`09lly = current_lly; X`09ury = lly + p->height; X `7D X if (urx > current_urx) `7B X`09urx = current_urx; X`09llx = urx - p->width; X `7D X if (ury > current_ury) `7B X`09ury = current_ury; X`09lly = ury - p->height; X `7D X if (llx < current_llx) `7B X`09llx = current_llx; X `7D X if (lly < current_lly) `7B X`09lly = current_lly; X `7D X bottom_margin = lly - current_lly; X left_margin = llx - current_llx; X right_margin = current_urx - urx; X top_margin = current_ury - ury; X X`09`09`09`09`09`09`09num_args = 0; X if (special_cmap) `7B X`09XtSetArg(args`5Bnum_args`5D, XtNbackground, white);`09num_args++; X `7D X XtSetArg(args`5Bnum_args`5D, XtNtop, XtChainTop);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNbottom, XtChainBottom);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNleft, XtChainLeft);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNright, XtChainRight);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNorientation, current_orientation); X`09`09`09`09`09`09`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNllx, llx); `09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNlly, lly); `09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNurx, urx); `09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNury, ury); `09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNbottomMargin, bottom_margin); X`09`09`09`09`09`09`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNleftMargin, left_margin); X`09`09`09`09`09`09`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNrightMargin, right_margin); X`09`09`09`09`09`09`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNtopMargin, top_margin); num_args++; X XtSetArg(args`5Bnum_args`5D, XtNbottomMargin, bottom_margin); X`09`09`09`09`09`09`09num_args++; X XtSetFloatArg(args`5Bnum_args`5D, XtNxdpi, p->xdpi);`09num_args++; X XtSetFloatArg(args`5Bnum_args`5D, XtNydpi, p->ydpi);`09num_args++; X if (!toc_text) `7B X XtSetArg(args`5Bnum_args`5D, XtNfilename, filename);`09num_args++; X `7D X zoompage = XtCreateManagedWidget("page", ghostviewWidgetClass, X`09`09`09`09 zoomform, args, num_args); X num_ghosts++; X XtAddCallback(zoompage, XtNcallback, track_and_zoom, (XtPointer)0); X XtAddCallback(zoompage, XtNmessageCallback, message, (XtPointer)zoompage V); X XtAddCallback(zoompage, XtNdestroyCallback, destroy_ghost, X`09`09 (XtPointer)zoompage); X X`09`09`09`09`09`09`09num_args = 0; X if (special_cmap) `7B X`09XtSetArg(args`5Bnum_args`5D, XtNforeground, black);`09num_args++; X`09XtSetArg(args`5Bnum_args`5D, XtNbackground, white);`09num_args++; X `7D X XtSetArg(args`5Bnum_args`5D, XtNfromVert, zoompage);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNtop, XtChainBottom);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNbottom, XtChainBottom);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNleft, XtChainLeft);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNright, XtChainRight);`09num_args++; X zoomdismiss = XtCreateManagedWidget("dismiss", commandWidgetClass, X`09`09`09`09 zoomform, args, num_args); X XtAddCallback(zoomdismiss, XtNcallback, destroy, (XtPointer)zoom); X X XtSetArg(args`5B0`5D, XtNwidth, &width); X XtGetValues(zoompage, args, ONE); X XtSetArg(args`5B0`5D, XtNwidth, width); X XtSetValues(zoomdismiss, args, ONE); X X XtRealizeWidget(zoom); X positionpopup(zoom); X X`09`09`09`09`09`09`09num_args = 0; X XtSetArg(args`5Bnum_args`5D, XtNwidth, &width);`09`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNheight, &height);`09num_args++; X XtGetValues(zoom, args, num_args); X X`09`09`09`09`09`09`09 `09num_args = 0; X XtSetArg(args`5Bnum_args`5D, XtNminWidth, width);`09`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNminHeight, height);`09`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNmaxWidth, width);`09`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNmaxHeight, height);`09`09num_args++; X XtSetValues(zoom, args, num_args); X XSetWMProtocols(XtDisplay(zoom), XtWindow(zoom), &wm_delete_window, 1); X XtPopup(zoom, XtGrabNone); X X if (toc_text) `7B X`09zoomfile = fopen(filename, "r"); X`09if (zoomfile == NULL) return; X`09GhostviewSendPS(zoompage, zoomfile, doc->beginprolog, X`09`09`09doc->lenprolog, False); X`09GhostviewSendPS(zoompage, zoomfile, doc->beginsetup, X`09`09`09doc->lensetup, False); X`09if (doc->pageorder == DESCEND) X`09 i = (doc->numpages - 1) - current_page; X`09else X`09 i = current_page; X`09GhostviewSendPS(zoompage, zoomfile, doc->pages`5Bi`5D.begin, X`09`09`09doc->pages`5Bi`5D.len, True); X `7D X`7D X X/* Process messages from ghostscript */ X/* Refresh occurs when window was resized unexpectedly */ Xvoid Xmessage(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X int i; X char *error; X X if (!strcmp((char *) call_data, "Failed")) `7B X`09if ((Widget)client_data == page) `7B X`09 error = "Error: PostScript interpreter failed in main window.\n\n"; X`09`7D else `7B X`09 error = "Error: PostScript interpreter failed in zoom window.\n\n"; X`09`7D X`09output(w, NULL, error); X `7D else if (!strcmp((char *) call_data, "BadAlloc")) `7B X`09if ((Widget)client_data == page) `7B X`09 error =`20 X`09 "Warning: Could not allocate backing pixmap in main window.\n\n"; X`09`7D else `7B X`09 error =`20 X`09 "Warning: Could not allocate backing pixmap in zoom window.\n\n"; X`09`7D X`09output(w, NULL, error); X `7D else if (!strcmp((char *) call_data, "Refresh")) `7B X`09if (toc_text) `7B X`09 GhostviewSendPS(w, psfile, doc->beginprolog, X`09`09`09 doc->lenprolog, False); X`09 GhostviewSendPS(w, psfile, doc->beginsetup, X`09`09`09 doc->lensetup, False); X`09 if (doc->pageorder == DESCEND) X`09`09i = (doc->numpages - 1) - current_page; X`09 else X`09`09i = current_page; X`09 GhostviewSendPS(w, psfile, doc->pages`5Bi`5D.begin, X`09`09`09 doc->pages`5Bi`5D.len, False); X`09`7D X `7D X`7D X X/* Take output from ghostscript and display it in the infotext popup window V */ Xvoid Xoutput(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X Arg args`5B2`5D; X XawTextBlock message_block; X X message_block.firstPos = 0; X message_block.length = strlen(call_data); X message_block.ptr = call_data; X message_block.format = FMT8BIT; X X XawTextDisableRedisplay(infotext); X X XtSetArg(args`5B0`5D, XtNeditType, XawtextAppend); X XtSetValues(infotext, args, ONE); X XawTextReplace(infotext, info_length, info_length, &message_block); X info_length = info_length + message_block.length; X X XtSetArg(args`5B0`5D, XtNeditType, XawtextRead); X XtSetArg(args`5B1`5D, XtNinsertPosition, info_length); X XtSetValues(infotext, args, TWO); X XawTextEnableRedisplay(infotext); X if (!info_up) XtPopup(infopopup, XtGrabNone); X info_up = True; X`7D X X/* Dismiss popup dialog */ Xvoid Xokay(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X String name, error; X Widget dialog; X X dialog = (Widget)client_data; X name = GetDialogResponse(dialog); X switch (mode) `7B X case PRINT_WHOLE: X case PRINT_MARKED: X`09if (error = print_file(name, (mode == PRINT_WHOLE))) `7B X`09 char *buf = XtMalloc(strlen(error) + X`09`09`09`09 strlen(app_res.print_prompt) + 2); X`09 sprintf(buf, "%s\n%s", error, app_res.print_prompt); X`09 SetDialogPrompt(dialog, buf); X`09 XtFree(error); X`09 XtFree(buf); X`09`7D else `7B X`09 XtPopdown(XtParent(dialog)); X`09`7D X`09break; X case OPEN: X`09if (error = open_file(name)) `7B X`09 char *buf = XtMalloc(strlen(error) + X`09`09`09`09 strlen(app_res.open_prompt) + 2); X`09 sprintf(buf, "%s\n%s", error, app_res.open_prompt); X`09 SetDialogPrompt(dialog, buf); X`09 XtFree(error); X`09 XtFree(buf); X`09`7D else `7B X`09 XtPopdown(XtParent(dialog)); X`09`7D X`09break; X case SAVE: X`09if (error = save_file(name)) `7B X`09 char *buf = XtMalloc(strlen(error) + X`09`09`09`09 strlen(app_res.save_prompt) + 2); X`09 sprintf(buf, "%s\n%s", error, app_res.save_prompt); X`09 SetDialogPrompt(dialog, buf); X`09 XtFree(error); X`09 XtFree(buf); X`09`7D else `7B X`09 XtPopdown(XtParent(dialog)); X`09`7D X`09break; X `7D X XtFree(name); X`7D X X/* Dismiss popup window */ Xvoid Xdismiss(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X XtPopdown((Widget)client_data); X if ((Widget)client_data == infopopup) info_up = False; X`7D X X/* Destroy popup window */ Xvoid Xdestroy(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X XtDestroyWidget((Widget)client_data); X`7D X X/* destroy callback for Ghostview widgets. */ X/* The disable interpreter call ensures that ghostscript is killed. */ X/* One the count goes to 0, we are sure that all forked processes have */ X/* been killed and that we can safely exit. */ Xvoid Xdestroy_ghost(w, client_data, call_data) X Widget w; X XtPointer client_data, call_data; X`7B X GhostviewDisableInterpreter((Widget) client_data); X num_ghosts--; X if (num_ghosts) return; X if (dying) old_Xerror(XtDisplay(w), &bomb); X XtDestroyApplicationContext(app_con); X exit(0); X`7D $ CALL UNPACK CALLBACKS.C;1 2064228442 $ create 'f' XComments recognized by ghostview X================================ X X%!PS-Adobe- `5BEPSF-`5D X%%BoundingBox: `7C(atend) X%%CreationDate: X%%Orientation: Portrait`7CLandscape`7C(atend) X%%Pages: `7C(atend) X%%PageOrder: Ascend`7CDescend`7CSpecial`7C(atend) X%%Title: X%%DocumentMedia: X%%DocumentPageSizes: X%%EndComments X X%%BeginPreview X%%EndPreview X X%%BeginDefaults X%%PageBoundingBox: `7C(atend) X%%PageOrientation: Portrait`7CLandscape X%%PageMedia: X%%EndDefaults X X%%BeginProlog X%%EndProlog X X%%BeginSetup X%%PageBoundingBox: `7C(atend) X%%PageOrientation: Portrait`7CLandscape X%%PaperSize: X%%EndSetup X X%%Page: X%%PageBoundingBox: `7C(atend) X%%PageOrientation: Portrait`7CLandscape X%%PageMedia: X%%PaperSize: X X%%Trailer X%%EOF X X%%BeginDocument: `5B`5B`5D`5D X%%EndDocument X X%%BeginBinary: X%%EndBinary X X%%BeginData: `5BHex`7CBinary`7CASCII`5BBytes`7CLines`5D`5D X%%EndData X X XPaper Keywords and paper size in points X======================================= X XLetter`09`09 612x792 XLetterSmall`09 612x792 XTabloid`09`09 792x1224 XLedger`09`091224x792 XLegal`09`09 612x1008 XStatement`09 396x612 XExecutive`09 540x720 XA3`09`09 842x1190 XA4`09`09 595x842 XA4Small`09`09 595x842 XA5`09`09 420x595 XB4`09`09 729x1032 XB5`09`09 516x729 XEnvelope`09 ???x??? XFolio`09`09 612x936 XQuarto`09`09 610x780 X10x14`09`09 720x1008 $ CALL UNPACK COMMENTS.DOC;1 506932914 $ create 'f' X`09`09 GNU GENERAL PUBLIC LICENSE X`09`09 Version 2, June 1991 X X Copyright (C) 1989, 1991 Free Software Foundation, Inc. X 675 Mass Ave, Cambridge, MA 02139, USA X Everyone is permitted to copy and distribute verbatim copies X of this license document, but changing it is not allowed. X X`09`09`09 Preamble X X The licenses for most software are designed to take away your Xfreedom to share and change it. By contrast, the GNU General Public XLicense is intended to guarantee your freedom to share and change free Xsoftware--to make sure the software is free for all its users. This XGeneral Public License applies to most of the Free Software XFoundation's software and to any other program whose authors commit to Xusing it. (Some other Free Software Foundation software is covered by Xthe GNU Library General Public License instead.) You can apply it to Xyour programs, too. X X When we speak of free software, we are referring to freedom, not Xprice. Our General Public Licenses are designed to make sure that you Xhave the freedom to distribute copies of free software (and charge for Xthis service if you wish), that you receive source code or can get it Xif you want it, that you can change the software or use pieces of it Xin new free programs; and that you know you can do these things. X X To protect your rights, we need to make restrictions that forbid Xanyone to deny you these rights or to ask you to surrender the rights. XThese restrictions translate to certain responsibilities for you if you Xdistribute copies of the software, or if you modify it. X X For example, if you distribute copies of such a program, whether Xgratis or for a fee, you must give the recipients all the rights that Xyou have. You must make sure that they, too, receive or can get the Xsource code. And you must show them these terms so they know their Xrights. X X We protect your rights with two steps: (1) copyright the software, and X(2) offer you this license which gives you legal permission to copy, Xdistribute and/or modify the software. X X Also, for each author's protection and ours, we want to make certain Xthat everyone understands that there is no warranty for this free Xsoftware. If the software is modified by someone else and passed on, we Xwant its recipients to know that what they have is not the original, so Xthat any problems introduced by others will not reflect on the original Xauthors' reputations. X X Finally, any free program is threatened constantly by software Xpatents. We wish to avoid the danger that redistributors of a free Xprogram will individually obtain patent licenses, in effect making the Xprogram proprietary. To prevent this, we have made it clear that any Xpatent must be licensed for everyone's free use or not licensed at all. X X The precise terms and conditions for copying, distribution and Xmodification follow. X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X`09`09 GNU GENERAL PUBLIC LICENSE X TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION X X 0. This License applies to any program or other work which contains Xa notice placed by the copyright holder saying it may be distributed Xunder the terms of this General Public License. The "Program", below, Xrefers to any such program or work, and a "work based on the Program" Xmeans either the Program or any derivative work under copyright law: Xthat is to say, a work containing the Program or a portion of it, Xeither verbatim or with modifications and/or translated into another Xlanguage. (Hereinafter, translation is included without limitation in Xthe term "modification".) Each licensee is addressed as "you". X XActivities other than copying, distribution and modification are not Xcovered by this License; they are outside its scope. The act of Xrunning the Program is not restricted, and the output from the Program Xis covered only if its contents constitute a work based on the XProgram (independent of having been made by running the Program). XWhether that is true depends on what the Program does. X X 1. You may copy and distribute verbatim copies of the Program's Xsource code as you receive it, in any medium, provided that you Xconspicuously and appropriately publish on each copy an appropriate Xcopyright notice and disclaimer of warranty; keep intact all the Xnotices that refer to this License and to the absence of any warranty; Xand give any other recipients of the Program a copy of this License Xalong with the Program. X XYou may charge a fee for the physical act of transferring a copy, and Xyou may at your option offer warranty protection in exchange for a fee. X X 2. You may modify your copy or copies of the Program or any portion Xof it, thus forming a work based on the Program, and copy and Xdistribute such modifications or work under the terms of Section 1 Xabove, provided that you also meet all of these conditions: X X a) You must cause the modified files to carry prominent notices X stating that you changed the files and the date of any change. X X b) You must cause any work that you distribute or publish, that in X whole or in part contains or is derived from the Program or any X part thereof, to be licensed as a whole at no charge to all third X parties under the terms of this License. X X c) If the modified program normally reads commands interactively X when run, you must cause it, when started running for such X interactive use in the most ordinary way, to print or display an X announcement including an appropriate copyright notice and a X notice that there is no warranty (or else, saying that you provide X a warranty) and that users may redistribute the program under X these conditions, and telling the user how to view a copy of this X License. (Exception: if the Program itself is interactive but X does not normally print such an announcement, your work based on X the Program is not required to print an announcement.) X X X X X X X X X X X X X X XThese requirements apply to the modified work as a whole. If Xidentifiable sections of that work are not derived from the Program, Xand can be reasonably considered independent and separate works in Xthemselves, then this License, and its terms, do not apply to those +-+-+-+-+-+-+-+- END OF PART 1 +-+-+-+-+-+-+-+- Return-Path: mccall!tp@!mccall.com Delivery-Date: Tue, 27 Oct 92 18:54:07 -0600 Return-Path: mccall!tp@!mccall.com Received: from cs.wisc.edu by appenzell.cs.wisc.edu; Tue, 27 Oct 92 18:53:49 -0600 Received: from depot.cis.ksu.edu by cs.wisc.edu; Tue, 27 Oct 92 18:53:29 -0600 Return-Path: Received: from mccall.UUCP by depot.cis.ksu.edu UUCP (5.65a) id AA16991; Tue, 27 Oct 92 18:52:36 -0600 Received: by mccall.com (DECUS UUCP /1.3-1/2.5/); Tue, 27 Oct 92 18:38:15 CST Received: by mccall.com (MX V3.1C) id 12835; Tue, 27 Oct 1992 18:38:07 CST Date: Tue, 27 Oct 1992 18:38:09 CST From: Terry Poot To: tim Message-Id: <00962BAF.699768C0.12835@mccall.com> Subject: Ghostview for VMS 02/14 -+-+-+-+-+-+-+-+ START OF PART 2 -+-+-+-+-+-+-+-+ Xsections when you distribute them as separate works. But when you Xdistribute the same sections as part of a whole which is a work based Xon the Program, the distribution of the whole must be on the terms of Xthis License, whose permissions for other licensees extend to the Xentire whole, and thus to each and every part regardless of who wrote it. X XThus, it is not the intent of this section to claim rights or contest Xyour rights to work written entirely by you; rather, the intent is to Xexercise the right to control the distribution of derivative or Xcollective works based on the Program. X XIn addition, mere aggregation of another work not based on the Program Xwith the Program (or with a work based on the Program) on a volume of Xa storage or distribution medium does not bring the other work under Xthe scope of this License. X X 3. You may copy and distribute the Program (or a work based on it, Xunder Section 2) in object code or executable form under the terms of XSections 1 and 2 above provided that you also do one of the following: X X a) Accompany it with the complete corresponding machine-readable X source code, which must be distributed under the terms of Sections X 1 and 2 above on a medium customarily used for software interchange; or, X X b) Accompany it with a written offer, valid for at least three X years, to give any third party, for a charge no more than your X cost of physically performing source distribution, a complete X machine-readable copy of the corresponding source code, to be X distributed under the terms of Sections 1 and 2 above on a medium X customarily used for software interchange; or, X X c) Accompany it with the information you received as to the offer X to distribute corresponding source code. (This alternative is X allowed only for noncommercial distribution and only if you X received the program in object code or executable form with such X an offer, in accord with Subsection b above.) X XThe source code for a work means the preferred form of the work for Xmaking modifications to it. For an executable work, complete source Xcode means all the source code for all modules it contains, plus any Xassociated interface definition files, plus the scripts used to Xcontrol compilation and installation of the executable. However, as a Xspecial exception, the source code distributed need not include Xanything that is normally distributed (in either source or binary Xform) with the major components (compiler, kernel, and so on) of the Xoperating system on which the executable runs, unless that component Xitself accompanies the executable. X XIf distribution of executable or object code is made by offering Xaccess to copy from a designated place, then offering equivalent Xaccess to copy the source code from the same place counts as Xdistribution of the source code, even though third parties are not Xcompelled to copy the source along with the object code. X X X X X X X X X X X X 4. You may not copy, modify, sublicense, or distribute the Program Xexcept as expressly provided under this License. Any attempt Xotherwise to copy, modify, sublicense or distribute the Program is Xvoid, and will automatically terminate your rights under this License. XHowever, parties who have received copies, or rights, from you under Xthis License will not have their licenses terminated so long as such Xparties remain in full compliance. X X 5. You are not required to accept this License, since you have not Xsigned it. However, nothing else grants you permission to modify or Xdistribute the Program or its derivative works. These actions are Xprohibited by law if you do not accept this License. Therefore, by Xmodifying or distributing the Program (or any work based on the XProgram), you indicate your acceptance of this License to do so, and Xall its terms and conditions for copying, distributing or modifying Xthe Program or works based on it. X X 6. Each time you redistribute the Program (or any work based on the XProgram), the recipient automatically receives a license from the Xoriginal licensor to copy, distribute or modify the Program subject to Xthese terms and conditions. You may not impose any further Xrestrictions on the recipients' exercise of the rights granted herein. XYou are not responsible for enforcing compliance by third parties to Xthis License. X X 7. If, as a consequence of a court judgment or allegation of patent Xinfringement or for any other reason (not limited to patent issues), Xconditions are imposed on you (whether by court order, agreement or Xotherwise) that contradict the conditions of this License, they do not Xexcuse you from the conditions of this License. If you cannot Xdistribute so as to satisfy simultaneously your obligations under this XLicense and any other pertinent obligations, then as a consequence you Xmay not distribute the Program at all. For example, if a patent Xlicense would not permit royalty-free redistribution of the Program by Xall those who receive copies directly or indirectly through you, then Xthe only way you could satisfy both it and this License would be to Xrefrain entirely from distribution of the Program. X XIf any portion of this section is held invalid or unenforceable under Xany particular circumstance, the balance of the section is intended to Xapply and the section as a whole is intended to apply in other Xcircumstances. X XIt is not the purpose of this section to induce you to infringe any Xpatents or other property right claims or to contest validity of any Xsuch claims; this section has the sole purpose of protecting the Xintegrity of the free software distribution system, which is Ximplemented by public license practices. Many people have made Xgenerous contributions to the wide range of software distributed Xthrough that system in reliance on consistent application of that Xsystem; it is up to the author/donor to decide if he or she is willing Xto distribute software through any other system and a licensee cannot Ximpose that choice. X XThis section is intended to make thoroughly clear what is believed to Xbe a consequence of the rest of this License. X X X X X X X X X X X X X 8. If the distribution and/or use of the Program is restricted in Xcertain countries either by patents or by copyrighted interfaces, the Xoriginal copyright holder who places the Program under this License Xmay add an explicit geographical distribution limitation excluding Xthose countries, so that distribution is permitted only in or among Xcountries not thus excluded. In such case, this License incorporates Xthe limitation as if written in the body of this License. X X 9. The Free Software Foundation may publish revised and/or new versions Xof the General Public License from time to time. Such new versions will Xbe similar in spirit to the present version, but may differ in detail to Xaddress new problems or concerns. X XEach version is given a distinguishing version number. If the Program Xspecifies a version number of this License which applies to it and "any Xlater version", you have the option of following the terms and conditions Xeither of that version or of any later version published by the Free XSoftware Foundation. If the Program does not specify a version number of Xthis License, you may choose any version ever published by the Free Software XFoundation. X X 10. If you wish to incorporate parts of the Program into other free Xprograms whose distribution conditions are different, write to the author Xto ask for permission. For software which is copyrighted by the Free XSoftware Foundation, write to the Free Software Foundation; we sometimes Xmake exceptions for this. Our decision will be guided by the two goals Xof preserving the free status of all derivatives of our free software and Xof promoting the sharing and reuse of software generally. X X`09`09`09 NO WARRANTY X X 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, XREPAIR OR CORRECTION. X X 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE XPOSSIBILITY OF SUCH DAMAGES. X X`09`09 END OF TERMS AND CONDITIONS X X X X X X X X X X X X X X X X X`09Appendix: How to Apply These Terms to Your New Programs X X If you develop a new program, and you want it to be of the greatest Xpossible use to the public, the best way to achieve this is to make it Xfree software which everyone can redistribute and change under these terms. X X To do so, attach the following notices to the program. It is safest Xto attach them to the start of each source file to most effectively Xconvey the exclusion of warranty; and each file should have at least Xthe "copyright" line and a pointer to where the full notice is found. X X X Copyright (C) 19yy X X This program is free software; you can redistribute it and/or modify X it under the terms of the GNU General Public License as published by X the Free Software Foundation; either version 2 of the License, or X (at your option) any later version. X X This program is distributed in the hope that it will be useful, X but WITHOUT ANY WARRANTY; without even the implied warranty of X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X GNU General Public License for more details. X X You should have received a copy of the GNU General Public License X along with this program; if not, write to the Free Software X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X XAlso add information on how to contact you by electronic and paper mail. X XIf the program is interactive, make it output a short notice like this Xwhen it starts in an interactive mode: X X Gnomovision version 69, Copyright (C) 19yy name of author X Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `60show V w'. X This is free software, and you are welcome to redistribute it X under certain conditions; type `60show c' for details. X XThe hypothetical commands `60show w' and `60show c' should show the appropri Vate Xparts of the General Public License. Of course, the commands you use may Xbe called something other than `60show w' and `60show c'; they could even be Xmouse-clicks or menu items--whatever suits your program. X XYou should also get your employer (if you work as a programmer) or your Xschool, if any, to sign a "copyright disclaimer" for the program, if Xnecessary. Here is a sample; alter the names: X X Yoyodyne, Inc., hereby disclaims all copyright interest in the program X `60Gnomovision' (which makes passes at compilers) written by James Hacker. X X , 1 April 1989 X Ty Coon, President of Vice X XThis General Public License does not permit incorporating your program into Xproprietary programs. If your program is a subroutine library, you may Xconsider it more useful to permit linking proprietary applications with the Xlibrary. If this is what you want to do, use the GNU Library General XPublic License instead of this License. $ CALL UNPACK COPYING.;1 2085588731 $ create 'f' X.first X`09@lsrc:`5Bx11`5Dlogicals.com !<<< change for your system! X`09copy/log x11_xmu:xmushr.psects,x11_xaw:xawshr.psects,x11_xaw:user.opt - X`09`09gv.opt XGV.EXE : GV.OLB XMUSHR XAWSHR X`09$(link) $(linkflags) /exe=gv.exe `09`09gv.olb/include=main/library,gv.opt V/opt XGV.OLB : GV.OLB(MAIN=MAIN.OBJ) GV.OLB(MISC=MISC.OBJ) GV.OLB(CALLBACKS=CALLBA VCKS.OBJ) - X`09 GV.OLB(ACTIONS=ACTIONS.OBJ) GV.OLB(DIALOGS=DIALOGS.OBJ) GV.OLB(GHOSTVIEW V=GHOSTVIEW.OBJ) - X`09 GV.OLB(PS=PS.OBJ) GV.OLB(STRCASECMP=STRCASECMP.OBJ) X`09@ continue XGV.OLB(MAIN=MAIN.OBJ) : MAIN.OBJ X`09If "''F$Search("$@")'" .EQS. "" Then $(LIBR)/Create $@ X`09$(LIBR)$(LIBRFLAGS) $@ MAIN.OBJ XMAIN.OBJ : MAIN.C GHOSTVIEW.H GV.H - X`09 PS.H APP-DEFAULTS.H X`09$(CC) $(CFLAGS) MAIN.C XAPP-DEFAULTS.H : GHOSTVIEW.AD X`09get_run = 0 X`09get_ad2c = 0 X`09if f$search("run-ad2c.").eqs."" then get_run = 1 X`09if f$search("ad2c.").eqs."" then get_ad2c = 1 X`09- if get_run then cms fetch run-ad2c. X`09- if get_ad2c then cms fetch ad2c. X`09- posix/run posix$bin:sh. run-ad2c X`09if get_run then delete run-ad2c.;* X`09if get_ad2c then delete ad2c.;* XGV.OLB(MISC=MISC.OBJ) : MISC.OBJ X`09If "''F$Search("$@")'" .EQS. "" Then $(LIBR)/Create $@ X`09$(LIBR)$(LIBRFLAGS) $@ MISC.OBJ XMISC.OBJ : MISC.C GHOSTVIEW.H GV.H - X`09 PS.H X`09$(CC) $(CFLAGS) MISC.C XGV.OLB(CALLBACKS=CALLBACKS.OBJ) : CALLBACKS.OBJ X`09If "''F$Search("$@")'" .EQS. "" Then $(LIBR)/Create $@ X`09$(LIBR)$(LIBRFLAGS) $@ CALLBACKS.OBJ XCALLBACKS.OBJ : CALLBACKS.C GHOSTVIEW.H GV.H - X`09 PS.H X`09$(CC) $(CFLAGS) CALLBACKS.C XGV.OLB(ACTIONS=ACTIONS.OBJ) : ACTIONS.OBJ X`09If "''F$Search("$@")'" .EQS. "" Then $(LIBR)/Create $@ X`09$(LIBR)$(LIBRFLAGS) $@ ACTIONS.OBJ XACTIONS.OBJ : ACTIONS.C GV.H GHOSTVIEW.H - X`09 PS.H X`09$(CC) $(CFLAGS) ACTIONS.C XGV.OLB(DIALOGS=DIALOGS.OBJ) : DIALOGS.OBJ X`09If "''F$Search("$@")'" .EQS. "" Then $(LIBR)/Create $@ X`09$(LIBR)$(LIBRFLAGS) $@ DIALOGS.OBJ XDIALOGS.OBJ : DIALOGS.C GV.H GHOSTVIEW.H X`09$(CC) $(CFLAGS) DIALOGS.C XGV.OLB(GHOSTVIEW=GHOSTVIEW.OBJ) : GHOSTVIEW.OBJ X`09If "''F$Search("$@")'" .EQS. "" Then $(LIBR)/Create $@ X`09$(LIBR)$(LIBRFLAGS) $@ GHOSTVIEW.OBJ XGHOSTVIEW.OBJ : GHOSTVIEW.C GHOSTVIEWP.H GHOSTVIEW.H - X`09 VMS_TYPES.H X`09$(CC) $(CFLAGS) GHOSTVIEW.C XGV.OLB(PS=PS.OBJ) : PS.OBJ X`09If "''F$Search("$@")'" .EQS. "" Then $(LIBR)/Create $@ X`09$(LIBR)$(LIBRFLAGS) $@ PS.OBJ XPS.OBJ : PS.C PS.H X`09$(CC) $(CFLAGS) PS.C XGV.OLB(STRCASECMP=STRCASECMP.OBJ) : STRCASECMP.OBJ X`09If "''F$Search("$@")'" .EQS. "" Then $(LIBR)/Create $@ X`09$(LIBR)$(LIBRFLAGS) $@ STRCASECMP.OBJ XSTRCASECMP.OBJ : STRCASECMP.C STDC.H X`09$(CC) $(CFLAGS) STRCASECMP.C $ CALL UNPACK DESCRIP.MMS;1 274270372 $ create 'f' X/* X * dialogs.c -- Dialog box for ghostview. X * Copyright (C) 1992 Timothy O. Theisen X * X * This program is free software; you can redistribute it and/or modify X * it under the terms of the GNU General Public License as published by X * the Free Software Foundation; either version 2 of the License, or X * (at your option) any later version. X * X * This program is distributed in the hope that it will be useful, X * but WITHOUT ANY WARRANTY; without even the implied warranty of X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X * GNU General Public License for more details. X * X * You should have received a copy of the GNU General Public License X * along with this program; if not, write to the Free Software X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X * X * Author: Tim Theisen Systems Programmer X * Internet: tim@cs.wisc.edu Department of Computer Sciences X * UUCP: uwvax!tim University of Wisconsin-Madison X * Phone: (608)262-0438 1210 West Dayton Street X * FAX: (608)262-9777 Madison, WI 53706 X */ X X#include X#include X#include X#include X#include X#include X#include X#include X#include "gv.h" X Xstatic String okay_accelerators = X "#override\n\ X Return: set() notify() unset()\n"; X X/* Create a dialog widget */ X/* It is just a form widget with X * a label prompt X * a text response X * an oky button X * a cancel button */ XWidget XCreateDialog(parent, name, okay_callback, cancel_callback) X Widget parent; X String name; X XtCallbackProc okay_callback; X XtCallbackProc cancel_callback; X`7B X Widget form, prompt, response, okay, cancel; X Arg args`5B20`5D; X Cardinal num_args; X X`09`09`09`09`09`09`09num_args = 0; X if (special_cmap) `7B X`09XtSetArg(args`5Bnum_args`5D, XtNbackground, white);`09num_args++; X `7D X form = XtCreateManagedWidget(name, formWidgetClass, parent, args, num_ar Vgs); X X`09`09`09`09`09`09`09num_args = 0; X if (special_cmap) `7B X`09XtSetArg(args`5Bnum_args`5D, XtNforeground, black);`09num_args++; X`09XtSetArg(args`5Bnum_args`5D, XtNbackground, white);`09num_args++; X `7D X XtSetArg(args`5Bnum_args`5D, XtNtop, XtChainTop);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNbottom, XtChainTop);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNleft, XtChainLeft);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNright, XtChainLeft);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNresizable, True);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNborderWidth, 0);`09num_args++; X prompt = XtCreateManagedWidget("prompt", labelWidgetClass, X`09`09`09`09 form, args, num_args); X X`09`09`09`09`09`09`09num_args = 0; X if (special_cmap) `7B X`09XtSetArg(args`5Bnum_args`5D, XtNforeground, black);`09num_args++; X`09XtSetArg(args`5Bnum_args`5D, XtNbackground, white);`09num_args++; X `7D X XtSetArg(args`5Bnum_args`5D, XtNfromVert, prompt);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNtop, XtChainTop);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNbottom, XtChainTop);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNleft, XtChainLeft);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNright, XtChainLeft);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNresizable, True);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNeditType, XawtextEdit);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNresize, XawtextResizeWidth);`09num_args+ V+; X XtSetArg(args`5Bnum_args`5D, XtNstring, "");`09`09num_args++; X response = XtCreateManagedWidget("response", asciiTextWidgetClass, X`09`09`09`09 form, args, num_args); X X`09`09`09`09`09`09`09num_args = 0; X if (special_cmap) `7B X`09XtSetArg(args`5Bnum_args`5D, XtNforeground, black);`09num_args++; X`09XtSetArg(args`5Bnum_args`5D, XtNbackground, white);`09num_args++; X `7D X XtSetArg(args`5Bnum_args`5D, XtNfromVert, response);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNtop, XtChainTop);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNbottom, XtChainTop);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNleft, XtChainLeft);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNright, XtChainLeft);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNresizable, True);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNaccelerators, X`09 XtParseAcceleratorTable(okay_accelerators));`09num_args++; X okay = XtCreateManagedWidget("okay", commandWidgetClass, X`09`09`09`09 form, args, num_args); X XtAddCallback(okay, XtNcallback, okay_callback, form); X X`09`09`09`09`09`09`09num_args = 0; X if (special_cmap) `7B X`09XtSetArg(args`5Bnum_args`5D, XtNforeground, black);`09num_args++; X`09XtSetArg(args`5Bnum_args`5D, XtNbackground, white);`09num_args++; X `7D X XtSetArg(args`5Bnum_args`5D, XtNfromVert, response);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNfromHoriz, okay);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNtop, XtChainTop);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNbottom, XtChainTop);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNleft, XtChainLeft);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNright, XtChainLeft);`09num_args++; X XtSetArg(args`5Bnum_args`5D, XtNresizable, True);`09num_args++; X cancel = XtCreateManagedWidget("cancel", commandWidgetClass, X`09`09`09`09 form, args, num_args); X XtAddCallback(cancel, XtNcallback, cancel_callback, parent); X X XtInstallAccelerators(response, okay); X XtSetKeyboardFocus(form, response); X X return form; X`7D X X/* get the prompt from the dialog box. Used a startup time to X * save away the initial prompt */ XString XGetDialogPrompt(w) X Widget w; X`7B X Arg args`5B1`5D; X Widget label; X String s; X X label = XtNameToWidget(w, "prompt"); X XtSetArg(args`5B0`5D, XtNlabel, &s); X XtGetValues(label, args, ONE); X return XtNewString(s); X`7D X X/* set the prompt. This is used to put error information in the prompt */ Xvoid XSetDialogPrompt(w, newprompt) X Widget w; X String newprompt; X`7B X Arg args`5B1`5D; X Widget label; X X label = XtNameToWidget(w, "prompt"); X XtSetArg(args`5B0`5D, XtNlabel, newprompt); X XtSetValues(label, args, ONE); X`7D X X/* get what the user typed */ XString XGetDialogResponse(w) X Widget w; X`7B X Arg args`5B1`5D; X Widget response; X String s; X X response = XtNameToWidget(w, "response"); X XtSetArg(args`5B0`5D, XtNstring, &s); X XtGetValues(response, args, ONE); X return XtNewString(s); X`7D X X/* set the default reponse */ Xvoid XSetDialogResponse(w, s) X Widget w; X String s; X`7B X Arg args`5B3`5D; X Widget response; X XFontStruct *font; X Dimension width, leftMargin, rightMargin; X X response = XtNameToWidget(w, "response"); X XtSetArg(args`5B0`5D, XtNfont, &font); X XtSetArg(args`5B1`5D, XtNleftMargin, &leftMargin); X XtSetArg(args`5B2`5D, XtNrightMargin, &rightMargin); X XtGetValues(response, args, THREE); X width = font->max_bounds.width * strlen(s) + leftMargin + rightMargin; X X XtSetArg(args`5B0`5D, XtNstring, s); X XtSetArg(args`5B1`5D, XtNwidth, width); X XtSetValues(response, args, TWO); X XawTextSetInsertionPoint(response, strlen(s)); X X`7D X X/* clear the response */ Xvoid XClearDialogResponse(w) X Widget w; X`7B X Arg args`5B2`5D; X Widget response; X X response = XtNameToWidget(w, "response"); X XtSetArg(args`5B0`5D, XtNstring, ""); X XtSetArg(args`5B1`5D, XtNwidth, 100); X XtSetValues(response, args, TWO); X`7D $ CALL UNPACK DIALOGS.C;1 236238783 $ create 'f' X/* X * Copyright 1989 Software Research Associates, Inc., Tokyo, Japan X * X * Permission to use, copy, modify, and distribute this software and its X * documentation for any purpose and without fee is hereby granted, provided X * that the above copyright notice appear in all copies and that both that X * copyright notice and this permission notice appear in supporting X * documentation, and that the name of Software Research Associates not be u Vsed X * in advertising or publicity pertaining to distribution of the software X * without specific, written prior permission. Software Research Associates X * makes no representations about the suitability of this software for any X * purpose. It is provided "as is" without express or implied warranty. X * X * SOFTWARE RESEARCH ASSOCIATES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS X * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS V, X * IN NO EVENT SHALL SOFTWARE RESEARCH ASSOCIATES BE LIABLE FOR ANY SPECIAL, X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FRO VM X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENC VE X * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * Author: Erik M. van der Poel X * Software Research Associates, Inc., Tokyo, Japan X * erik@sra.co.jp X */ X X#include X X#ifdef SEL_FILE_IGNORE_CASE X#include X#endif /* def SEL_FILE_IGNORE_CASE */ X X#include "SFinternal.h" X X#if defined(SVR4) `7C`7C defined(SYSV) `7C`7C defined(USG) X#include X#else /* defined(SVR4) `7C`7C defined(SYSV) `7C`7C defined(USG) */ X#include X#define dirent direct X#endif /* defined(SVR4) `7C`7C defined(SYSV) `7C`7C defined(USG) */ X X#include X X#if defined(SVR4) `7C`7C defined(SYSV) `7C`7C defined(USG) Xextern void qsort(); X#endif /* defined(SVR4) `7C`7C defined(SYSV) `7C`7C defined(USG) */ X X#ifdef SEL_FILE_IGNORE_CASE Xint XSFcompareEntries(p, q) X`09SFEntry`09*p; X`09SFEntry`09*q; X`7B X`09register char`09*r, *s; X`09register char`09c1, c2; X X`09r = p->real; X`09s = q->real; X X`09c1 = *r++; X`09if (islower(c1)) `7B X`09`09c1 = toupper(c1); X`09`7D X`09c2 = *s++; X`09if (islower(c2)) `7B X`09`09c2 = toupper(c2); X`09`7D X X`09while (c1 == c2) `7B X`09`09if (!c1) `7B X`09`09`09return strcmp(p->real, q->real); X`09`09`7D X`09`09c1 = *r++; X`09`09if (islower(c1)) `7B X`09`09`09c1 = toupper(c1); X`09`09`7D X`09`09c2 = *s++; X`09`09if (islower(c2)) `7B X`09`09`09c2 = toupper(c2); X`09`09`7D X`09`7D X X`09return c1 - c2; X`7D X#else /* def SEL_FILE_IGNORE_CASE */ Xint XSFcompareEntries(p, q) X`09SFEntry`09*p; X`09SFEntry`09*q; X`7B X`09return strcmp(p->real, q->real); X`7D X#endif /* def SEL_FILE_IGNORE_CASE */ X Xint XSFgetDir(dir) X`09SFDir`09*dir; X`7B X`09SFEntry`09`09*result = NULL; X`09int`09`09alloc = 0; X`09int`09`09i; X`09DIR`09`09*dirp; X`09struct dirent`09*dp; X`09char`09`09*str; X`09int`09`09len; X`09int`09`09maxChars; X`09struct stat`09statBuf; X X`09maxChars = strlen(dir->dir) - 1; X X`09dir->entries = NULL; X`09dir->nEntries = 0; X`09dir->nChars = 0; X X`09result = NULL; X`09i = 0; X X`09dirp = opendir("."); X`09if (!dirp) `7B X`09`09return 1; X`09`7D X X`09(void) stat(".", &statBuf); X`09dir->mtime = statBuf.st_mtime; X X`09(void) readdir(dirp);`09/* throw away "." */ X X#ifndef S_IFLNK X`09(void) readdir(dirp);`09/* throw away ".." */ X#endif /* ndef S_IFLNK */ X X`09while (dp = readdir(dirp)) `7B X`09`09if (i >= alloc) `7B X`09`09`09alloc = 2 * (alloc + 1); X`09`09`09result = (SFEntry *) XtRealloc((char *) result, X`09`09`09`09(unsigned) (alloc * sizeof(SFEntry))); X`09`09`7D X`09`09result`5Bi`5D.statDone = 0; X`09`09str = dp->d_name; X`09`09len = strlen(str); X`09`09result`5Bi`5D.real = XtMalloc((unsigned) (len + 2)); X`09`09(void) strcat(strcpy(result`5Bi`5D.real, str), " "); X`09`09if (len > maxChars) `7B X`09`09`09maxChars = len; X`09`09`7D X`09`09result`5Bi`5D.shown = result`5Bi`5D.real; X`09`09i++; X`09`7D X X#if defined(SVR4) `7C`7C defined(SYSV) `7C`7C defined(USG) X`09qsort((char *) result, (unsigned) i, sizeof(SFEntry), SFcompareEntries); X#else /* defined(SVR4) `7C`7C defined(SYSV) `7C`7C defined(USG) */ X`09qsort((char *) result, i, sizeof(SFEntry), SFcompareEntries); X#endif /* defined(SVR4) `7C`7C defined(SYSV) `7C`7C defined(USG) */ X X`09dir->entries = result; X`09dir->nEntries = i; X`09dir->nChars = maxChars + 1; X X`09closedir(dirp); X X`09return 0; X`7D $ CALL UNPACK DIR.C;1 1916621846 $ create 'f' X/* X * Copyright 1989 Software Research Associates, Inc., Tokyo, Japan X * X * Permission to use, copy, modify, and distribute this software and its X * documentation for any purpose and without fee is hereby granted, provided X * that the above copyright notice appear in all copies and that both that X * copyright notice and this permission notice appear in supporting X * documentation, and that the name of Software Research Associates not be u Vsed X * in advertising or publicity pertaining to distribution of the software X * without specific, written prior permission. Software Research Associates X * makes no representations about the suitability of this software for any X * purpose. It is provided "as is" without express or implied warranty. X * X * SOFTWARE RESEARCH ASSOCIATES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS X * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS V, X * IN NO EVENT SHALL SOFTWARE RESEARCH ASSOCIATES BE LIABLE FOR ANY SPECIAL, X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FRO VM X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENC VE X * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR X * PERFORMANCE OF THIS SOFTWARE. X * X * Author: Erik M. van der Poel X * Software Research Associates, Inc., Tokyo, Japan X * erik@sra.co.jp X */ X X#include X#include "SFinternal.h" X#include "xstat.h" X#include X#include X X#define SF_DEFAULT_FONT "9x15" X X#define ABS(x) (((x) < 0) ? (-(x)) : (x)) X Xtypedef struct `7B X`09char *fontname; X`7D TextData, *textPtr; X Xint SFcharWidth, SFcharAscent, SFcharHeight; X Xint SFcurrentInvert`5B3`5D = `7B -1, -1, -1 `7D; X Xstatic GC SFlineGC, SFscrollGC, SFinvertGC, SFtextGC; X Xstatic XtResource textResources`5B`5D = `7B X`09`7BXtNfont, XtCFont, XtRString, sizeof (char *), X`09`09XtOffset(textPtr, fontname), XtRString, SF_DEFAULT_FONT`7D, X`7D; X Xstatic XFontStruct *SFfont; X Xstatic int SFcurrentListY; X Xstatic XtIntervalId SFscrollTimerId; X XSFinitFont() X`7B X`09TextData`09*data; X X`09data = XtNew(TextData); X X`09XtGetApplicationResources(selFileForm, (XtPointer) data, textResources, X`09`09XtNumber(textResources), (Arg *) NULL, 0); X X`09SFfont = XLoadQueryFont(SFdisplay, data->fontname); X`09if (!SFfont) `7B X`09`09SFfont = XLoadQueryFont(SFdisplay, SF_DEFAULT_FONT); X`09`09if (!SFfont) `7B X`09`09`09char`09sbuf`5B256`5D; X X`09`09`09(void) sprintf(sbuf, "XsraSelFile: can't get font %s", X`09`09`09`09SF_DEFAULT_FONT); X X`09`09`09XtAppError(SFapp, sbuf); X`09`09`7D X`09`7D X X`09SFcharWidth = (SFfont->max_bounds.width + SFfont->min_bounds.width) / 2; X`09SFcharAscent = SFfont->max_bounds.ascent; X`09SFcharHeight = SFcharAscent + SFfont->max_bounds.descent; X`7D X XSFcreateGC() X`7B X`09XGCValues`09gcValues; X`09XRectangle`09rectangles`5B1`5D; X X`09gcValues.foreground = SFfore; X X`09SFlineGC = XtGetGC( X`09`09selFileLists`5B0`5D, X`09`09(XtGCMask) X`09`09`09GCForeground`09`09`7C X`09`09`090, X`09`09&gcValues X`09); X X`09SFscrollGC = XtGetGC( X`09`09selFileLists`5B0`5D, X`09`09(XtGCMask) X`09`09`090, X`09`09&gcValues X`09); X X`09gcValues.function = GXinvert; X`09gcValues.plane_mask = (SFfore `5E SFback); X X`09SFinvertGC = XtGetGC( X`09`09selFileLists`5B0`5D, X`09`09(XtGCMask) X`09`09`09GCFunction`09`09`7C X`09`09`09GCPlaneMask`09`09`7C X`09`09`090, X`09`09&gcValues X`09); X X`09gcValues.foreground = SFfore; X`09gcValues.background = SFback; X`09gcValues.font = SFfont->fid; X X`09SFtextGC = XCreateGC( X`09`09SFdisplay, X`09`09XtWindow(selFileLists`5B0`5D), X`09`09(unsigned long) X`09`09`09GCForeground`09`09`7C X`09`09`09GCBackground`09`09`7C X`09`09`09GCFont`09`09`09`7C X`09`09`090, X`09`09&gcValues X`09); X X`09rectangles`5B0`5D.x = SFlineToTextH + SFbesideText; X`09rectangles`5B0`5D.y = 0; X`09rectangles`5B0`5D.width = SFcharsPerEntry * SFcharWidth; X`09rectangles`5B0`5D.height = SFupperY + 1; X X`09XSetClipRectangles( X`09`09SFdisplay, X`09`09SFtextGC, X`09`090, X`09`090, X`09`09rectangles, X`09`091, X`09`09Unsorted X`09); X`7D X XSFclearList(n, doScroll) X`09int`09n; X`09int`09doScroll; X`7B X`09SFDir`09*dir; X X`09SFcurrentInvert`5Bn`5D = -1; X X`09XClearWindow(SFdisplay, XtWindow(selFileLists`5Bn`5D)); X X`09XDrawSegments(SFdisplay, XtWindow(selFileLists`5Bn`5D), SFlineGC, SFsegs, X`09`092); X X`09if (doScroll) `7B X`09`09dir = &(SFdirs`5BSFdirPtr + n`5D); X X`09`09if ((SFdirPtr + n < SFdirEnd) && dir->nEntries && dir->nChars) `7B X`09`09`09XawScrollbarSetThumb( X`09`09`09`09selFileVScrolls`5Bn`5D, X`09`09`09`09(float) (((double) dir->vOrigin) / X`09`09`09`09`09dir->nEntries), X`09`09`09`09(float) (((double) ((dir->nEntries < SFlistSize) X`09`09`09`09`09? dir->nEntries : SFlistSize)) / X`09`09`09`09`09dir->nEntries) X`09`09`09); X X`09`09`09XawScrollbarSetThumb( X`09`09`09`09selFileHScrolls`5Bn`5D, X`09`09`09`09(float) (((double) dir->hOrigin) / dir->nChars), X`09`09`09`09(float) (((double) ((dir->nChars < X`09`09`09`09`09SFcharsPerEntry) ? dir->nChars : X`09`09`09`09`09SFcharsPerEntry)) / dir->nChars) X`09`09`09); X`09`09`7D else `7B X`09`09`09XawScrollbarSetThumb(selFileVScrolls`5Bn`5D, (float) 0.0, X`09`09`09`09(float) 1.0); X`09`09`09XawScrollbarSetThumb(selFileHScrolls`5Bn`5D, (float) 0.0, X`09`09`09`09(float) 1.0); X`09`09`7D X`09`7D X`7D X Xstatic XSFdeleteEntry(dir, entry) X`09SFDir`09*dir; X`09SFEntry`09*entry; X`7B X`09register SFEntry`09*e; X`09register SFEntry`09*end; X`09int`09`09`09n; X`09int`09`09`09idx; X X`09idx = entry - dir->entries; X X`09if (idx < dir->beginSelection) `7B X`09`09dir->beginSelection--; X`09`7D X`09if (idx <= dir->endSelection) `7B X`09`09dir->endSelection--; X`09`7D X`09if (dir->beginSelection > dir->endSelection) `7B X`09`09dir->beginSelection = dir->endSelection = -1; X`09`7D X X`09if (idx < dir->vOrigin) `7B X`09`09dir->vOrigin--; X`09`7D X X`09XtFree(entry->real); X X`09end = &(dir->entries`5Bdir->nEntries - 1`5D); X X`09for (e = entry; e < end; e++) `7B X`09`09*e = *(e + 1); X`09`7D X X`09if (!(--dir->nEntries)) `7B X`09`09return; X`09`7D X X`09n = dir - &(SFdirs`5BSFdirPtr`5D); X`09if ((n < 0) `7C`7C (n > 2)) `7B X`09`09return; X`09`7D X X`09XawScrollbarSetThumb( X`09`09selFileVScrolls`5Bn`5D, X`09`09(float) (((double) dir->vOrigin) / dir->nEntries), X`09`09(float) (((double) ((dir->nEntries < SFlistSize) ? X`09`09`09dir->nEntries : SFlistSize)) / dir->nEntries) X`09); X`7D X Xstatic XSFwriteStatChar(name, last, statBuf) X`09char`09`09*name; X`09int`09`09last; X`09struct stat`09*statBuf; X`7B X`09name`5Blast`5D = SFstatChar(statBuf); X`7D X Xstatic int XSFstatAndCheck(dir, entry) X`09SFDir`09*dir; X`09SFEntry`09*entry; X`7B X`09struct stat`09statBuf; X`09char`09`09save; X`09int`09`09last; X X`09/* X`09 * must be restored before returning X`09 */ X`09save = *(dir->path); X`09*(dir->path) = 0; X X`09if (!SFchdir(SFcurrentPath)) `7B X`09`09last = strlen(entry->real) - 1; X`09`09entry->real`5Blast`5D = 0; X`09`09entry->statDone = 1; X`09`09if ( X`09`09`09(!stat(entry->real, &statBuf)) X X#ifdef S_IFLNK X X`09`09 `7C`7C (!lstat(entry->real, &statBuf)) X X#endif /* ndef S_IFLNK */ X X`09`09) `7B X`09`09`09if (SFfunc) `7B X`09`09`09`09char *shown; X X`09`09`09`09shown = NULL; X`09`09`09`09if (SFfunc(entry->real, &shown, &statBuf)) `7B X`09`09`09`09`09if (shown) `7B X`09`09`09`09`09`09int len; X X`09`09`09`09`09`09len = strlen(shown); X`09`09`09`09`09`09entry->shown = XtMalloc( X`09`09`09`09`09`09`09(unsigned) (len + 2) X`09`09`09`09`09`09); X`09`09`09`09`09`09(void) strcpy(entry->shown, X`09`09`09`09`09`09`09shown); X`09`09`09`09`09`09SFwriteStatChar( X`09`09`09`09`09`09`09entry->shown, X`09`09`09`09`09`09`09len, X`09`09`09`09`09`09`09&statBuf X`09`09`09`09`09`09); X`09`09`09`09`09`09entry->shown`5Blen + 1`5D = 0; X`09`09`09`09`09`7D X`09`09`09`09`7D else `7B X`09`09`09`09`09SFdeleteEntry(dir, entry); X X`09`09`09`09`09*(dir->path) = save; X`09`09`09`09`09return 1; X`09`09`09`09`7D X`09`09`09`7D X`09`09`09SFwriteStatChar(entry->real, last, &statBuf); X`09`09`7D else `7B X`09`09`09entry->real`5Blast`5D = ' '; X`09`09`7D X`09`7D X X`09*(dir->path) = save; X`09return 0; X`7D X Xstatic XSFdrawStrings(w, dir, from, to) X`09register Window`09w; X`09register SFDir`09*dir; X`09register int`09from; X`09register int`09to; X`7B X`09register int`09`09i; X`09register SFEntry`09*entry; X`09int`09`09`09x; X X`09x = SFtextX - dir->hOrigin * SFcharWidth; X X`09if (dir->vOrigin + to >= dir->nEntries) `7B X`09`09to = dir->nEntries - dir->vOrigin - 1; X`09`7D X`09for (i = from; i <= to; i++) `7B X`09`09entry = &(dir->entries`5Bdir->vOrigin + i`5D); X`09`09if (!(entry->statDone)) `7B X`09`09`09if (SFstatAndCheck(dir, entry)) `7B X`09`09`09`09if (dir->vOrigin + to >= dir->nEntries) `7B X`09`09`09`09`09to = dir->nEntries - dir->vOrigin - 1; X`09`09`09`09`7D X`09`09`09`09i--; X`09`09`09`09continue; X`09`09`09`7D X`09`09`7D X`09`09XDrawImageString( X`09`09`09SFdisplay, X`09`09`09w, X`09`09`09SFtextGC, X`09`09`09x, X`09`09`09SFtextYoffset + i * SFentryHeight, X`09`09`09entry->shown, X`09`09`09strlen(entry->shown) X`09`09); X`09`09if (dir->vOrigin + i == dir->beginSelection) `7B X`09`09`09XDrawLine( X`09`09`09`09SFdisplay, X`09`09`09`09w, X`09`09`09`09SFlineGC, X`09`09`09`09SFlineToTextH + 1, X`09`09`09`09SFlowerY + i * SFentryHeight, X`09`09`09`09SFlineToTextH + SFentryWidth - 2, X`09`09`09`09SFlowerY + i * SFentryHeight X`09`09`09); X`09`09`7D X`09`09if ( X`09`09`09(dir->vOrigin + i >= dir->beginSelection) && X`09`09`09(dir->vOrigin + i <= dir->endSelection) X`09`09) `7B X`09`09`09SFcompletionSegs`5B0`5D.y1 = SFcompletionSegs`5B1`5D.y1 = X`09`09`09`09SFlowerY + i * SFentryHeight; X`09`09`09SFcompletionSegs`5B0`5D.y2 = SFcompletionSegs`5B1`5D.y2 = X`09`09`09`09SFlowerY + (i + 1) * SFentryHeight - 1; X`09`09`09XDrawSegments( X`09`09`09`09SFdisplay, X`09`09`09`09w, X`09`09`09`09SFlineGC, X`09`09`09`09SFcompletionSegs, X`09`09`09`092 X`09`09`09); X`09`09`7D X`09`09if (dir->vOrigin + i == dir->endSelection) `7B X`09`09`09XDrawLine( X`09`09`09`09SFdisplay, X`09`09`09`09w, X`09`09`09`09SFlineGC, X`09`09`09`09SFlineToTextH + 1, X`09`09`09`09SFlowerY + (i + 1) * SFentryHeight - 1, X`09`09`09`09SFlineToTextH + SFentryWidth - 2, X`09`09`09`09SFlowerY + (i + 1) * SFentryHeight - 1 X`09`09`09); X`09`09`7D X`09`7D X`7D X XSFdrawList(n, doScroll) X`09int`09n; X`09int`09doScroll; X`7B X`09SFDir`09*dir; X`09Window`09w; X X`09SFclearList(n, doScroll); X X`09if (SFdirPtr + n < SFdirEnd) `7B X`09`09dir = &(SFdirs`5BSFdirPtr + n`5D); X`09`09w = XtWindow(selFileLists`5Bn`5D); X`09`09XDrawImageString( X`09`09`09SFdisplay, X`09`09`09w, X`09`09`09SFtextGC, X`09`09`09SFtextX - dir->hOrigin * SFcharWidth, X`09`09`09SFlineToTextV + SFaboveAndBelowText + SFcharAscent, X`09`09`09dir->dir, X`09`09`09strlen(dir->dir) X`09`09); X`09`09SFdrawStrings(w, dir, 0, SFlistSize - 1); X`09`7D X`7D X XSFdrawLists(doScroll) X`09int`09doScroll; X`7B X`09int`09i; X X`09for (i = 0; i < 3; i++) `7B X`09`09SFdrawList(i, doScroll); X`09`7D X`7D X Xstatic XSFinvertEntry(n) X`09register int`09n; X`7B X`09XFillRectangle( X`09`09SFdisplay, X`09`09XtWindow(selFileLists`5Bn`5D), X`09`09SFinvertGC, X`09`09SFlineToTextH, X`09`09SFcurrentInvert`5Bn`5D * SFentryHeight + SFlowerY, X`09`09SFentryWidth, X`09`09SFentryHeight X`09); X`7D X Xstatic unsigned long XSFscrollTimerInterval() X`7B X`09static int`09maxVal = 200; X`09static int`09varyDist = 50; X`09static int`09minDist = 50; X`09int`09`09t; X`09int`09`09dist; X X`09if (SFcurrentListY < SFlowerY) `7B X`09`09dist = SFlowerY - SFcurrentListY; X`09`7D else if (SFcurrentListY > SFupperY) `7B X`09`09dist = SFcurrentListY - SFupperY; X`09`7D else `7B X`09`09return (unsigned long) 1; X`09`7D X X`09t = maxVal - ((maxVal / varyDist) * (dist - minDist)); X X`09if (t < 1) `7B X`09`09t = 1; X`09`7D X X`09if (t > maxVal) `7B X`09`09t = maxVal; X`09`7D X X`09return (unsigned long) t; X`7D X Xstatic void XSFscrollTimer(n) X`09int`09n; X`7B X`09SFDir`09*dir; X`09int`09save; X X`09dir = &(SFdirs`5BSFdirPtr + n`5D); X`09save = dir->vOrigin; X X`09if (SFcurrentListY < SFlowerY) `7B X`09`09if (dir->vOrigin > 0) `7B X`09`09`09SFvSliderMovedCallback(selFileVScrolls`5Bn`5D, n, X`09`09`09`09dir->vOrigin - 1); X`09`09`7D X`09`7D else if (SFcurrentListY > SFupperY) `7B X`09`09if (dir->vOrigin < dir->nEntries - SFlistSize) `7B X`09`09`09SFvSliderMovedCallback(selFileVScrolls`5Bn`5D, n, X`09`09`09`09dir->vOrigin + 1); X`09`09`7D X`09`7D X X`09if (dir->vOrigin != save) `7B X`09`09if (dir->nEntries) `7B X`09`09 XawScrollbarSetThumb( X`09`09`09selFileVScrolls`5Bn`5D, X`09`09`09(float) (((double) dir->vOrigin) / dir->nEntries), X`09`09`09(float) (((double) ((dir->nEntries < SFlistSize) ? X`09`09`09`09dir->nEntries : SFlistSize)) / dir->nEntries) X`09`09 ); X`09`09`7D X`09`7D X X`09if (SFbuttonPressed) `7B X`09`09SFscrollTimerId = XtAppAddTimeOut(SFapp, X`09`09`09SFscrollTimerInterval(), SFscrollTimer, (XtPointer) n); X`09`7D X`7D X Xstatic int XSFnewInvertEntry(n, event) X`09register int`09`09n; X`09register XMotionEvent`09*event; X`7B X`09register int`09x, y; X`09register int`09new; X`09static int`09SFscrollTimerAdded = 0; X X`09x = event->x; X`09y = event->y; X X`09if (SFdirPtr + n >= SFdirEnd) `7B X`09`09return -1; X`09`7D else if ( X`09`09(x >= 0)`09&& (x <= SFupperX) && X`09`09(y >= SFlowerY)`09&& (y <= SFupperY) X`09) `7B X`09`09register SFDir *dir = &(SFdirs`5BSFdirPtr + n`5D); X X`09`09if (SFscrollTimerAdded) `7B X`09`09`09SFscrollTimerAdded = 0; X`09`09`09XtRemoveTimeOut(SFscrollTimerId); X`09`09`7D X X`09`09new = (y - SFlowerY) / SFentryHeight; X`09`09if (dir->vOrigin + new >= dir->nEntries) `7B X`09`09`09return -1; X`09`09`7D X`09`09return new; X`09`7D else `7B X`09`09if (SFbuttonPressed) `7B X`09`09`09SFcurrentListY = y; X`09`09`09if (!SFscrollTimerAdded) `7B X`09`09`09`09SFscrollTimerAdded = 1; X`09`09`09`09SFscrollTimerId = XtAppAddTimeOut(SFapp, X`09`09`09`09`09SFscrollTimerInterval(), SFscrollTimer, X`09`09`09`09`09(XtPointer) n); X`09`09`09`7D X`09`09`7D X X`09`09return -1; X`09`7D X`7D X X/* ARGSUSED */ Xvoid XSFenterList(w, n, event) X`09Widget`09`09`09`09w; X`09register int`09`09`09n; X`09register XEnterWindowEvent`09*event; X`7B X`09register int`09new; X X`09/* sanity */ X`09if (SFcurrentInvert`5Bn`5D != -1) `7B X`09`09SFinvertEntry(n); X`09`09SFcurrentInvert`5Bn`5D = -1; X`09`7D X X`09new = SFnewInvertEntry(n, (XMotionEvent *) event); X`09if (new != -1) `7B X`09`09SFcurrentInvert`5Bn`5D = new; X`09`09SFinvertEntry(n); X`09`7D X`7D X X/* ARGSUSED */ Xvoid XSFleaveList(w, n, event) X`09Widget`09`09w; X`09register int`09n; X`09XEvent`09`09*event; X`7B X`09if (SFcurrentInvert`5Bn`5D != -1) `7B X`09`09SFinvertEntry(n); X`09`09SFcurrentInvert`5Bn`5D = -1; X`09`7D X`7D X X/* ARGSUSED */ Xvoid XSFmotionList(w, n, event) X`09Widget`09`09`09w; X`09register int`09`09n; X`09register XMotionEvent`09*event; X`7B X`09register int`09new; X X`09new = SFnewInvertEntry(n, event); X X`09if (new != SFcurrentInvert`5Bn`5D) `7B X`09`09if (SFcurrentInvert`5Bn`5D != -1) `7B X`09`09`09SFinvertEntry(n); X`09`09`7D X`09`09SFcurrentInvert`5Bn`5D = new; X`09`09if (new != -1) `7B X`09`09`09SFinvertEntry(n); X`09`09`7D X`09`7D X`7D X X/* ARGSUSED */ Xvoid XSFvFloatSliderMovedCallback(w, n, fnew) X`09Widget`09w; X`09int`09n; X`09float`09*fnew; X`7B X`09int`09new; X X`09new = (*fnew) * SFdirs`5BSFdirPtr + n`5D.nEntries; X X`09SFvSliderMovedCallback(w, n, new); X`7D X X/* ARGSUSED */ Xvoid XSFvSliderMovedCallback(w, n, new) X`09Widget`09w; X`09int`09n; X`09int`09new; X`7B X`09int`09`09old; X`09register Window`09win; X`09SFDir`09`09*dir; X X`09dir = &(SFdirs`5BSFdirPtr + n`5D); X X`09old = dir->vOrigin; X`09dir->vOrigin = new; X X`09if (old == new) `7B X`09`09return; X`09`7D X X`09win = XtWindow(selFileLists`5Bn`5D); X X`09if (ABS(new - old) < SFlistSize) `7B X`09`09if (new > old) `7B X`09`09`09XCopyArea( X`09`09`09`09SFdisplay, X`09`09`09`09win, X`09`09`09`09win, X`09`09`09`09SFscrollGC, X`09`09`09`09SFlineToTextH, X`09`09`09`09SFlowerY + (new - old) * SFentryHeight, X`09`09`09`09SFentryWidth + SFlineToTextH, X`09`09`09`09(SFlistSize - (new - old)) * SFentryHeight, X`09`09`09`09SFlineToTextH, X`09`09`09`09SFlowerY X`09`09`09); X`09`09`09XClearArea( X`09`09`09`09SFdisplay, X`09`09`09`09win, X`09`09`09`09SFlineToTextH, X`09`09`09`09SFlowerY + (SFlistSize - (new - old)) * X`09`09`09`09`09SFentryHeight, X`09`09`09`09SFentryWidth + SFlineToTextH, X`09`09`09`09(new - old) * SFentryHeight, X`09`09`09`09False X`09`09`09); X`09`09`09SFdrawStrings(win, dir, SFlistSize - (new - old), X`09`09`09`09SFlistSize - 1); X`09`09`7D else `7B X`09`09`09XCopyArea( X`09`09`09`09SFdisplay, X`09`09`09`09win, X`09`09`09`09win, X`09`09`09`09SFscrollGC, X`09`09`09`09SFlineToTextH, X`09`09`09`09SFlowerY, X`09`09`09`09SFentryWidth + SFlineToTextH, X`09`09`09`09(SFlistSize - (old - new)) * SFentryHeight, X`09`09`09`09SFlineToTextH, X`09`09`09`09SFlowerY + (old - new) * SFentryHeight X`09`09`09); X`09`09`09XClearArea( X`09`09`09`09SFdisplay, X`09`09`09`09win, X`09`09`09`09SFlineToTextH, X`09`09`09`09SFlowerY, X`09`09`09`09SFentryWidth + SFlineToTextH, X`09`09`09`09(old - new) * SFentryHeight, X`09`09`09`09False X`09`09`09); X`09`09`09SFdrawStrings(win, dir, 0, old - new); X`09`09`7D X`09`7D else `7B X`09`09XClearArea( X`09`09`09SFdisplay, X`09`09`09win, X`09`09`09SFlineToTextH, X`09`09`09SFlowerY, X`09`09`09SFentryWidth + SFlineToTextH, X`09`09`09SFlistSize * SFentryHeight, X`09`09`09False X`09`09); X`09`09SFdrawStrings(win, dir, 0, SFlistSize - 1); X`09`7D X`7D X X/* ARGSUSED */ Xvoid XSFvAreaSelectedCallback(w, n, pnew) X`09Widget`09w; X`09int`09n; X`09int`09pnew; X`7B X`09SFDir`09*dir; X`09int`09new; X X`09dir = &(SFdirs`5BSFdirPtr + n`5D); X X`09new = dir->vOrigin + X`09`09(((double) pnew) / SFvScrollHeight) * dir->nEntries; X X`09if (new > dir->nEntries - SFlistSize) `7B X`09`09new = dir->nEntries - SFlistSize; X`09`7D X X`09if (new < 0) `7B X`09`09new = 0; X`09`7D X X`09if (dir->nEntries) `7B X`09`09float`09f; X X`09`09f = ((double) new) / dir->nEntries; X X`09`09XawScrollbarSetThumb( X`09`09`09w, X`09`09`09f, X`09`09`09(float) (((double) ((dir->nEntries < SFlistSize) ? X`09`09`09`09dir->nEntries : SFlistSize)) / dir->nEntries) X`09`09); X`09`7D X X`09SFvSliderMovedCallback(w, n, new); X`7D X X/* ARGSUSED */ Xvoid XSFhSliderMovedCallback(w, n, new) X`09Widget`09w; X`09int`09n; X`09float`09*new; X`7B X`09SFDir`09*dir; X`09int`09save; X X`09dir = &(SFdirs`5BSFdirPtr + n`5D); X`09save = dir->hOrigin; X`09dir->hOrigin = (*new) * dir->nChars; X`09if (dir->hOrigin == save) `7B X`09`09return; X`09`7D X X`09SFdrawList(n, SF_DO_NOT_SCROLL); X`7D X X/* ARGSUSED */ Xvoid XSFhAreaSelectedCallback(w, n, pnew) X`09Widget`09w; X`09int`09n; X`09int`09pnew; X`7B X`09SFDir`09*dir; X`09int`09new; X X`09dir = &(SFdirs`5BSFdirPtr + n`5D); X X`09new = dir->hOrigin + X`09`09(((double) pnew) / SFhScrollWidth) * dir->nChars; X X`09if (new > dir->nChars - SFcharsPerEntry) `7B X`09`09new = dir->nChars - SFcharsPerEntry; X`09`7D X X`09if (new < 0) `7B X`09`09new = 0; X`09`7D X X`09if (dir->nChars) `7B X`09`09float`09f; X X`09`09f = ((double) new) / dir->nChars; X X`09`09XawScrollbarSetThumb( X`09`09`09w, X`09`09`09f, X`09`09`09(float) (((double) ((dir->nChars < SFcharsPerEntry) ? X`09`09`09`09dir->nChars : SFcharsPerEntry)) / dir->nChars) X`09`09); X X`09`09SFhSliderMovedCallback(w, n, &f); X`09`7D X`7D X X/* ARGSUSED */ Xvoid XSFpathSliderMovedCallback(w, client_data, new) X`09Widget`09`09w; X`09XtPointer`09client_data; X`09float`09*new; X`7B +-+-+-+-+-+-+-+- END OF PART 2 +-+-+-+-+-+-+-+- Return-Path: mccall!tp@!mccall.com Delivery-Date: Tue, 27 Oct 92 18:54:10 -0600 Return-Path: mccall!tp@!mccall.com Received: from cs.wisc.edu by appenzell.cs.wisc.edu; Tue, 27 Oct 92 18:53:54 -0600 Received: from depot.cis.ksu.edu by cs.wisc.edu; Tue, 27 Oct 92 18:53:39 -0600 Return-Path: Received: from mccall.UUCP by depot.cis.ksu.edu UUCP (5.65a) id AA17001; Tue, 27 Oct 92 18:52:42 -0600 Received: by mccall.com (DECUS UUCP /1.3-1/2.5/); Tue, 27 Oct 92 18:45:34 CST Received: by mccall.com (MX V3.1C) id 12837; Tue, 27 Oct 1992 18:45:28 CST Date: Tue, 27 Oct 1992 18:45:30 CST From: Terry Poot To: tim Message-Id: <00962BB0.702E0120.12837@mccall.com> Subject: Ghostview for VMS 03/14 -+-+-+-+-+-+-+-+ START OF PART 3 -+-+-+-+-+-+-+-+ X`09SFDir`09`09*dir; X`09int`09`09n; X`09XawTextPosition`09pos; X`09int`09SFdirPtrSave; X X`09SFdirPtrSave = SFdirPtr; X`09SFdirPtr = (*new) * SFdirEnd; X`09if (SFdirPtr == SFdirPtrSave) `7B X`09`09return; X`09`7D X X`09SFdrawLists(SF_DO_SCROLL); X X`09n = 2; X`09while (SFdirPtr + n >= SFdirEnd) `7B X`09`09n--; X`09`7D X X`09dir = &(SFdirs`5BSFdirPtr + n`5D); X X`09pos = dir->path - SFcurrentPath; X X`09if (!strncmp(SFcurrentPath, SFstartDir, strlen(SFstartDir))) `7B X`09`09pos -= strlen(SFstartDir); X`09`09if (pos < 0) `7B X`09`09`09pos = 0; X`09`09`7D X`09`7D X X`09XawTextSetInsertionPoint(selFileField, pos); X`7D X X/* ARGSUSED */ X Xvoid XSFpathAreaSelectedCallback(w, client_data, pnew) X`09Widget`09`09w; X`09XtPointer`09client_data; X`09int`09`09pnew; X`7B X`09int`09new; X`09float`09f; X X`09new = SFdirPtr + (((double) pnew) / SFpathScrollWidth) * SFdirEnd; X X`09if (new > SFdirEnd - 3) `7B X`09`09new = SFdirEnd - 3; X`09`7D X X`09if (new < 0) `7B X`09`09new = 0; X`09`7D X X`09f = ((double) new) / SFdirEnd; X X`09XawScrollbarSetThumb( X`09`09w, X`09`09f, X`09`09(float) (((double) ((SFdirEnd < 3) ? SFdirEnd : 3)) / X`09`09`09SFdirEnd) X`09); X X`09SFpathSliderMovedCallback(w, (XtPointer) NULL, &f); X`7D X XBoolean XSFworkProc() X`7B X`09register SFDir`09`09*dir; X`09register SFEntry`09*entry; X X`09for (dir = &(SFdirs`5BSFdirEnd - 1`5D); dir >= SFdirs; dir--) `7B X`09`09if (!(dir->nEntries)) `7B X`09`09`09continue; X`09`09`7D X`09`09for ( X`09`09`09entry = &(dir->entries`5Bdir->nEntries - 1`5D); X`09`09`09entry >= dir->entries; X`09`09`09entry-- X`09`09) `7B X`09`09`09if (!(entry->statDone)) `7B X`09`09`09`09(void) SFstatAndCheck(dir, entry); X`09`09`09`09return False; X`09`09`09`7D X`09`09`7D X`09`7D X X`09SFworkProcAdded = 0; X X`09return True; X`7D $ CALL UNPACK DRAW.C;1 1853666754 $ create 'f' X/* X * Copyright (c) 1987 Regents of the University of California. X * All rights reserved. X * X * Redistribution and use in source and binary forms are permitted X * provided that: (1) source distributions retain this entire copyright X * notice and comment, and (2) distributions including binaries display X * the following acknowledgement: `60`60This product includes software X * developed by the University of California, Berkeley and its contributors' V' X * in the documentation or other materials provided with the distribution X * and in all advertising materials mentioning features or use of this X * software. Neither the name of the University nor the names of its X * contributors may be used to endorse or promote products derived X * from this software without specific prior written permission. X * THIS SOFTWARE IS PROVIDED `60`60AS IS'' AND WITHOUT ANY EXPRESS OR X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X */ X X#if defined(LIBC_SCCS) && !defined(lint) Xstatic char sccsid`5B`5D = "@(#)getenv.c`095.7 (Berkeley) 6/1/90"; X#endif /* LIBC_SCCS and not lint */ X X#include X X/* X * getenv -- X *`09Returns ptr to value associated with name, if any, else NULL. X */ Xchar * Xgetenv(name) X`09char *name; X`7B X`09int offset; X`09char *_findenv(); X X`09return(_findenv(name, &offset)); X`7D X X/* X * _findenv -- X *`09Returns pointer to value associated with name, if any, else NULL. X *`09Sets offset to be the offset of the name/value combination in the X *`09environmental array, for use by setenv(3) and unsetenv(3). X *`09Explicitly removes '=' in argument name. X * X *`09This routine *should* be a static; don't use it. X */ Xchar * X_findenv(name, offset) X`09register char *name; X`09int *offset; X`7B X`09extern char **environ; X`09register int len; X`09register char **P, *C; X X`09for (C = name, len = 0; *C && *C != '='; ++C, ++len); X`09for (P = environ; *P; ++P) X`09`09if (!strncmp(*P, name, len)) X`09`09`09if (*(C = *P + len) == '=') `7B X`09`09`09`09*offset = P - environ; X`09`09`09`09return(++C); X`09`09`09`7D X`09return(NULL); X`7D $ CALL UNPACK GETENV.C;1 170920290 $ create 'f' X! Ghostview.ad -- Application defaults file for ghostview. X! Copyright (C) 1992 Timothy O. Theisen X!`20 X! This program is free software; you can redistribute it and/or modify X! it under the terms of the GNU General Public License as published by X! the Free Software Foundation; either version 2 of the License, or X! (at your option) any later version. X!`20 X! This program is distributed in the hope that it will be useful, X! but WITHOUT ANY WARRANTY; without even the implied warranty of X! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X! GNU General Public License for more details. X!`20 X! You should have received a copy of the GNU General Public License X! along with this program; if not, write to the Free Software X! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X!`20 X! Author: Tim Theisen Systems Programmer X! Internet: tim@cs.wisc.edu Department of Computer Sciences X! UUCP: uwvax!tim University of Wisconsin-Madison X! Phone: (608)262-0438 1210 West Dayton Street X! FAX: (608)262-9777 Madison, WI 53706 X X! All of the button labels and actions are determined in this file. X! It should be easy to adapt to any language. X! To use a different version of ghostscript, you can add the resource X! *Ghostview.interpreter: /my/very/own/gs X X*input:`09True X*allowShellResize:`09True X*ShapeStyle:`09Oval X*Font:`09-adobe-new century schoolbook-medium-r-normal--*-140-*-*-p-*-iso885 V9-1 X*Text*Font:`09-adobe-courier-medium-r-normal--*-140-*-*-m-*-iso8859-1 X*ghostviewButton.Label:`09Ghostview X*copyright.Label:`09Copyright... X*quit.Label:`09Quit X*fileButton.Label:`09File X*open.Label:`09Open... X*reopen.Label:`09Reopen X*printwhole.Label:`09Print... X*printmarked.Label:`09Print marked pages... X*save.Label:`09Save marked pages... X*pageButton.Label:`09Page X*next.Label:`09Next X*show.Label:`09Redisplay X*prev.Label:`09Previous X*center.Label:`09Center X*mark.Label:`09Mark X*unmark.Label:`09Unmark X*magstepButton.Label:`09Magstep X*orientationButton.Label:`09Orientation X*portrait.Label:`09Portrait X*landscape.Label:`09Landscape X*upsidedown.Label:`09Upside-down X*seascape.Label:`09Seascape X*swap.Label:`09Swap Landscape X*pagemediaButton.Label:`09Media X*pageview.useBottom:`09True X*pageview.useRight:`09True X*SimpleMenu.baseTranslations:`09#replace \n\ X :`09highlight() \n\ X :`09unhighlight() \n\ X :`09highlight() \n\ X :`09MenuPopdown() GhostviewForce() notify() unhighlight() \n\ X :`09MenuPopdown() GhostviewDefault() notify() unhighlight() X*SimpleMenu.Translations:`09#replace \n\ X :`09highlight() \n\ X :`09unhighlight() \n\ X :`09highlight() \n\ X :`09MenuPopdown() GhostviewForce() notify() unhighlight() \n\ X :`09MenuPopdown() GhostviewDefault() notify() unhighlight() X*okay.Label:`09Okay X*cancel.Label:`09Cancel X*dismiss.Label:`09Dismiss X*Ghostview.busyCursor:`09target XGhostview.baseTranslations:`09#replace \n\ X :`09`09GhostviewCheckFile() \n\ X WM_PROTOCOLS:`09GhostviewDeleteWindow() XGhostview.Translations:`09`09#replace \n\ X :`09`09GhostviewCheckFile() \n\ X WM_PROTOCOLS:`09GhostviewDeleteWindow() X*TopLevelShell.baseTranslations:`09#replace \n\ X WM_PROTOCOLS:`09GhostviewDismiss() X*TopLevelShell.Translations:`09#replace \n\ X WM_PROTOCOLS:`09GhostviewDismiss() X*TransientShell.baseTranslations:`09#replace \n\ X WM_PROTOCOLS:`09GhostviewDismiss() X*TransientShell.Translations:`09#replace \n\ X WM_PROTOCOLS:`09GhostviewDismiss() X*zoom.form.baseTranslations:`09#replace \n\ X Q:`09`09`09GhostviewDeleteZoom() X*zoom.form.Translations:`09#replace \n\ X Q:`09`09`09GhostviewDeleteZoom() X*zoom.baseTranslations:`09`09#replace \n\ X WM_PROTOCOLS:`09GhostviewDeleteWindow() X*zoom.Translations:`09`09#replace \n\ X WM_PROTOCOLS:`09GhostviewDeleteWindow() X*Ghostview.baseTranslations:`09#replace \n\ X :`09message() \n\ X :`09notify(0) \n\ X :`09GhostviewEraseLocator() \n\ X :`09notify(0) \n\ X :`09notify(180 180 200 200) \n\ X :`09notify(120 120 300 300) \n\ X :`09notify(90 90 400 400) X*Ghostview.Translations:`09#replace \n\ X :`09message() \n\ X :`09notify(0) \n\ X :`09GhostviewEraseLocator() \n\ X :`09notify(0) \n\ X :`09notify(180 180 200 200) \n\ X :`09notify(120 120 300 300) \n\ X :`09notify(90 90 400 400) X*toc.baseTranslations:`09#replace \n\ X :`09focus-in() \n\ X :`09focus-out() \n\ X :`09select-start() \n\ X :`09extend-adjust() \n\ X :`09extend-end(PRIMARY, CUT_BUFFER0) \n\ X :`09select-start() \n\ X :`09extend-adjust() \n\ X :`09extend-end(PRIMARY, CUT_BUFFER0) GhostviewShow() \n\ X :`09extend-start() \n\ X :`09extend-adjust() \n\ X :`09extend-end(PRIMARY, CUT_BUFFER0) X*toc.Translations:`09#replace \n\ X :`09focus-in() \n\ X :`09focus-out() \n\ X :`09select-start() \n\ X :`09extend-adjust() \n\ X :`09extend-end(PRIMARY, CUT_BUFFER0) \n\ X :`09select-start() \n\ X :`09extend-adjust() \n\ X :`09extend-end(PRIMARY, CUT_BUFFER0) GhostviewShow() \n\ X :`09extend-start() \n\ X :`09extend-adjust() \n\ X :`09extend-end(PRIMARY, CUT_BUFFER0) X*Form.baseTranslations:`09#replace \n\ X C:`09GhostviewCenter() \n\ X Q:`09GhostviewQuit() \n\ X O:`09GhostviewOpen() \n\ X R:`09GhostviewReopen() \n\ X S:`09GhostviewSave() \n\ X ShiftP:`09GhostviewPrintWhole() \n\ X P:`09GhostviewPrintMarked() \n\ X BackSpace:`09GhostviewPrevious() \n\ X Delete:`09GhostviewPrevious() \n\ X B:`09GhostviewPrevious() \n\ X Prior:`09GhostviewPrevious() \n\ X space:`09GhostviewNext() \n\ X Return:`09GhostviewNext() \n\ X F:`09GhostviewNext() \n\ X Next:`09GhostviewNext() \n\ X period:`09GhostviewShow() \n\ X CtrlL:`09GhostviewShow() \n\ X M:`09GhostviewMark() \n\ X N:`09GhostviewUnmark() \n\ X 0:`09GhostviewSetMagstep(0) \n\ X 1:`09GhostviewSetMagstep(1) \n\ X 2:`09GhostviewSetMagstep(2) \n\ X 3:`09GhostviewSetMagstep(3) \n\ X 4:`09GhostviewSetMagstep(4) \n\ X 5:`09GhostviewSetMagstep(5) \n\ X +:`09GhostviewIncreaseMagstep() \n\ X -:`09GhostviewDecreaseMagstep() \n\ X U:`09GhostviewScrollUp() \n\ X D:`09GhostviewScrollDown() \n\ X K:`09GhostviewScrollUp() \n\ X J:`09GhostviewScrollDown() \n\ X H:`09GhostviewScrollLeft() \n\ X L:`09GhostviewScrollRight() \n\ X ShiftUp:`09GhostviewForce() GhostviewSetOrientation(portrait) \n\ X ShiftRight:`09GhostviewForce() GhostviewSetOrientation(landscape) \ Vn\ X ShiftDown: GhostviewForce() GhostviewSetOrientation(upside-down) \n V\ X ShiftLeft:`09GhostviewForce() GhostviewSetOrientation(seascape) \n\ X Up:`09GhostviewDefault() GhostviewSetOrientation(portrait) \n\ X Right:`09GhostviewDefault() GhostviewSetOrientation(landscape) \n\ X Down:`09GhostviewDefault() GhostviewSetOrientation(upside-down) \n\ X Left:`09GhostviewDefault() GhostviewSetOrientation(seascape) X*Form.Translations:`09#replace \n\ X C:`09GhostviewCenter() \n\ X Q:`09GhostviewQuit() \n\ X O:`09GhostviewOpen() \n\ X R:`09GhostviewReopen() \n\ X S:`09GhostviewSave() \n\ X ShiftP:`09GhostviewPrintWhole() \n\ X P:`09GhostviewPrintMarked() \n\ X BackSpace:`09GhostviewPrevious() \n\ X Delete:`09GhostviewPrevious() \n\ X B:`09GhostviewPrevious() \n\ X Prior:`09GhostviewPrevious() \n\ X space:`09GhostviewNext() \n\ X Return:`09GhostviewNext() \n\ X F:`09GhostviewNext() \n\ X Next:`09GhostviewNext() \n\ X period:`09GhostviewShow() \n\ X CtrlL:`09GhostviewShow() \n\ X M:`09GhostviewMark() \n\ X N:`09GhostviewUnmark() \n\ X 0:`09GhostviewSetMagstep(0) \n\ X 1:`09GhostviewSetMagstep(1) \n\ X 2:`09GhostviewSetMagstep(2) \n\ X 3:`09GhostviewSetMagstep(3) \n\ X 4:`09GhostviewSetMagstep(4) \n\ X 5:`09GhostviewSetMagstep(5) \n\ X +:`09GhostviewIncreaseMagstep() \n\ X -:`09GhostviewDecreaseMagstep() \n\ X U:`09GhostviewScrollUp() \n\ X D:`09GhostviewScrollDown() \n\ X K:`09GhostviewScrollUp() \n\ X J:`09GhostviewScrollDown() \n\ X H:`09GhostviewScrollLeft() \n\ X L:`09GhostviewScrollRight() \n\ X ShiftUp:`09GhostviewForce() GhostviewSetOrientation(portrait) \n\ X ShiftRight:`09GhostviewForce() GhostviewSetOrientation(landscape) \ Vn\ X ShiftDown: GhostviewForce() GhostviewSetOrientation(upside-down) \n V\ X ShiftLeft:`09GhostviewForce() GhostviewSetOrientation(seascape) \n\ X Up:`09GhostviewDefault() GhostviewSetOrientation(portrait) \n\ X Right:`09GhostviewDefault() GhostviewSetOrientation(landscape) \n\ X Down:`09GhostviewDefault() GhostviewSetOrientation(upside-down) \n\ X Left:`09GhostviewDefault() GhostviewSetOrientation(seascape) $ CALL UNPACK GHOSTVIEW.AD;1 290637961 $ create 'f' X/* X * Ghostview.c -- Ghostview widget. X * Copyright (C) 1992 Timothy O. Theisen X * X * This program is free software; you can redistribute it and/or modify X * it under the terms of the GNU General Public License as published by X * the Free Software Foundation; either version 2 of the License, or X * (at your option) any later version. X * X * This program is distributed in the hope that it will be useful, X * but WITHOUT ANY WARRANTY; without even the implied warranty of X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X * GNU General Public License for more details. X * X * You should have received a copy of the GNU General Public License X * along with this program; if not, write to the Free Software X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X * X * Author: Tim Theisen Systems Programmer X * Internet: tim@cs.wisc.edu Department of Computer Sciences X * UUCP: uwvax!tim University of Wisconsin-Madison X * Phone: (608)262-0438 1210 West Dayton Street X * FAX: (608)262-9777 Madison, WI 53706 X */ X X#include X#include X#include X#include X#include X#include "GhostviewP.h" X#include X X#ifndef XlibSpecificationRelease Xtypedef char *XPointer; X#endif X X#include X#ifdef SIGNALRETURNSINT X#define SIGVAL int X#else X#define SIGVAL void X#endif X X#ifdef NON_BLOCKING_IO X#include X/* if POSIX O_NONBLOCK is not available, use O_NDELAY */ X#if !defined(O_NONBLOCK) && defined(O_NDELAY) X#define O_NONBLOCK O_NDELAY X#endif X#endif X X#include X/* BSD 4.3 errno.h does not declare errno */ Xextern int errno; X/* Both error returns are checked for non-blocking I/O. */ X/* Manufacture the other error code if only one exists. */ X#if !defined(EWOULDBLOCK) && defined(EAGAIN) X#define EWOULDBLOCK EAGAIN X#endif X#if !defined(EAGAIN) && defined(EWOULDBLOCK) X#define EAGAIN EWOULDBLOCK X#endif X X#ifndef VMS X/* GV_BUFSIZ is set to the minimum POSIX PIPE_BUF to ensure that X * nonblocking writes to ghostscript will work properly. X */ X#define GV_BUFSIZ 512 X#else /* VMS */ X/* X** GV_BUFSIZ is the maximum length line we can handle, so we up it to 1024 X*/ X#define GV_BUFSIZ 1024 X#endif /* VMS */ X X/* length calculates string length at compile time */ X/* can only be used with character constants */ X#define length(a) (sizeof(a)-1) X#define iscomment(a, b) (strncmp(a, b, length(b)) == 0) X Xstatic void ComputeXdpi(); Xstatic void ComputeYdpi(); X Xstatic XtResource resources`5B`5D = `7B X#define offset(field) XtOffsetOf(GhostviewRec, ghostview.field) X `7B XtNbottomMargin, XtCMargin, XtRInt, sizeof(int), X`09 offset(bottom_margin), XtRImmediate, (XtPointer)0 `7D, X `7B XtNbusyCursor, XtCCursor, XtRCursor, sizeof(XtPointer), X`09 offset(busy_cursor), XtRString, "watch" `7D, X `7B XtNcallback, XtCCallback, XtRCallback, sizeof(XtPointer), X`09 offset(callback), XtRCallback, (XtPointer)NULL `7D, X `7B XtNcursor, XtCCursor, XtRCursor, sizeof(XtPointer), X`09 offset(cursor), XtRString, "crosshair" `7D, X `7B XtNfilename, XtCFilename, XtRString, sizeof(String), X`09 offset(filename), XtRString, (XtPointer)NULL `7D, X `7B XtNinterpreter, XtCInterpreter, XtRString, sizeof(String), X`09 offset(interpreter), XtRString, "gs" `7D, X `7B XtNleftMargin, XtCMargin, XtRInt, sizeof(int), X`09 offset(left_margin), XtRImmediate, (XtPointer)0 `7D, X `7B XtNllx, XtCBoundingBox, XtRInt, sizeof(int), X`09 offset(llx), XtRImmediate, (XtPointer)0 `7D, X `7B XtNlly, XtCBoundingBox, XtRInt, sizeof(int), X`09 offset(lly), XtRImmediate, (XtPointer)0 `7D, X `7B XtNmessageCallback, XtCCallback, XtRCallback, sizeof(XtPointer), X`09 offset(message_callback), XtRCallback, (XtPointer)NULL `7D, X `7B XtNorientation, XtCOrientation, XtRPageOrientation, X`09 sizeof(XtPageOrientation), offset(orientation), XtRImmediate, X`09 (XtPointer)XtPageOrientationPortrait `7D, X `7B XtNoutputCallback, XtCCallback, XtRCallback, sizeof(XtPointer), X`09 offset(output_callback), XtRCallback, (XtPointer)NULL `7D, X `7B XtNpreload, XtCPreload, XtRString, sizeof(String), X`09 offset(preload), XtRString, (XtPointer)NULL `7D, X `7B XtNquiet, XtCQuiet, XtRBoolean, sizeof(Boolean), X`09 offset(quiet), XtRImmediate, (XtPointer)True `7D, X `7B XtNrightMargin, XtCMargin, XtRInt, sizeof(int), X`09 offset(right_margin), XtRImmediate, (XtPointer)0 `7D, X `7B XtNtopMargin, XtCMargin, XtRInt, sizeof(int), X`09 offset(top_margin), XtRImmediate, (XtPointer)0 `7D, X `7B XtNuseBackingPixmap, XtCUseBackingPixmap, XtRBoolean, sizeof(Boolean V), X`09 offset(use_bpixmap), XtRImmediate, (XtPointer)True `7D, X `7B XtNurx, XtCBoundingBox, XtRInt, sizeof(int), X`09 offset(urx), XtRImmediate, (XtPointer)612 `7D, X `7B XtNury, XtCBoundingBox, XtRInt, sizeof(int), X`09 offset(ury), XtRImmediate, (XtPointer)792 `7D, X `7B XtNxdpi, XtCResolution, XtRFloat, sizeof(float), X`09 offset(xdpi), XtRCallProc, (XtPointer)ComputeXdpi `7D, X `7B XtNydpi, XtCResolution, XtRFloat, sizeof(float), X`09 offset(ydpi), XtRCallProc, (XtPointer)ComputeYdpi `7D, X#undef offset X`7D; X Xstatic void Message(); Xstatic void Notify(); Xstatic void Input(); Xstatic void Output(); X Xstatic void ClassInitialize(); Xstatic void ClassPartInitialize(); Xstatic void Initialize(); Xstatic void Realize(); Xstatic void Destroy(); Xstatic void Resize(); Xstatic Boolean SetValues(); Xstatic XtGeometryResult QueryGeometry(); X Xstatic void Layout(); Xstatic Boolean ComputeSize(); Xstatic void ChangeSize(); Xstatic Boolean Setup(); Xstatic void StartInterpreter(); Xstatic void StopInterpreter(); Xstatic void InterpreterFailed(); X Xstatic XtActionsRec actions`5B`5D = X`7B X `7B"message",`09Message`7D, X `7B"notify",`09Notify`7D, X`7D; X X/* notify takes zero to four parameters. The first two give the width and X * height of the zoom requested in the default user coordinate system. X * If they are omitted, a default value of 72 is provided. If the second X * parameter is omitted, the zoom area is assumed to be a square. X * The next two parameters give the desired resolution of the zoom window. X * If they are omitted, a default value of 300 is provided. If the four X * parameter is omitted, the y resolution is assumed to be equal to the X * x resolution. X */ Xstatic char translations`5B`5D = X":`09`09message()`09\n\ X:`09`09notify(72)`09\n\ X:`09`09notify(108)`09\n\ X:`09`09notify(144)`09\n\ X"; X XGhostviewClassRec ghostviewClassRec = `7B X `7B /* core fields */ X /* superclass`09`09*/`09(WidgetClass) &coreClassRec, X /* class_name`09`09*/`09"Ghostview", X /* widget_size`09`09*/`09sizeof(GhostviewRec), X /* class_initialize`09`09*/`09ClassInitialize, X /* class_part_initialize`09*/`09ClassPartInitialize, X /* class_inited`09`09*/`09FALSE, X /* initialize`09`09*/`09Initialize, X /* initialize_hook`09`09*/`09NULL, X /* realize`09`09`09*/`09Realize, X /* actions`09`09`09*/`09actions, X /* num_actions`09`09*/`09XtNumber(actions), X /* resources`09`09*/`09resources, X /* num_resources`09`09*/`09XtNumber(resources), X /* xrm_class`09`09*/`09NULLQUARK, X /* compress_motion`09`09*/`09TRUE, X /* compress_exposure`09*/`09TRUE, X /* compress_enterleave`09*/`09TRUE, X /* visible_interest`09`09*/`09FALSE, X /* destroy`09`09`09*/`09Destroy, X /* resize`09`09`09*/`09Resize, X /* expose`09`09`09*/`09NULL, X /* set_values`09`09*/`09SetValues, X /* set_values_hook`09`09*/`09NULL, X /* set_values_almost`09*/`09XtInheritSetValuesAlmost, X /* get_values_hook`09`09*/`09NULL, X /* accept_focus`09`09*/`09NULL, X /* version`09`09`09*/`09XtVersion, X /* callback_private`09`09*/`09NULL, X /* tm_table`09`09`09*/`09translations, X /* query_geometry`09`09*/`09QueryGeometry, X /* display_accelerator`09*/`09XtInheritDisplayAccelerator, X /* extension`09`09*/`09NULL X `7D, X `7B /* ghostview fields */ X /* ghostview`09`09*/`09NULL, X /* next`09`09`09*/`09NULL, X /* page`09`09`09*/`09NULL, X /* done`09`09`09*/`09NULL X `7D X`7D; X XWidgetClass ghostviewWidgetClass = (WidgetClass)&ghostviewClassRec; X X/* Procedures that compute the default xdpi and ydpi from display parameters V */ X Xstatic void XComputeXdpi(w, offset, value) X Widget w; X int offset; X XrmValue *value; X`7B X static float xdpi; X xdpi = 25.4 * WidthOfScreen(XtScreen(w)) / WidthMMOfScreen(XtScreen(w)); X value->addr = (XtPointer) &xdpi; X`7D X Xstatic void XComputeYdpi(w, offset, value) X Widget w; X int offset; X XrmValue *value; X`7B X static float ydpi; X ydpi = 25.4 * HeightOfScreen(XtScreen(w)) / HeightMMOfScreen(XtScreen(w) V); X value->addr = (XtPointer) &ydpi; X`7D X X/* Message action routine. X * Passes ghostscript message events back to application via X * the message callback. It also marks the interpreter as X * being not busy at the end of page, and stops the interpreter X * when it send a "done" message. X */ Xstatic void XMessage(w, event, params, num_params) X Widget w; X XEvent *event; X String *params;`09`09/* unused */ X Cardinal *num_params;`09/* unused */ X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X GhostviewWidgetClass gvc = (GhostviewWidgetClass) XtClass(w); X X gvw->ghostview.mwin = event->xclient.data.l`5B0`5D; X if (event->xclient.message_type == X`09XmuInternAtom(XtDisplay(w), gvc->ghostview_class.page)) `7B X`09gvw->ghostview.busy = False; X`09XDefineCursor(XtDisplay(gvw), XtWindow(gvw), gvw->ghostview.cursor); X`09XtCallCallbackList(w, gvw->ghostview.message_callback, "Page"); X `7D else if (event->xclient.message_type == X`09 XmuInternAtom(XtDisplay(w), gvc->ghostview_class.done)) `7B X`09StopInterpreter(w); X`09XtCallCallbackList(w, gvw->ghostview.message_callback, "Done"); X `7D X`7D X X/* Notify action routine. X * Calculates where the user clicked in the default user coordinate system. X * Call the callbacks with the point of click and size of zoom window X * requested. X */ Xstatic void XNotify(w, event, params, num_params) X Widget w; X XEvent *event; X String *params; X Cardinal *num_params; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X GhostviewReturnStruct ret_val; X X /* notify takes zero to four parameters. The first two give the width a Vnd X * height of the zoom requested in the default user coordinate system. X * If they are omitted, a default value of 72 is provided. If the secon Vd X * parameter is omitted, the zoom area is assumed to be a square. X * The next two parameters give the desired resolution of the zoom windo Vw. X * If they are omitted, a default value of 300 is provided. If the four X * parameter is omitted, the y resolution is assumed to be equal to the X * x resolution. X */ X switch (*num_params) `7B X case 0: X`09ret_val.width = ret_val.height = 72; X`09ret_val.xdpi = ret_val.ydpi = 300; X`09break; X case 1: X`09ret_val.width = ret_val.height = atoi(params`5B0`5D); X`09ret_val.xdpi = ret_val.ydpi = 300; X`09break; X case 2: X`09ret_val.width = atoi(params`5B0`5D); X`09ret_val.height = atoi(params`5B1`5D); X`09ret_val.xdpi = ret_val.ydpi = 300; X`09break; X case 3: X`09ret_val.width = atoi(params`5B0`5D); X`09ret_val.height = atoi(params`5B1`5D); X`09ret_val.xdpi = ret_val.ydpi = atoi(params`5B2`5D); X`09break; X default: X`09ret_val.width = atoi(params`5B0`5D); X`09ret_val.height = atoi(params`5B1`5D); X`09ret_val.xdpi = atoi(params`5B2`5D); X`09ret_val.ydpi = atoi(params`5B3`5D); X`09break; X `7D X X switch (gvw->ghostview.orientation) `7B X case XtPageOrientationPortrait: X`09ret_val.psx = gvw->ghostview.llx +`20 X`09`09 event->xbutton.x * 72.0 / gvw->ghostview.xdpi; X`09ret_val.psy = gvw->ghostview.ury -`20 X`09`09 event->xbutton.y * 72.0 / gvw->ghostview.ydpi; X`09break; X case XtPageOrientationLandscape: X`09ret_val.psx = gvw->ghostview.llx +`20 X`09`09 event->xbutton.y * 72.0 / gvw->ghostview.ydpi; X`09ret_val.psy = gvw->ghostview.lly +`20 X`09`09 event->xbutton.x * 72.0 / gvw->ghostview.xdpi; X`09break; X case XtPageOrientationUpsideDown: X`09ret_val.psx = gvw->ghostview.urx -`20 X`09`09 event->xbutton.x * 72.0 / gvw->ghostview.xdpi; X`09ret_val.psy = gvw->ghostview.lly +`20 X`09`09 event->xbutton.y * 72.0 / gvw->ghostview.ydpi; X`09break; X case XtPageOrientationSeascape: X`09ret_val.psx = gvw->ghostview.urx -`20 X`09`09 event->xbutton.y * 72.0 / gvw->ghostview.ydpi; X`09ret_val.psy = gvw->ghostview.ury -`20 X`09`09 event->xbutton.x * 72.0 / gvw->ghostview.xdpi; X`09break; X `7D X XtCallCallbackList(w, gvw->ghostview.callback, (XtPointer) &ret_val); X`7D X X#ifndef SEEK_SET X#define SEEK_SET 0 X#endif X Xstatic Boolean broken_pipe = False; X Xstatic SIGVAL XCatchPipe(i) X int i; X`7B X broken_pipe = True; X#ifdef SIGNALRETURNSINT X return 0; X#endif X`7D X X#ifndef VMS X X/* Input - Feed data to ghostscript's stdin. X * Write bytes to ghostscript using non-blocking I/O. X * Also, pipe signals are caught during writing. The return X * values are checked and the appropriate action is taken. I do X * this at this low level, because it may not be appropriate for X * SIGPIPE to be caught for the overall application. X */ X Xstatic void XInput(client_data, source, id) X XtPointer client_data; X int *source; X XtInputId *id; X`7B X Widget w = (Widget) client_data; X GhostviewWidget gvw = (GhostviewWidget) w; X int bytes_written; X SIGVAL (*oldsig)(); X X oldsig = signal(SIGPIPE, CatchPipe); X X#ifdef NON_BLOCKING_IO X do `7B X#endif X X`09if (gvw->ghostview.buffer_bytes_left == 0) `7B X X`09 /* Get a new section if required */ X`09 if (gvw->ghostview.ps_input && gvw->ghostview.bytes_left == 0) `7B X`09`09struct record_list *ps_old = gvw->ghostview.ps_input; X`09`09gvw->ghostview.ps_input = ps_old->next; X`09`09if (ps_old->close) fclose(ps_old->fp); X`09`09XtFree((char *)ps_old); X`09 `7D X X`09 /* Have to seek at the beginning of each section */ X`09 if (gvw->ghostview.ps_input && X`09`09gvw->ghostview.ps_input->seek_needed) `7B X`09`09if (gvw->ghostview.ps_input->len > 0) X`09`09 fseek(gvw->ghostview.ps_input->fp, X`09`09`09 gvw->ghostview.ps_input->begin, SEEK_SET); X`09`09gvw->ghostview.ps_input->seek_needed = False; X`09`09gvw->ghostview.bytes_left = gvw->ghostview.ps_input->len; X`09 `7D X X`09 if (gvw->ghostview.bytes_left > GV_BUFSIZ) `7B X`09`09gvw->ghostview.buffer_bytes_left = X`09`09`09fread(gvw->ghostview.input_buffer, X`09`09`09 sizeof (char), GV_BUFSIZ, X`09`09`09 gvw->ghostview.ps_input->fp); X`09 `7D else if (gvw->ghostview.bytes_left > 0) `7B X`09`09gvw->ghostview.buffer_bytes_left = X`09`09`09fread(gvw->ghostview.input_buffer, X`09`09`09 sizeof (char), gvw->ghostview.bytes_left, X`09`09`09 gvw->ghostview.ps_input->fp); X`09 `7D else `7B X`09`09gvw->ghostview.buffer_bytes_left = 0; X`09 `7D X`09 if (gvw->ghostview.bytes_left > 0 && X`09`09gvw->ghostview.buffer_bytes_left == 0) `7B X`09`09InterpreterFailed(w);`09/* Error occurred */ X`09 `7D X`09 gvw->ghostview.input_buffer_ptr = gvw->ghostview.input_buffer; X`09 gvw->ghostview.bytes_left -= gvw->ghostview.buffer_bytes_left; X`09`7D X X`09if (gvw->ghostview.buffer_bytes_left > 0) `7B X`09 bytes_written = write(gvw->ghostview.interpreter_input, X`09`09`09`09 gvw->ghostview.input_buffer_ptr, X`09`09`09`09 gvw->ghostview.buffer_bytes_left); X X`09 if (broken_pipe) `7B X`09`09broken_pipe = False; X`09`09InterpreterFailed(w);`09`09/* Something bad happened */ X`09 `7D else if (bytes_written == -1) `7B X`09`09if ((errno != EWOULDBLOCK) && (errno != EAGAIN)) `7B X`09`09 InterpreterFailed(w);`09/* Something bad happened */ X`09`09`7D X`09 `7D else `7B X`09`09gvw->ghostview.buffer_bytes_left -= bytes_written; X`09`09gvw->ghostview.input_buffer_ptr += bytes_written; X`09 `7D X`09`7D X#ifdef NON_BLOCKING_IO X `7D while(gvw->ghostview.ps_input && X`09 gvw->ghostview.buffer_bytes_left == 0); X#endif X signal(SIGPIPE, oldsig); X if (gvw->ghostview.ps_input == NULL && X`09gvw->ghostview.buffer_bytes_left == 0) `7B X`09if (gvw->ghostview.interpreter_input_id != None) `7B X`09 XtRemoveInput(gvw->ghostview.interpreter_input_id); X`09 gvw->ghostview.interpreter_input_id = None; X`09`7D X `7D X`7D X X/* Output - receive I/O from ghostscript's stdout and stderr. X * Pass this to the application via the output_callback. */ Xstatic void XOutput(client_data, source, id) X XtPointer client_data; X int *source; X XtInputId *id; X`7B X Widget w = (Widget) client_data; X GhostviewWidget gvw = (GhostviewWidget) w; X char buf`5BGV_BUFSIZ+1`5D; X int bytes = 0; X X if (*source == gvw->ghostview.interpreter_output) `7B X`09bytes = read(gvw->ghostview.interpreter_output, buf, GV_BUFSIZ); X`09if (bytes == 0) `7B /* EOF occurred */ X`09 close(gvw->ghostview.interpreter_output); X`09 gvw->ghostview.interpreter_output = -1; X`09 XtRemoveInput(gvw->ghostview.interpreter_output_id); X`09 return; X`09`7D else if (bytes == -1) `7B X`09 InterpreterFailed(w);`09`09/* Something bad happened */ X`09 return; X`09`7D X `7D else if (*source == gvw->ghostview.interpreter_error) `7B X`09bytes = read(gvw->ghostview.interpreter_error, buf, GV_BUFSIZ); X`09if (bytes == 0) `7B /* EOF occurred */ X`09 close(gvw->ghostview.interpreter_error); X`09 gvw->ghostview.interpreter_error = -1; X`09 XtRemoveInput(gvw->ghostview.interpreter_error_id); X`09 return; X`09`7D else if (bytes == -1) `7B X`09 InterpreterFailed(w);`09`09/* Something bad happened */ X`09 return; X`09`7D X `7D X if (bytes > 0) `7B X`09buf`5Bbytes`5D = '\0'; X`09XtCallCallbackList(w, gvw->ghostview.output_callback, (XtPointer) buf); X `7D X`7D X X#endif /* VMS */ X X/* Register the type converter required for the PageOrientation. */ X/* This routine is called exactly once. */ Xstatic void XClassInitialize() X`7B X XtSetTypeConverter(XtRString, XtRPageOrientation, X`09`09 XmuCvtStringToPageOrientation, NULL, 0, X`09`09 XtCacheAll, NULL); X`7D X X/* Get atoms needed to communicate with ghostscript. */ X/* This routine is called once per display. */ Xstatic void XClassPartInitialize(class) X WidgetClass class; X`7B X GhostviewWidgetClass gvc = (GhostviewWidgetClass)class; X gvc->ghostview_class.ghostview = XmuMakeAtom("GHOSTVIEW"); X gvc->ghostview_class.next = XmuMakeAtom("NEXT"); X gvc->ghostview_class.page = XmuMakeAtom("PAGE"); X gvc->ghostview_class.done = XmuMakeAtom("DONE"); X`7D X X/* Initialize private state. */ X Xstatic void XInitialize(request, new, args, num_args) X Widget request, new; X ArgList args;`09`09/* unused */ X Cardinal *num_args;`09/* unused */ X`7B X XGCValues`09values; X XtGCMask`09mask; X GhostviewWidget ngvw = (GhostviewWidget) new; X GhostviewWidget rgvw = (GhostviewWidget) request; X X values.foreground = new->core.background_pixel; X mask = GCForeground; X ngvw->ghostview.gc = XtGetGC(new, mask, &values); X ngvw->ghostview.mwin = None; X ngvw->ghostview.disable_start = False; X ngvw->ghostview.interpreter_pid = -1; X ngvw->ghostview.input_buffer = NULL; X ngvw->ghostview.bytes_left = 0; X#ifndef VMS X ngvw->ghostview.input_buffer_ptr = NULL; X ngvw->ghostview.buffer_bytes_left = 0; X#endif X ngvw->ghostview.ps_input = NULL; X ngvw->ghostview.interpreter_input = -1; X ngvw->ghostview.interpreter_output = -1; X#ifndef VMS X ngvw->ghostview.interpreter_error = -1; X ngvw->ghostview.interpreter_input_id = None; X ngvw->ghostview.interpreter_output_id = None; X ngvw->ghostview.interpreter_error_id = None; X#else /* VMS */ X memset(ngvw->ghostview.interpreter_input_iosb, 0, 8); X memset(ngvw->ghostview.interpreter_output_iosb, 0, 8); X ngvw->ghostview.output_buffer = NULL; X#endif /* VMS */ X ngvw->ghostview.gs_width = 0; X ngvw->ghostview.gs_height = 0; X ngvw->ghostview.changed = False; X ngvw->ghostview.busy = False; X X /* Compute window size */ X Layout(new, (rgvw->core.width == 0), (rgvw->core.height == 0)); X`7D X X/* Create Window and start interpreter if needed */ Xstatic void XRealize(w, valueMask, attributes) X Widget w; X Mask *valueMask; X XSetWindowAttributes *attributes; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X X if (gvw->ghostview.cursor != None) `7B X`09attributes->cursor = gvw->ghostview.cursor; X`09*valueMask `7C= CWCursor; X `7D X X XtCreateWindow(w, (unsigned int) InputOutput, (Visual *) CopyFromParent, X`09`09 *valueMask, attributes); X X Setup(w); X`7D X X/* Destroy routine: kill the interpreter and release the GC */ Xstatic void XDestroy(w) X Widget w; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X X StopInterpreter(w); X XtReleaseGC(w, gvw->ghostview.gc); X if (gvw->ghostview.input_buffer) XtFree(gvw->ghostview.input_buffer); X#ifdef VMS X if (gvw->ghostview.output_buffer) XtFree(gvw->ghostview.output_buffer); X#endif VMS X if (gvw->core.background_pixmap != XtUnspecifiedPixmap) X`09XFreePixmap(XtDisplay(w), gvw->core.background_pixmap); X`7D X X/* Process resize request. Requested size cannot be changed. X * NOTE: This routine may be called before the widget is realized. X * (It was a surprise to me.) X * If the widget is realized, start a new interpreter by calling Setup(). X * If Setup() actually started a new interpreter and it is taking input X * from stdin, send a refresh message to the application. This is the X * only way that the application can be notified that it needs to resend X * the input because someone forced a new window size on the widget. X */ Xstatic void XResize(w) X Widget w; X`7B X Layout(w, False, False); X if (!XtIsRealized(w)) return; X if (Setup(w)) `7B X`09GhostviewWidget gvw = (GhostviewWidget) w; X`09if (gvw->ghostview.filename == NULL) `7B X`09 XtCallCallbackList(w, gvw->ghostview.message_callback, "Refresh"); X`09`7D X `7D X`7D X X/* SetValues routine. Set new private state, based on changed values X * in the widget. Always returns False, because redisplay is never needed. X */ Xstatic Boolean XSetValues(current, request, new) X Widget current, request, new; X`7B X GhostviewWidget cgvw = (GhostviewWidget) current; X GhostviewWidget rgvw = (GhostviewWidget) request; X GhostviewWidget ngvw = (GhostviewWidget) new; X String cfilename; X String rfilename; X String cpreload; X String rpreload; X X cfilename = cgvw->ghostview.filename; X if (cfilename == NULL) cfilename = "(null)"; X rfilename = rgvw->ghostview.filename; X if (rfilename == NULL) rfilename = "(null)"; X cpreload = cgvw->ghostview.preload; X if (cpreload == NULL) cpreload = "(null)"; X rpreload = rgvw->ghostview.preload; X if (rpreload == NULL) rpreload = "(null)"; X X if (XtIsRealized(new) && !ngvw->ghostview.busy && X`09(cgvw->ghostview.cursor != ngvw->ghostview.cursor)) `7B X`09XDefineCursor(XtDisplay(new), XtWindow(new), ngvw->ghostview.cursor); X `7D X if (XtIsRealized(new) && ngvw->ghostview.busy && X`09(cgvw->ghostview.busy_cursor != ngvw->ghostview.busy_cursor)) `7B X`09XDefineCursor(XtDisplay(new), XtWindow(new), X`09`09 ngvw->ghostview.busy_cursor); X `7D X if ((cgvw->core.width != rgvw->core.width) `7C`7C X`09(cgvw->core.height != rgvw->core.height) `7C`7C X`09strcmp(cgvw->ghostview.interpreter, rgvw->ghostview.interpreter) `7C`7C X`09strcmp(cpreload, rpreload) `7C`7C X`09(cgvw->ghostview.quiet != rgvw->ghostview.quiet) `7C`7C X`09strcmp(cfilename, rfilename) `7C`7C X`09(cgvw->ghostview.orientation != rgvw->ghostview.orientation) `7C`7C X`09(cgvw->ghostview.use_bpixmap != rgvw->ghostview.use_bpixmap) `7C`7C X`09(cgvw->ghostview.xdpi != rgvw->ghostview.xdpi) `7C`7C X`09(cgvw->ghostview.ydpi != rgvw->ghostview.ydpi) `7C`7C X`09(cgvw->ghostview.bottom_margin != rgvw->ghostview.bottom_margin) `7C`7C X`09(cgvw->ghostview.left_margin != rgvw->ghostview.left_margin) `7C`7C X`09(cgvw->ghostview.right_margin != rgvw->ghostview.right_margin) `7C`7C X`09(cgvw->ghostview.top_margin != rgvw->ghostview.top_margin) `7C`7C X`09(cgvw->ghostview.llx != rgvw->ghostview.llx) `7C`7C X`09(cgvw->ghostview.lly != rgvw->ghostview.lly) `7C`7C X`09(cgvw->ghostview.urx != rgvw->ghostview.urx) `7C`7C X`09(cgvw->ghostview.ury != rgvw->ghostview.ury)) `7B X X`09ngvw->ghostview.changed = True; X`09Layout(new, True, True); X `7D X X if (ngvw->ghostview.changed && XtIsRealized(current)) Setup(new); X return(False); X`7D X X/*`09Function Name: QueryGeometry X *`09Description: This tells the parent what size we would like to be X * given certain constraints. X *`09Arguments: w - the widget. X * intended - what the parent intends to do with us. X * requested - what we want to happen. X */ X Xstatic XtGeometryResult`20 XQueryGeometry(w, intended, requested) XWidget w; XXtWidgetGeometry *intended, *requested; X`7B X Dimension new_width, new_height; X Boolean change, width_req, height_req; X `20 X width_req = intended->request_mode & CWWidth; X height_req = intended->request_mode & CWHeight; X X if (width_req) X new_width = intended->width; X else X new_width = w->core.width; X X if (height_req) X new_height = intended->height; X else X new_height = w->core.height; X X requested->request_mode = 0; X `20 X/* X * We only care about our height and width. X */ X X if (!width_req && !height_req) X return(XtGeometryYes); X `20 X change = ComputeSize(w, !width_req, !height_req, &new_width, &new_height V); X X requested->request_mode `7C= CWWidth; X requested->width = new_width; X requested->request_mode `7C= CWHeight; X requested->height = new_height; X X if (change) X return(XtGeometryAlmost); X return(XtGeometryYes); X`7D X X/* Layout the widget. */ X Xstatic void XLayout(w, xfree, yfree) X Widget w; X Boolean xfree, yfree; X`7B X Dimension width = w->core.width; X Dimension height = w->core.height; X Boolean different_size = ComputeSize(w, xfree, yfree, &width, &height); X if (different_size) ChangeSize(w, width, height); X`7D X X/* Compute new size of window, sets xdpi and ydpi if necessary. X * returns True if new window size is different */ Xstatic Boolean XComputeSize(w, xfree, yfree, width, height) X Widget w; X Boolean xfree, yfree;`09/* Am I allowed to change width or height */ X Dimension *width, *height; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X Dimension new_width = *width; X Dimension new_height = *height; X float newxdpi, newydpi; X Boolean change; X X if (xfree && yfree) `7B X`09/* width and height can be changed, calculate window size according */ X`09/* to xpdi and ydpi */ X`09switch (gvw->ghostview.orientation) `7B X`09case XtPageOrientationPortrait: X`09case XtPageOrientationUpsideDown: X`09 new_width = (gvw->ghostview.urx - gvw->ghostview.llx) / 72.0 * X`09`09`09 gvw->ghostview.xdpi + 0.5; X`09 new_height = (gvw->ghostview.ury - gvw->ghostview.lly) / 72.0 * X`09`09`09 gvw->ghostview.ydpi + 0.5; X`09 break; X`09case XtPageOrientationLandscape: X`09case XtPageOrientationSeascape: X`09 new_width = (gvw->ghostview.ury - gvw->ghostview.lly) / 72.0 * X`09`09`09 gvw->ghostview.xdpi + 0.5; X`09 new_height = (gvw->ghostview.urx - gvw->ghostview.llx) / 72.0 * X`09`09`09 gvw->ghostview.ydpi + 0.5; X`09 break; X`09`7D X `7D else if (xfree) `7B X`09/* height is fixed. Preserve aspect ratio by recomputing */ X`09/* ydpi and xdpi */ X`09switch (gvw->ghostview.orientation) `7B X`09case XtPageOrientationPortrait: X`09case XtPageOrientationUpsideDown: X`09 newydpi = gvw->core.height * 72.0 / X`09`09 (gvw->ghostview.ury - gvw->ghostview.lly); X`09 newxdpi = newydpi * gvw->ghostview.xdpi / gvw->ghostview.ydpi; X`09 gvw->ghostview.xdpi = newxdpi; X`09 gvw->ghostview.ydpi = newydpi; X`09 new_width = (gvw->ghostview.urx - gvw->ghostview.llx) / 72.0 * X`09`09`09 gvw->ghostview.xdpi + 0.5; X`09 break; X`09case XtPageOrientationLandscape: X`09case XtPageOrientationSeascape: X`09 newydpi = gvw->core.height * 72.0 / X`09`09 (gvw->ghostview.urx - gvw->ghostview.llx); X`09 newxdpi = newydpi * gvw->ghostview.xdpi / gvw->ghostview.ydpi; X`09 gvw->ghostview.xdpi = newxdpi; X`09 gvw->ghostview.ydpi = newydpi; X`09 new_width = (gvw->ghostview.ury - gvw->ghostview.lly) / 72.0 * X`09`09`09 gvw->ghostview.xdpi + 0.5; X`09 break; X`09`7D X `7D else if (yfree) `7B X`09/* width is fixed. Preserve aspect ratio by recomputing */ X`09/* xdpi and ydpi */ X`09switch (gvw->ghostview.orientation) `7B X`09case XtPageOrientationPortrait: X`09case XtPageOrientationUpsideDown: X`09 newxdpi = gvw->core.width * 72.0 / X`09`09 (gvw->ghostview.urx - gvw->ghostview.llx); X`09 newydpi = newxdpi * gvw->ghostview.ydpi / gvw->ghostview.xdpi; X`09 gvw->ghostview.xdpi = newxdpi; X`09 gvw->ghostview.ydpi = newydpi; X`09 new_height = (gvw->ghostview.ury - gvw->ghostview.lly) / 72.0 * X`09`09`09 gvw->ghostview.ydpi + 0.5; X`09 break; X`09case XtPageOrientationLandscape: X`09case XtPageOrientationSeascape: X`09 newxdpi = gvw->core.width * 72.0 / X`09`09 (gvw->ghostview.ury - gvw->ghostview.lly); X`09 newydpi = newxdpi * gvw->ghostview.ydpi / gvw->ghostview.xdpi; X`09 gvw->ghostview.xdpi = newxdpi; X`09 gvw->ghostview.ydpi = newydpi; X`09 new_height = (gvw->ghostview.urx - gvw->ghostview.llx) / 72.0 * X`09`09`09 gvw->ghostview.ydpi + 0.5; X`09 break; X`09`7D X `7D else `7B X`09/* height and width are fixed. Just have to live with it. */ X`09switch (gvw->ghostview.orientation) `7B X`09case XtPageOrientationPortrait: X`09case XtPageOrientationUpsideDown: X`09 gvw->ghostview.xdpi = gvw->core.width * 72.0 / X`09`09`09`09 (gvw->ghostview.urx - gvw->ghostview.llx); X`09 gvw->ghostview.ydpi = gvw->core.height * 72.0 / X`09`09`09`09 (gvw->ghostview.ury - gvw->ghostview.lly); X`09 break; X`09case XtPageOrientationLandscape: X`09case XtPageOrientationSeascape: X`09 gvw->ghostview.xdpi = gvw->core.width * 72.0 / X`09`09`09`09 (gvw->ghostview.ury - gvw->ghostview.lly); X`09 gvw->ghostview.ydpi = gvw->core.height * 72.0 / X`09`09`09`09 (gvw->ghostview.urx - gvw->ghostview.llx); X`09 break; X`09`7D X `7D X X change = (new_width != *width) `7C`7C (new_height != *height); X *width = new_width; X *height = new_height; X return (change); X`7D X X/*`09Function Name: ChangeSize. X *`09Description: Request a size change. X *`09Arguments: w - the widget to try change the size of. X */ X Xstatic void XChangeSize(w, width, height) XWidget w; XDimension width, height; X`7B X XtWidgetGeometry request, reply; X Boolean changed = False; X X request.request_mode = CWWidth `7C CWHeight; X request.width = width; X request.height = height; X `20 X switch ( XtMakeGeometryRequest(w, &request, &reply) ) `7B X case XtGeometryYes: X`09changed = True; X break; X case XtGeometryNo: X break; X case XtGeometryAlmost: X`09ComputeSize(w, (request.height != reply.height), X`09`09 (request.width != reply.width), X`09`09 &(reply.width), &(reply.height)); X`09request = reply; X`09switch (XtMakeGeometryRequest(w, &request, &reply) ) `7B X`09case XtGeometryYes: X`09 changed = True; X`09 break; X`09case XtGeometryNo: X`09 break; X`09case XtGeometryAlmost: X`09 request = reply; X`09 ComputeSize(w, FALSE, FALSE, &(request.width), &(request.height)); X`09 request.request_mode = CWWidth `7C CWHeight; X`09 XtMakeGeometryRequest(w, &request, &reply); X`09 changed = True; X`09 break; X`09`7D X`09break; X `7D X X /* If success, setup the widet for the new size. */ X if (changed && XtIsRealized(w)) Setup(w); X`7D X X/* Catch the alloc error when there is not enough resources for the X * backing pixmap. Automatically shut off backing pixmap and let the X * user know when this happens. X */ Xstatic Boolean alloc_error; Xstatic XErrorHandler oldhandler; X Xstatic int Xcatch_alloc (dpy, err) XDisplay *dpy; XXErrorEvent *err; X`7B X if (err->error_code == BadAlloc) `7B X`09alloc_error = True; X `7D X if (alloc_error) return 0; X oldhandler(dpy, err); X`7D X X/* Setup - sets up the backing pixmap, and GHOSTVIEW property and X * starts interpreter if needed. X * NOTE: the widget must be realized before calling Setup(). X * Returns True if a new interpreter was started, False otherwise. X */ X`20 Xstatic Boolean XSetup(w) X Widget w; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X GhostviewWidgetClass gvc = (GhostviewWidgetClass) XtClass(w); X char buf`5BGV_BUFSIZ`5D; X Pixmap bpixmap; X XSetWindowAttributes xswa; X X if (!gvw->ghostview.changed && X`09(gvw->core.width == gvw->ghostview.gs_width) && X`09(gvw->core.height == gvw->ghostview.gs_height)) return False; +-+-+-+-+-+-+-+- END OF PART 3 +-+-+-+-+-+-+-+- Return-Path: mccall!tp@!mccall.com Delivery-Date: Tue, 27 Oct 92 19:12:04 -0600 Return-Path: mccall!tp@!mccall.com Received: from cs.wisc.edu by appenzell.cs.wisc.edu; Tue, 27 Oct 92 19:11:58 -0600 Received: from depot.cis.ksu.edu by cs.wisc.edu; Tue, 27 Oct 92 19:11:54 -0600 Return-Path: Received: from mccall.UUCP by depot.cis.ksu.edu UUCP (5.65a) id AA18624; Tue, 27 Oct 92 19:11:03 -0600 Received: by mccall.com (DECUS UUCP /1.3-1/2.5/); Tue, 27 Oct 92 18:52:49 CST Received: by mccall.com (MX V3.1C) id 12839; Tue, 27 Oct 1992 18:52:42 CST Date: Tue, 27 Oct 1992 18:52:45 CST From: Terry Poot To: tim Message-Id: <00962BB1.736C94E0.12839@mccall.com> Subject: Ghostview for VMS 04/14 -+-+-+-+-+-+-+-+ START OF PART 4 -+-+-+-+-+-+-+-+ X X StopInterpreter(w); X X if ((gvw->core.width != gvw->ghostview.gs_width) `7C`7C X`09(gvw->core.height != gvw->ghostview.gs_height) `7C`7C X`09(!gvw->ghostview.use_bpixmap)) `7B X`09if (gvw->core.background_pixmap != XtUnspecifiedPixmap) `7B X`09 XFreePixmap(XtDisplay(w), gvw->core.background_pixmap); X`09 gvw->core.background_pixmap = XtUnspecifiedPixmap; X`09 XSetWindowBackgroundPixmap(XtDisplay(w), XtWindow(w), None); X`09`7D X `7D X X if (gvw->ghostview.use_bpixmap) `7B X`09if (gvw->core.background_pixmap == XtUnspecifiedPixmap) `7B X`09 /* Get a Backing Pixmap, but be ready for the BadAlloc. */ X`09 oldhandler = XSetErrorHandler(catch_alloc); X`09 alloc_error = False; X`09 bpixmap = XCreatePixmap(XtDisplay(w), XtWindow(w), X`09`09`09`09 gvw->core.width, gvw->core.height, X`09`09`09`09 gvw->core.depth); X`09 XSync(XtDisplay(w), False); /* Force the error */ X`09 if (alloc_error) `7B X`09`09XtCallCallbackList(w, gvw->ghostview.message_callback, X`09`09`09`09 "BadAlloc"); X`09`09if (bpixmap != None) `7B X`09`09 XFreePixmap(XtDisplay(w), bpixmap); X`09`09 XSync(XtDisplay(w), False); /* Force the error */ X`09`09 bpixmap = None; X`09`09`7D X`09 `7D X`09 oldhandler = XSetErrorHandler(oldhandler); X`09 if (bpixmap != None) `7B X`09`09gvw->core.background_pixmap = bpixmap; X`09`09XSetWindowBackgroundPixmap(XtDisplay(w), XtWindow(w), X`09`09`09`09`09 gvw->core.background_pixmap); X`09 `7D X`09`7D else `7B X`09 bpixmap = gvw->core.background_pixmap; X`09`7D X `7D else `7B X`09if (gvw->core.background_pixmap != XtUnspecifiedPixmap) `7B X`09 XFreePixmap(XtDisplay(w), gvw->core.background_pixmap); X`09 gvw->core.background_pixmap = XtUnspecifiedPixmap; X`09 XSetWindowBackgroundPixmap(XtDisplay(w), XtWindow(w), None); X`09`7D X`09bpixmap = None; X `7D X X if (bpixmap != None) `7B X`09xswa.backing_store = NotUseful; X`09XChangeWindowAttributes(XtDisplay(w), XtWindow(w), X`09`09`09`09CWBackingStore, &xswa); X `7D else `7B X`09xswa.backing_store = Always; X`09XChangeWindowAttributes(XtDisplay(w), XtWindow(w), X`09`09`09`09CWBackingStore, &xswa); X `7D X X gvw->ghostview.gs_width = gvw->core.width; X gvw->ghostview.gs_height = gvw->core.height; X X sprintf(buf, "%d %d %d %d %d %d %g %g %d %d %d %d", X`09 bpixmap, gvw->ghostview.orientation, X`09 gvw->ghostview.llx, gvw->ghostview.lly, X`09 gvw->ghostview.urx, gvw->ghostview.ury, X`09 gvw->ghostview.xdpi, gvw->ghostview.ydpi, X`09 gvw->ghostview.left_margin, gvw->ghostview.bottom_margin, X`09 gvw->ghostview.right_margin, gvw->ghostview.top_margin); X XChangeProperty(XtDisplay(w), XtWindow(w), X`09`09 XmuInternAtom(XtDisplay(w), gvc->ghostview_class.ghostview), X`09`09 XA_STRING, 8, PropModeReplace, X`09`09 (unsigned char *)buf, strlen(buf)); X X StartInterpreter(w); X return True; X`7D X X#ifndef VMS X X/* This routine starts the interpreter. It sets the DISPLAY and`20 X * GHOSTVIEW environment variables. The GHOSTVIEW environment variable X * contains the Window that ghostscript should write on. X * X * This routine also opens pipes for stdout and stderr and initializes X * application input events for them. If input to ghostscript is not X * from a file, a pipe for stdin is created. This pipe is setup for X * non-blocking I/O so that the user interface never "hangs" because of X * a write to ghostscript. X */ Xstatic void XStartInterpreter(w) X Widget w; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X int`09std_in`5B2`5D; X int`09std_out`5B2`5D; X int`09std_err`5B2`5D; X char buf`5BGV_BUFSIZ`5D; X#define NUM_ARGS 100 X char *argv`5BNUM_ARGS`5D; X char *preload = NULL; X char *cptr; X int argc = 0; X int ret; X X StopInterpreter(w); X X /* Clear the window before starting a new interpreter. */ X if (gvw->core.background_pixmap != XtUnspecifiedPixmap) `7B X`09XFillRectangle(XtDisplay(w), gvw->core.background_pixmap, X`09`09 gvw->ghostview.gc, X`09`09 0, 0, gvw->core.width, gvw->core.height); X `7D X XClearArea(XtDisplay(w), XtWindow(w), X`09 0, 0, gvw->core.width, gvw->core.height, False); X X if (gvw->ghostview.disable_start) return; X X argv`5Bargc++`5D = gvw->ghostview.interpreter; X if (gvw->ghostview.quiet) argv`5Bargc++`5D = "-dQUIET"; X argv`5Bargc++`5D = "-dNOPAUSE"; X if (gvw->ghostview.preload) `7B X`09cptr = preload = XtNewString(gvw->ghostview.preload); X`09while (isspace(*cptr)) cptr++; X`09while (*cptr) `7B X`09 argv`5Bargc++`5D = cptr; X`09 while (*cptr && !isspace(*cptr)) cptr++; X`09 *cptr++ = '\0'; X`09 if (argc + 2 >= NUM_ARGS) `7B X`09`09fprintf(stderr, "Too many files to preload.\n"); X`09`09exit(1); X`09 `7D X`09 while (isspace(*cptr)) cptr++; X`09`7D X `7D X argv`5Bargc++`5D = "-"; X argv`5Bargc++`5D = NULL; X X if (gvw->ghostview.filename == NULL) `7B X`09ret = pipe(std_in); X`09if (ret == -1) `7B X`09 perror("Could not create pipe"); X`09 exit(1); X`09`7D X `7D else if (strcmp(gvw->ghostview.filename, "-")) `7B X`09std_in`5B0`5D = open(gvw->ghostview.filename, O_RDONLY, 0); X `7D X ret = pipe(std_out); X if (ret == -1) `7B X`09perror("Could not create pipe"); X`09exit(1); X `7D X ret = pipe(std_err); X if (ret == -1) `7B X`09perror("Could not create pipe"); X`09exit(1); X `7D X X gvw->ghostview.changed = False; X gvw->ghostview.busy = True; X XDefineCursor(XtDisplay(gvw), XtWindow(gvw), gvw->ghostview.busy_cursor) V; X#if defined(SYSV) `7C`7C defined(USG) X#define vfork fork X#endif X gvw->ghostview.interpreter_pid = vfork(); X X if (gvw->ghostview.interpreter_pid == 0) `7B /* child */ X`09close(std_out`5B0`5D); X`09close(std_err`5B0`5D); X`09dup2(std_out`5B1`5D, 1); X`09close(std_out`5B1`5D); X`09dup2(std_err`5B1`5D, 2); X`09close(std_err`5B1`5D); X`09sprintf(buf, "%d", XtWindow(w)); X`09setenv("GHOSTVIEW", buf, True); X`09setenv("DISPLAY", XDisplayString(XtDisplay(w)), True); X`09if (gvw->ghostview.filename == NULL) `7B X`09 close(std_in`5B1`5D); X`09 dup2(std_in`5B0`5D, 0); X`09 close(std_in`5B0`5D); X`09`7D else if (strcmp(gvw->ghostview.filename, "-")) `7B X`09 dup2(std_in`5B0`5D, 0); X`09 close(std_in`5B0`5D); X`09`7D X`09execvp(argv`5B0`5D, argv); X`09sprintf(buf, "Exec of %s failed", argv`5B0`5D); X`09perror(buf); X`09_exit(1); X `7D else `7B X`09if (gvw->ghostview.filename == NULL) `7B X#ifdef NON_BLOCKING_IO X`09 int result; X#endif X`09 close(std_in`5B0`5D); X X#ifdef NON_BLOCKING_IO X`09 result = fcntl(std_in`5B1`5D, F_GETFL, 0); X`09 result = result `7C O_NONBLOCK; X`09 result = fcntl(std_in`5B1`5D, F_SETFL, result); X#endif X`09 gvw->ghostview.interpreter_input = std_in`5B1`5D; X`09 gvw->ghostview.interpreter_input_id = None; X`09`7D else if (strcmp(gvw->ghostview.filename, "-")) `7B X`09 close(std_in`5B0`5D); X`09`7D X`09close(std_out`5B1`5D); X`09gvw->ghostview.interpreter_output = std_out`5B0`5D; X`09gvw->ghostview.interpreter_output_id =`20 X`09 XtAppAddInput(XtWidgetToApplicationContext(w), std_out`5B0`5D, X`09`09`09 (XtPointer)XtInputReadMask, Output, (XtPointer)w); X`09close(std_err`5B1`5D); X`09gvw->ghostview.interpreter_error = std_err`5B0`5D; X`09gvw->ghostview.interpreter_error_id =`20 X`09 XtAppAddInput(XtWidgetToApplicationContext(w), std_err`5B0`5D, X`09`09`09 (XtPointer)XtInputReadMask, Output, (XtPointer)w); X `7D X if (preload) XtFree(preload); X`7D X X/* Stop the interperter, if present, and remove any Input sources. */ X/* Also reset the busy state. */ Xstatic void XStopInterpreter(w) X Widget w; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X if (gvw->ghostview.interpreter_pid >= 0) `7B X`09kill(gvw->ghostview.interpreter_pid, SIGTERM); X`09wait(0); X`09gvw->ghostview.interpreter_pid = -1; X `7D X if (gvw->ghostview.interpreter_input >= 0) `7B X`09close(gvw->ghostview.interpreter_input); X`09gvw->ghostview.interpreter_input = -1; X`09if (gvw->ghostview.interpreter_input_id != None) `7B X`09 XtRemoveInput(gvw->ghostview.interpreter_input_id); X`09 gvw->ghostview.interpreter_input_id = None; X`09`7D X`09while (gvw->ghostview.ps_input) `7B X`09 struct record_list *ps_old = gvw->ghostview.ps_input; X`09 gvw->ghostview.ps_input = ps_old->next; X`09 if (ps_old->close) fclose(ps_old->fp); X`09 XtFree((char *)ps_old); X`09`7D X `7D X if (gvw->ghostview.interpreter_output >= 0) `7B X`09close(gvw->ghostview.interpreter_output); X`09gvw->ghostview.interpreter_output = -1; X`09XtRemoveInput(gvw->ghostview.interpreter_output_id); X `7D X if (gvw->ghostview.interpreter_error >= 0) `7B X`09close(gvw->ghostview.interpreter_error); X`09gvw->ghostview.interpreter_error = -1; X`09XtRemoveInput(gvw->ghostview.interpreter_error_id); X `7D X gvw->ghostview.busy = False; X XDefineCursor(XtDisplay(gvw), XtWindow(gvw), gvw->ghostview.cursor); X`7D X X#endif /* VMS */ X X/* The interpeter failed, Stop what's left and notify application */ Xstatic void XInterpreterFailed(w) X Widget w; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X StopInterpreter(w); X XtCallCallbackList(w, gvw->ghostview.message_callback, "Failed"); X`7D X X/* X *`09Public Routines X */ X X/* GhostviewDisableInterpreter: X * Stop any interpreter and disable new ones from starting. X */ Xvoid XGhostviewDisableInterpreter(w) X Widget w; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X gvw->ghostview.disable_start = True; X if (XtIsRealized(w)) StopInterpreter(w); X`7D X X/* GhostviewDisableInterpreter: X * Allow an interpreter to start and start one if the widget is X * currently realized. X */ Xvoid XGhostviewEnableInterpreter(w) X Widget w; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X gvw->ghostview.disable_start = False; X if (XtIsRealized(w)) StartInterpreter(w); X`7D X X/* GhostviewIsInterpreterReady: X * Returns True if the interpreter is ready for new input. X */ XBoolean XGhostviewIsInterpreterReady(w) X Widget w; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X return gvw->ghostview.interpreter_pid != -1 && X`09 !gvw->ghostview.busy && X`09 gvw->ghostview.ps_input == NULL; X`7D X X/* GhostviewIsInterpreterRunning: X * Returns True if the interpreter is running. X */ XBoolean XGhostviewIsInterpreterRunning(w) X Widget w; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X return gvw->ghostview.interpreter_pid != -1; X`7D X X/* GhostviewGetBackingPixmap: X * Returns the current backing pixmap. X */ XPixmap XGhostviewGetBackingPixmap(w) X Widget w; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X if (gvw->core.background_pixmap != XtUnspecifiedPixmap) X`09return(gvw->core.background_pixmap); X else X`09return(None); X`7D X X#ifndef VMS X X/* GhostviewSendPS: X * Queue a portion of a PostScript file for output to ghostscript. X * fp: FILE * of the file in question. NOTE: if you have several X * Ghostview widgets reading from the same file. You must open X * a unique FILE * for each widget. X * SendPS does not actually send the PostScript, it merely queues it X * for output. X * begin: position in file (returned from ftell()) to start. X * len: number of bytes to write. X * X * If an interpreter is not running, nothing is queued and X * False is returned. X */ XBoolean XGhostviewSendPS(w, fp, begin, len, close) X Widget w; X FILE *fp; X long begin; X unsigned int len; X Bool close; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X struct record_list *ps_new; X X if (gvw->ghostview.interpreter_input < 0) return False; X ps_new = (struct record_list *) XtMalloc(sizeof (struct record_list)); X ps_new->fp = fp; X ps_new->begin = begin; X ps_new->len = len; X ps_new->seek_needed = True; X ps_new->close = close; X ps_new->next = NULL; X X if (gvw->ghostview.input_buffer == NULL) `7B X`09gvw->ghostview.input_buffer = XtMalloc(GV_BUFSIZ); X `7D X X if (gvw->ghostview.ps_input == NULL) `7B X`09gvw->ghostview.input_buffer_ptr = gvw->ghostview.input_buffer; X`09gvw->ghostview.bytes_left = len; X`09gvw->ghostview.buffer_bytes_left = 0; X`09gvw->ghostview.ps_input = ps_new; X`09gvw->ghostview.interpreter_input_id = X`09`09XtAppAddInput(XtWidgetToApplicationContext(w), X`09`09`09 gvw->ghostview.interpreter_input, X`09`09`09 (XtPointer)XtInputWriteMask, Input, (XtPointer)w); X `7D else `7B X`09struct record_list *p = gvw->ghostview.ps_input; X`09while (p->next != NULL) `7B X`09 p = p->next; X`09`7D X`09p->next = ps_new; X `7D X return True; X`7D X X#endif /* VMS */ X X/* GhostviewNextPage: X * Tell ghostscript to start the next page. X * Returns False if ghostscript is not running, or not ready to start X * another page. X * If another page is started. Sets the busy flag and cursor. X */ XBoolean XGhostviewNextPage(w) X Widget w; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X GhostviewWidgetClass gvc = (GhostviewWidgetClass) XtClass(w); X XEvent event; X X if (gvw->ghostview.interpreter_pid < 0) return False; X if (gvw->ghostview.mwin == None) return False; X X if (!gvw->ghostview.busy) `7B X`09gvw->ghostview.busy = True; X`09XDefineCursor(XtDisplay(gvw), XtWindow(gvw), X`09`09 gvw->ghostview.busy_cursor); X X`09event.xclient.type = ClientMessage; X`09event.xclient.display = XtDisplay(w); X`09event.xclient.window = gvw->ghostview.mwin; X`09event.xclient.message_type = X`09`09XmuInternAtom(XtDisplay(w), gvc->ghostview_class.next); X`09event.xclient.format = 32; X`09XSendEvent(XtDisplay(w), gvw->ghostview.mwin, False, 0, &event); X`09return True; X `7D else `7B X`09return False; X `7D X`7D X X#define`09done(type, value) \ X`09`7B`09`09`09`09`09`09`09\ X`09 if (toVal->addr != NULL) `7B`09`09`09`09\ X`09`09if (toVal->size < sizeof(type)) `7B`09`09\ X`09`09 toVal->size = sizeof(type);`09`09`09\ X`09`09 return False;`09`09`09`09\ X`09`09`7D`09`09`09`09`09`09\ X`09`09*(type*)(toVal->addr) = (value);`09`09\ X`09 `7D`09`09`09`09`09`09`09\ X`09 else `7B`09`09`09`09`09`09\ X`09`09static type static_val;`09`09`09`09\ X`09`09static_val = (value);`09`09`09`09\ X`09`09toVal->addr = (XPointer)&static_val;`09`09\ X`09 `7D`09`09`09`09`09`09`09\ X`09 toVal->size = sizeof(type);`09`09`09`09\ X`09 return True;`09`09`09`09`09\ X`09`7D X X/* PageOrienation Conversion Routine. X * Returns True if Conversion is successful. X */ XBoolean XXmuCvtStringToPageOrientation(dpy, args, num_args, fromVal, toVal, data) X Display`09*dpy; X XrmValue`09*args;`09`09/* unused */ X Cardinal`09*num_args;`09/* unused */ X XrmValue`09*fromVal; X XrmValue`09*toVal; X XtPointer`09*data;`09`09/* unused */ X`7B X static XrmQuark`09`09XrmQEportrait; X static XrmQuark`09`09XrmQElandscape; X static XrmQuark`09`09XrmQEupsideDown; X static XrmQuark`09`09XrmQEseascape; X static int`09`09`09haveQuarks; X XrmQuark q; X char`09*str = (XPointer) fromVal->addr; X char lowerName`5B1000`5D; X X if (str == NULL) return False; X X if (!haveQuarks) `7B X`09XrmQEportrait = XrmStringToQuark(XtEportrait); X`09XrmQElandscape = XrmStringToQuark(XtElandscape); X`09XrmQEupsideDown = XrmStringToQuark(XtEupsideDown); X`09XrmQEseascape = XrmStringToQuark(XtEseascape); X`09haveQuarks = 1; X `7D X X XmuCopyISOLatin1Lowered(lowerName, str); X X q = XrmStringToQuark(lowerName); X X if (q == XrmQEportrait) X`09done(XtPageOrientation, XtPageOrientationPortrait); X if (q == XrmQElandscape) X`09done(XtPageOrientation, XtPageOrientationLandscape); X if (q == XrmQEupsideDown) X`09done(XtPageOrientation, XtPageOrientationUpsideDown); X if (q == XrmQEseascape) X`09done(XtPageOrientation, XtPageOrientationSeascape); X X XtDisplayStringConversionWarning(dpy, str, XtRPageOrientation); X return False; X`7D X X#ifdef VMS X X/* X** VMS specific include files X*/ X#include X#include X#include X#include X#include X#include X#include "vms_types.h" X X#define ERR_SIGNAL(s) if(!((s) & 1))lib$signal((s), 0, 0) X#define XtEFN 23 X Xstruct g_l_i X`7B X GhostviewWidget w; X struct g_l_i *next; X`7D; X Xtypedef struct g_l_i GhostListItem, *GLI_p; X Xstatic GhostListItem glhead = `7B(GhostviewWidget) -1, NULL`7D; Xstatic GLI_p GL = &glhead; Xstatic size_t GLI_Size = sizeof(GhostListItem); Xstatic XtInputId EventId; X X/* X** This routine is passed to XtAppAddInput(). It is called whenever the even Vt X** flag number XtEFN is set and the Xt main loop becomes idle. It clears the X** event flag and then scans all the ghostview widgets for completed I/O X** requests, processing each as they are found. We have to do them all becau Vse X** there is no way to have Xt dispatch them individually without a window of X** vulnerability that can cause missed events, or by using a separate event X** flag for each I/O stream. Event flags are, unfortunately, a limited X** resource. X*/ Xstatic Boolean XIOProcess() X`7B X GhostviewWidget gvw; X GLI_p cur; X X /* X ** Before we process any I/O's, clear the event flag. X */ X sys$clref(XtEFN); X /* X ** Scan all the ghostview widgets and check for completed I/O's X */ X for(cur = GL->next; cur; cur = cur->next)`7B X`09/* X`09** Get the widget and check for I/O complete on either mailbox. X`09*/ X`09gvw = cur->w; X`09if(gvw->ghostview.interpreter_input_iosb`5B0`5D)Input(gvw); X`09if(gvw->ghostview.interpreter_output_iosb`5B0`5D)Output(gvw); X `7D X`7D X `20 X/* X** This is an AST routine. It is called asynchronously whenever one of our X** mailbox I/O's completes. X*/ Xstatic void XIOComplete(client_data) X XtPointer client_data; X`7B X /* X ** Set the event flag to tell Xt to call IOProcess. X */ X sys$setef(XtEFN); X`7D X Xstatic void XGLInsert(w) X GhostviewWidget w; X`7B X GLI_p new; X int first; X `20 X /* X ** Insert this widget after the list head X */ X first = (GL->next == NULL); X new = XtMalloc(GLI_Size); X new->w = w; X new->next = GL->next; X GL->next = new; X /* X ** If this is the first item on the list, call XtAppAddInput() X */ X if(first)EventId = XtAppAddInput(XtWidgetToApplicationContext(w), XtEFN, V 0,`20 X`09IOProcess, 0); X`7D X Xstatic void XGLRemove(w) X GhostviewWidget w; X`7B X GLI_p prev, cur; X int last = 0; X X /* X ** Find and remove this widget from the list. X */ X prev = GL; X cur = prev->next; X while(cur && cur->w != w)`7B X`09prev = cur; X`09cur = cur->next; X `7D X if(cur)`7B X prev->next = cur->next; X XtFree(cur); X last = (GL->next == NULL); X `7D X /* X ** If this was the last item on the list, call XtRemoveInput() X */ X if(last)XtRemoveInput(EventId); X`7D X X/* Input - Feed data to ghostscript's stdin. X * Write bytes to ghostscript using non-blocking I/O. X * Also, pipe signals are caught during writing. The return X * values are checked and the appropriate action is taken. I do X * this at this low level, because it may not be appropriate for X * SIGPIPE to be caught for the overall application. X */ X Xstatic void XInput(gvw) X GhostviewWidget gvw; X`7B X int stat, bbytes; X char *ch; X X /* X ** Check for error on previous I/O. X */ X stat = gvw->ghostview.interpreter_input_iosb`5B0`5D; X if(stat != SS$_NORMAL)`7B X`09InterpreterFailed(gvw); X `7D else `7B X X`09/* Get a new section if required */ X`09 X`09if (gvw->ghostview.ps_input && gvw->ghostview.bytes_left == 0) `7B X`09 struct record_list *ps_old = gvw->ghostview.ps_input; X`09 gvw->ghostview.ps_input = ps_old->next; X`09 if (ps_old->close) fclose(ps_old->fp); X`09 XtFree((char *)ps_old); X`09`7D X`09if(gvw->ghostview.ps_input)`7B X`09 /* Have to seek at the beginning of each section */ X`09 if (gvw->ghostview.ps_input->seek_needed) `7B X`09`09if (gvw->ghostview.ps_input->len > 0) X`09`09 fseek(gvw->ghostview.ps_input->fp, X`09`09`09 gvw->ghostview.ps_input->begin, SEEK_SET); X`09`09gvw->ghostview.ps_input->seek_needed = False; X`09`09gvw->ghostview.bytes_left = gvw->ghostview.ps_input->len; X`09 `7D X`09 /* X`09 ** Read a line from the file. X`09 */ X`09 ch = fgets(gvw->ghostview.input_buffer, GV_BUFSIZ, X`09`09gvw->ghostview.ps_input->fp); X`09 if(!ch)`7B X`09`09/* X`09`09** Error, EOF when there's supposed to be data left.`20 X`09`09*/ X`09`09InterpreterFailed(gvw); X`09 `7D else `7B X`09`09/* X`09`09** Write it to the mailbox. X`09`09*/ X`09`09bbytes = strlen(gvw->ghostview.input_buffer); X`09`09gvw->ghostview.bytes_left -= bbytes; X`09`09stat = sys$qio(0, (short)gvw->ghostview.interpreter_input, X`09`09 IO$_WRITEVBLK, &gvw->ghostview.interpreter_input_iosb, X`09`09 IOComplete, 0, gvw->ghostview.input_buffer, bbytes, X`09`09 0, 0, 0, 0); X`09`09ERR_SIGNAL(stat); X`09 `7D X`09`7D X `7D X`7D X X/* Output - receive I/O from ghostscript's stdout and stderr. X * Pass this to the application via the output_callback. */ Xstatic void XOutput(gvw) X GhostviewWidget gvw; X`7B X char buf`5BGV_BUFSIZ+1`5D; X int bytes, stat; X X stat = gvw->ghostview.interpreter_output_iosb`5B0`5D; X bytes = gvw->ghostview.interpreter_output_iosb`5B1`5D; X if (stat == SS$_NORMAL) `7B X`09/* X`09** Got a message. If line complete, pass to the output_callback. X`09** X`09** HACK ALERT, if bytes is -1 nothing happens, but an I/O is queued. X`09** This is our first time code, since Xt doesn't queue the I/O for us X`09** under VMS, just watches for completion. In StartInterpreter We setup X`09** an IOSB with a success status and -1 bytes so Xt will call us the X`09** first time to get the I/O queued. X`09*/ X`09if (bytes == 0) `7B X`09 strcpy(buf, "\n"); X`09`7D else if (bytes == 1) `7B X`09 buf`5B0`5D = gvw->ghostview.output_buffer`5B0`5D; X`09 buf`5B1`5D = '\0'; X`09`7D else if (bytes > 1) `7B X`09 /* X`09 ** Copy the message to a local buffer and pass it to the callback. X`09 */ X`09 memcpy(buf, gvw->ghostview.output_buffer, bytes); X`09 buf`5Bbytes`5D = '\0'; X`09`7D X`09if(bytes >= 0)XtCallCallbackList(gvw, gvw->ghostview.output_callback, X`09 (XtPointer) buf); X`09/* X`09** Queue a new read to the mailbox X`09*/ X`09stat = sys$qio(0, (short)gvw->ghostview.interpreter_output, X`09 IO$_READVBLK, &gvw->ghostview.interpreter_output_iosb, IOComplete, X`09 0, gvw->ghostview.output_buffer, GV_BUFSIZ, 0, 0, 0, 0); X`09ERR_SIGNAL(stat); X `7D else `7B X`09InterpreterFailed(gvw);`09`09/* Something bad happened */ X `7D X`7D X X/* This routine starts the interpreter. It sets the DISPLAY and`20 X * GHOSTVIEW environment variables. The GHOSTVIEW environment variable X * contains the Window that ghostscript should write on. X * X * This routine also opens pipes for stdout and stderr and initializes X * application input events for them. If input to ghostscript is not X * from a file, a pipe for stdin is created. This pipe is setup for X * non-blocking I/O so that the user interface never "hangs" because of X * a write to ghostscript. X */ Xstatic void XStartInterpreter(w) X Widget w; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X char buf`5BGV_BUFSIZ`5D; X char cmd`5B512`5D; X int ret; X short ch1, ch2; X char in_mbx_name`5B65`5D, out_mbx_name`5B65`5D; X long pid, nowait = CLI$M_NOWAIT; X const $DESCRIPTOR(ghostview_desc, "GHOSTVIEW"); X const $DESCRIPTOR(display_desc, "DECW$DISPLAY"); X const $DESCRIPTOR(lnt_desc, "LNM$PROCESS"); X $DESCRIPTOR(in_desc, ""); X $DESCRIPTOR(out_desc, ""); X $DESCRIPTOR(lnm_desc, ""); X $DESCRIPTOR(cmd_desc, cmd); X ITEM_LIST_3_T(gv_list, 1) = `7B`7B`7B0, LNM$_STRING, buf, NULL`7D`7D, 0` V7D; X ITEM_LIST_3_T(dis_list, 1) = `7B`7B`7B0, LNM$_STRING, NULL, NULL`7D`7D, V 0`7D; X ITEM_LIST_3_T(dvi_list, 1) = `7B`7B`7B64, DVI$_DEVNAM, NULL, NULL`7D`7D, V 0`7D; X IOSB_GET_T dvi_iosb; X X /* X ** Stop interpreter if running X */ X StopInterpreter(w); X /* X ** Clear the window before starting a new interpreter. X */ X if (gvw->core.background_pixmap != XtUnspecifiedPixmap) `7B X`09XFillRectangle(XtDisplay(w), gvw->core.background_pixmap, X`09`09 gvw->ghostview.gc, X`09`09 0, 0, gvw->core.width, gvw->core.height); X `7D X XClearArea(XtDisplay(w), XtWindow(w), X`09 0, 0, gvw->core.width, gvw->core.height, False); X /* X ** Check for disabled. X */ X if (gvw->ghostview.disable_start) return; X /* X ** Build Ghostscript startup command X */ X strcpy(cmd, gvw->ghostview.interpreter); X strcat(cmd, " "); X if (gvw->ghostview.quiet) strcat(cmd, "\"-dQUIET\" "); X strcat(cmd, "\"-dNOPAUSE\" "); X if (gvw->ghostview.preload) `7B X`09strcat(cmd, gvw->ghostview.preload); X`09strcat(cmd, " "); X `7D X strcat(cmd, "\"-\" "); X X /* X ** Determine input source. X */ X if (gvw->ghostview.filename == NULL) `7B X`09/* X`09** Create a mailbox to feed input to Ghostscript and get its name. X`09*/ X`09ret = sys$crembx(0, &ch1, GV_BUFSIZ, GV_BUFSIZ, 0, 0, 0, 0); X`09ERR_SIGNAL(ret); X`09dvi_list.item`5B0`5D.buffer_p = in_mbx_name; X`09ret = sys$getdvi(0, ch1, 0, &dvi_list, &dvi_iosb, 0, 0, 0); X`09ERR_SIGNAL(ret); ERR_SIGNAL(dvi_iosb.status); X`09in_mbx_name`5B64`5D = '\0'; X`09in_desc.dsc$a_pointer = in_mbx_name; X`09in_desc.dsc$w_length = strlen(in_mbx_name); X `7D else `7B X`09/* X`09** Set up file name to give Ghostscript as standard input. X`09*/ X`09in_desc.dsc$a_pointer = gvw->ghostview.filename; X`09in_desc.dsc$w_length = strlen(gvw->ghostview.filename); X `7D X /* X ** Create mailbox to receive Ghostscript's output X */ X ret = sys$crembx(0, &ch2, GV_BUFSIZ, GV_BUFSIZ, 0, 0, 0, 0); X ERR_SIGNAL(ret); X dvi_list.item`5B0`5D.buffer_p = out_mbx_name; X ret = sys$getdvi(0, ch2, 0, &dvi_list, &dvi_iosb, 0, 0, 0); X ERR_SIGNAL(ret); ERR_SIGNAL(dvi_iosb.status); X out_mbx_name`5B64`5D = '\0'; X out_desc.dsc$a_pointer = out_mbx_name; X out_desc.dsc$w_length = strlen(out_mbx_name); X /* X ** Create GHOSTVIEW and DECW$DISPLAY logical names. X ** X ** We use CRELNM rather than LIB$SET_LOGICAL because we want these to be X ** user mode and go away when the program exits. It doesn't matter that V we X ** may set them multiple times, as with the mailbox logicals, since once X ** Ghostscript starts we don't need them any more. X */ X sprintf(buf, "%d", XtWindow(w)); X gv_list.item`5B0`5D.buffer_size = strlen(buf); X ret = sys$crelnm(0, &lnt_desc, &ghostview_desc, 0, &gv_list); X ERR_SIGNAL(ret); X dis_list.item`5B0`5D.buffer_p = XDisplayString(XtDisplay(w)); X dis_list.item`5B0`5D.buffer_size = strlen(dis_list.item`5B0`5D.buffer_p) V; X ret = sys$crelnm(0, &lnt_desc, &display_desc, 0, &dis_list); X ERR_SIGNAL(ret); X /* X ** Spawn Ghostscript process X */ X gvw->ghostview.changed = False; X gvw->ghostview.busy = True; X cmd_desc.dsc$w_length = strlen(cmd); X ret = lib$spawn(&cmd_desc, &in_desc, &out_desc, &nowait, 0, &pid, 0, 0, X`090, 0, 0, 0, 0); X ERR_SIGNAL(ret); X XDefineCursor(XtDisplay(gvw), XtWindow(gvw), gvw->ghostview.busy_cursor) V; X /* X ** Everything worked, initialize IOSBs and save info about interpretter. X */ X gvw->ghostview.interpreter_pid = pid; X if (gvw->ghostview.filename == NULL) `7B X`09gvw->ghostview.interpreter_input = ch1; X`09gvw->ghostview.interpreter_input_iosb`5B0`5D = 0; X `7D X gvw->ghostview.interpreter_output = ch2; X if (gvw->ghostview.output_buffer == NULL) `7B X`09gvw->ghostview.output_buffer = XtMalloc(GV_BUFSIZ); X `7D X GLInsert(gvw); X /* X ** Fake a completed I/O so Output will get called to queue the first I/O V. X */ X gvw->ghostview.interpreter_output_iosb`5B0`5D = SS$_NORMAL; X gvw->ghostview.interpreter_output_iosb`5B1`5D = -1; X IOComplete(); X`7D X X/* Stop the interperter, if present, and remove any Input sources. */ X/* Also reset the busy state. */ Xstatic void XStopInterpreter(w) X Widget w; X`7B X int ret; X `20 X GhostviewWidget gvw = (GhostviewWidget) w; X if (gvw->ghostview.interpreter_pid >= 0) `7B X`09ret = sys$delprc(&gvw->ghostview.interpreter_pid, 0); X`09if(ret != SS$_NORMAL && ret != SS$_NONEXPR)lib$signal(ret, 0, 0); X`09gvw->ghostview.interpreter_pid = -1; X `7D X if (gvw->ghostview.interpreter_input >= 0) `7B X`09(void) sys$dassgn(gvw->ghostview.interpreter_input); X`09gvw->ghostview.interpreter_input = -1; X`09while (gvw->ghostview.ps_input) `7B X`09 struct record_list *ps_old = gvw->ghostview.ps_input; X`09 gvw->ghostview.ps_input = ps_old->next; X`09 if (ps_old->close) fclose(ps_old->fp); X`09 XtFree((char *)ps_old); X`09`7D X `7D X if (gvw->ghostview.interpreter_output >= 0) `7B X`09(void) sys$dassgn(gvw->ghostview.interpreter_output); X`09gvw->ghostview.interpreter_output = -1; X `7D X gvw->ghostview.busy = False; X XDefineCursor(XtDisplay(gvw), XtWindow(gvw), gvw->ghostview.cursor); X GLRemove(gvw); X`7D X X/* GhostviewSendPS: X * Queue a portion of a PostScript file for output to ghostscript. X * fp: FILE * of the file in question. NOTE: if you have several X * Ghostview widgets reading from the same file. You must open X * a unique FILE * for each widget. X * SendPS does not actually send the PostScript, it merely queues it X * for output. X * begin: position in file (returned from ftell()) to start. X * len: number of bytes to write. X * X * If an interpreter is not running, nothing is queued and X * False is returned. X */ XBoolean XGhostviewSendPS(w, fp, begin, len, close) X Widget w; X FILE *fp; X long begin; X unsigned int len; X Bool close; X`7B X GhostviewWidget gvw = (GhostviewWidget) w; X struct record_list *ps_new; X X if (gvw->ghostview.interpreter_input < 0) return False; X if(len != 0)`7B X`09ps_new = (struct record_list *) XtMalloc(sizeof (struct record_list)); X`09ps_new->fp = fp; X`09ps_new->begin = begin; X`09ps_new->len = len; X`09ps_new->seek_needed = True; X`09ps_new->close = close; X`09ps_new->next = NULL; X X`09if (gvw->ghostview.input_buffer == NULL) `7B X`09 gvw->ghostview.input_buffer = XtMalloc(GV_BUFSIZ); X`09`7D X X`09if (gvw->ghostview.ps_input == NULL) `7B X`09 gvw->ghostview.bytes_left = len; X`09 gvw->ghostview.ps_input = ps_new; X`09 /* X`09 ** Fake a completed I/O so Input will get called to queue the X`09 ** first I/O. X`09 */ X`09 gvw->ghostview.interpreter_input_iosb`5B0`5D = SS$_NORMAL; X`09 gvw->ghostview.interpreter_input_iosb`5B1`5D = -1; X`09 IOComplete(); X`09`7D else `7B X`09 struct record_list *p = gvw->ghostview.ps_input; X`09 while (p->next != NULL) `7B X`09`09p = p->next; X`09 `7D X`09 p->next = ps_new; X`09`7D X `7D X return True; X`7D X#endif /* VMS */ $ CALL UNPACK GHOSTVIEW.C;1 1998451905 $ create 'f' X/* X * Ghostview.h -- Public header file for Ghostview widget. X * Copyright (C) 1992 Timothy O. Theisen X * X * This program is free software; you can redistribute it and/or modify X * it under the terms of the GNU General Public License as published by X * the Free Software Foundation; either version 2 of the License, or X * (at your option) any later version. X * X * This program is distributed in the hope that it will be useful, X * but WITHOUT ANY WARRANTY; without even the implied warranty of X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X * GNU General Public License for more details. X * X * You should have received a copy of the GNU General Public License X * along with this program; if not, write to the Free Software X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X * X * Author: Tim Theisen Systems Programmer X * Internet: tim@cs.wisc.edu Department of Computer Sciences X * UUCP: uwvax!tim University of Wisconsin-Madison X * Phone: (608)262-0438 1210 West Dayton Street X * FAX: (608)262-9777 Madison, WI 53706 X */ X X#ifndef _Ghostview_h X#define _Ghostview_h X/* Be sure that FILE* is defined */ X#include X X/**************************************************************** X * X * Ghostview widget X * X ****************************************************************/ X X/* Resources: X X Name`09`09 Class`09`09RepType`09`09Default Value X ----`09`09 -----`09`09-------`09`09------------- X background`09 Background`09`09Pixel`09`09XtDefaultBackground X border`09`09 BorderColor`09Pixel`09`09XtDefaultForeground X borderWidth`09 BorderWidth`09Dimension`091 X bottomMargin`09 Margin`09`09int`09`090 X busyCursor`09 Cursor`09`09Cursor`09`09watch X callback`09 Callback`09`09Pointer`09`09NULL X cursor`09`09 Cursor`09`09Cursor`09`09crosshair X destroyCallback Callback`09`09Pointer`09`09NULL X filename`09 Filename`09`09String`09`09"-" X height`09`09 Height`09`09Dimension`090 X interpreter`09 Interpreter`09String`09`09"gs" X leftMargin`09 Margin`09`09int`09`090 X llx`09`09 BoundingBox`09Int`09`090 X lly`09`09 BoundingBox`09Int`09`090 X mappedWhenManaged MappedWhenManaged`09Boolean`09`09True X messageCallback Callback`09`09Pointer`09`09NULL X orientation`09 Orientation`09PageOrientation`09Portrait X outputCallback Callback`09`09Pointer`09`09NULL X preload`09 Preload`09`09String`09`09NULL X quiet`09`09 Quiet`09`09Boolean`09`09True X rightMargin`09 Margin`09`09int`09`090 X topMargin`09 Margin`09`09int`09`090 X urx`09`09 BoundingBox`09Int`09`09612 X ury`09`09 BoundingBox`09Int`09`09792 X useBackingPixmap UseBackingPixmap`09Boolean`09`09True X width`09`09 Width`09`09Dimension`090 X x`09`09 Position`09`09Position`090 X xdpi`09`09 Resolution`09`09Float`09`09** X y`09`09 Position`09`09Position`090 X ydpi`09`09 Resolution`09`09Float`09`09** X X ** automatically calculated from display parameters if width and X height are not set. X X*/ X X/* define any special resource names here that are not in V */ X X#define XtNbusyCursor "busyCursor" X#define XtNcursor "cursor" X#define XtNfilename "filename" X#define XtNinterpreter "interpreter" X#define XtNmessageCallback "messageCallback" X#define XtNoutputCallback "outputCallback" X#define XtNpreload "preload" X#define XtNquiet "quiet" X#define XtNllx "llx" X#define XtNlly "lly" X#define XtNurx "urx" X#define XtNury "ury" X#define XtNuseBackingPixmap "useBackingPixmap" X#define XtNxdpi "xdpi" X#define XtNydpi "ydpi" X#define XtNrightMargin "rightMargin" X#define XtNleftMargin "leftMargin" X#define XtNbottomMargin "bottomMargin" X#define XtNtopMargin "topMargin" X X#define XtCBoundingBox "BoundingBox" X#define XtCFilename "Filename" X#define XtCInterpreter "Interpreter" X#define XtCPreload "Preload" X#define XtCQuiet "Quiet" X#define XtCResolution "Resolution" X#define XtCUseBackingPixmap "UseBackingPixmap" X X#define XtRPageOrientation "PageOrientation" X X/*************************************************************************** V*** X * XmuCvtStringToPageOrientation X */ X/* Number represents clockwise rotation of the paper in degrees */ Xtypedef enum `7B X XtPageOrientationPortrait`09= 0,`09/* Normal portrait orientation */ X XtPageOrientationLandscape`09= 90,`09/* Normal landscape orientation */ X XtPageOrientationUpsideDown = 180,`09/* Don't think this will be used mu Vch */ X XtPageOrientationSeascape`09= 270`09/* Landscape rotated the other way * V/ X`7D XtPageOrientation; X#define XtEportrait "portrait" X#define XtElandscape "landscape" X#define XtEupsideDown "upside-down" X#define XtEseascape "seascape" X#define XtRPageOrientation "PageOrientation" Xextern Boolean XmuCvtStringToPageOrientation(); X X/* declare specific GhostviewWidget class and instance datatypes */ X Xtypedef struct _GhostviewClassRec*`09GhostviewWidgetClass; Xtypedef struct _GhostviewRec*`09`09GhostviewWidget; X X/* declare the class constant */ X Xextern WidgetClass ghostviewWidgetClass; X X/* Public routines */ X Xextern void GhostviewEnableInterpreter( X#if NeedFunctionPrototypes X Widget`09/* w */ X#endif X); X Xextern void GhostviewDisableInterpreter( X#if NeedFunctionPrototypes X Widget`09/* w */ X#endif X); X Xextern Boolean GhostviewIsInterpreterReady( X#if NeedFunctionPrototypes X Widget`09/* w */ X#endif X); X Xextern Boolean GhostviewIsInterpreterRunning( X#if NeedFunctionPrototypes X Widget`09/* w */ X#endif X); X Xextern Pixmap GhostviewGetBackingPixmap( X#if NeedFunctionPrototypes X Widget`09/* w */ X#endif X); X Xextern Boolean GhostviewSendPS( X#if NeedFunctionPrototypes X Widget`09/* widget */, X FILE*`09/* fp */, X long`09/* begin */, X unsigned int`09/* len */, X Bool`09/* close */ X#endif X); X Xextern Boolean GhostviewNextPage( X#if NeedFunctionPrototypes X Widget`09/* w */ X#endif X); X X/* The structure returned by the regular callback */ X Xtypedef struct _GhostviewReturnStruct `7B X int width, height; X int`09psx, psy; X float xdpi, ydpi; X`7D GhostviewReturnStruct; X X#endif /* _Ghostview_h */ $ CALL UNPACK GHOSTVIEW.H;1 1176915432 $ create 'f' X.\" ghostview.man -- Man page for ghostview application X.\" Copyright (C) 1992 Timothy O. Theisen X.\"`20 X.\" This program is free software; you can redistribute it and/or modify X.\" it under the terms of the GNU General Public License as published by X.\" the Free Software Foundation; either version 2 of the License, or X.\" (at your option) any later version. X.\"`20 X.\" This program is distributed in the hope that it will be useful, X.\" but WITHOUT ANY WARRANTY; without even the implied warranty of X.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X.\" GNU General Public License for more details. X.\"`20 X.\" You should have received a copy of the GNU General Public License X.\" along with this program; if not, write to the Free Software X.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X.\"`20 X.\" Author: Tim Theisen Systems Programmer X.\" Internet: tim@cs.wisc.edu Department of Computer Sciences X.\" UUCP: uwvax!tim University of Wisconsin-Madison X.\" Phone: (608)262-0438 1210 West Dayton Street X.\" FAX: (608)262-9777 Madison, WI 53706 X.TH GHOSTVIEW 1 X.SH NAME X\fIghostview\fR \- View PostScript documents using ghostscript X.SH SYNOPSIS X.B ghostview X`5Bfilename`5D X.br Xor X.br X.B ghostview X`5B\-staticgray`5D `5B\-grayscale`5D X`5B\-staticcolor`5D `5B\-pseudocolor`5D `5B\-truecolor`5D `5B\-directcolor`5 VD X`5B\-`5Bno`5Dinstall`5D `5B\-`5Bno`5Dprivate`5D `5B\-`5Bno`5Dcenter`5D X`5B\-`5Bno`5Dtitle`5D `5B\-`5Bno`5Ddate`5D `5B\-`5Bno`5Dlocator`5D `5B\-`5Bn Vo`5Dlabels`5D X`5B\-resolution\ \fIdpi\fP`5D `5B\-dpi\ \fIdpi\fP`5D X`5B\-xdpi\ \fIdpi\fP`5D `5B\-ydpi\ \fIdpi\fP`5D X`5B\-`5Bno`5Dquiet`5D `5B\-preload\ \fIfile\fP`5D `5B\-magstep\ \fIn\fP`5D X`5B\-portrait`5D `5B\-landscape`5D `5B\-upsidedown`5D `5B\-seascape`5D X`5B\-letter`5D `5B\-tabloid`5D `5B\-ledger`5D `5B\-legal`5D `5B\-statement`5 VD X`5B\-executive`5D `5B\-a3`5D `5B\-a4`5D `5B\-a5`5D `5B\-b4`5D `5B\-b5`5D X`5B\-folio`5D `5B\-quarto`5D `5B\-10x14`5D X`5B\-force`5D `5B\-forceorientation`5D `5B\-forcemedia`5D X`5B\-`5Bno`5Dswap`5D `5B\-`5Bno`5Dopenwindows`5D `5B\-`5Bno`5Dncdwm`5D X`5B\-page \fIlabel\fP`5D `5B\-\fItoolkitoption\fR\ ...`5D X`5Bfilename`5D X.SH DESCRIPTION XThe \fIghostview\fP program provides an X11 user interface for Xthe \fIghostscript\fP interpreter. X\fIGhostview\fP and \fIghostscript\fP function as two cooperating programs. X\fIGhostview\fP creates the viewing window and \fIghostscript\fP draws in it V. X.PP XDon't be alarmed by the number of options. XGenerally, one invokes \fIghostview\fP with just one parameter, the name of Xthe file to be previewed. If the filename is `60`60-'', \fIghostview\fP wil Vl read Xfrom `60`60stdin''. XThe options provide a way to set X resources from Xthe command line for a single invocation of \fIghostview\fP. For that reaso Vn, Xdiscussion of the options is delayed until after the X resources are discuss Ved. X.SH MAIN WINDOW XThe main viewport is on the right side of the main window. XIf the page is larger than the viewport, there will be scroll bars along the Xbottom and right edges of the viewport. XTo the left of the viewport is the table of contents. XIf the PostScript file has document structuring convention (DSC) comments, Xthe table of context will display the page labels (i.e. usually page numbers V). XTo the left of the table of contents is the menu box. XEach push button brings up a popup menu. XOver the menu box and table of contents there are three optional labels Xthat contain the title, date, and locator. XThe title label contains the document title found in the DSC comments. XIf no title can be found, the filename is used in its place. XThe date label contains the document date found in the DSC comments. XIf no date can be found, the last modified date of the file is Xused in its place. XSince the title and date labels may be clipped by the main viewport, Xthe date and title labels are push buttons that bring up a popup window Xwith the title or date. XThese popup windows also show the `60`60document'' icon when the displayed s Vtring Xcomes from the DSC comments. XThe locator shows the location of the cursor in the viewport. XThe location is expressed in the default user coordinate system. XThe locator is useful for measuring bounding boxes. X.PP XWithin the main viewport the mouse cursor is a `60`60target'' when X\fIghostscript\fP is doing work. XThe cursor is a `60`60cross hair'' when \fIghostscript\fP is idle. XWhen moving to another page in a document, it is generally best to wait Xfor \fIghostscript\fP to become idle. Otherwise, the current \fIghostscript V\fP process Xmust be killed and the overhead of reading the prologue is incurred again. X.PP X\fIGhostview\fP will check to see if the file has been modified just before Xit displays a page or when the application is deiconified. XIf the file has changed, it will reopen the file. X.PP XClicking anywhere within the viewport will popup a zoom window. XThe window is centered about the location that was clicked. XClicking with the first mouse button pops up a low resolution zoom window. XClicking with the second mouse button pops up a medium resolution zoom windo Vw. XClicking with the third mouse button pops up a high resolution zoom window. XThe cursor in the zoom window will display a `60`60target'' or `60`60cross h Vair'' Xdepending on the state of \fIghostscript\fP. XThe locator reports the position of the cursor in the zoom windows Xas well as the main viewport. X.PP XIn the table of contents, the first and third mouse button functions exactly Xas they do in a Text widget. XThat is the first mouse button selects text and the third mouse button Xextends selections. XHowever, clicking on a page label with the second mouse button will cause Xthat page to be shown. XThe page being displayed is marked with a '<' in the right margin of Xthe table of contents. X.SH POPUP WINDOWS XThe are several additional windows that may appear. XThe \fIcopyright\fP window will appear whenever copyright information is Xrequested. XThe \fIinformation\fP window appears whenever the \fIghostscript\fP process Xwrites to `60`60stdout'' or `60`60stderr''. XWhenever there is an error in the PostScript program, the stack trace will Xappear in this window. XWhen \fIghostscript\fP is invoked without the quiet option, informational me Vssage Xregarding the state of \fIghostscript\fP will appear in the \fIinformation\f VP window. XThe \fIcopyright\fP and \fIinformation\fP windows can be dismissed by pushin Vg Xthe `60`60Dismiss'' button. X.PP XThe \fISelect File\fP dialog widget will appear when you wish to open or sav Ve Xa file. XThe X.I Select File Xdialog widget Xallows an X11 user to select a file by typing the path or by browsing in Xdirectory listings and selecting entries with the mouse. X.PP XThe space bar can be pressed to complete filenames, and tilde is used for ho Vme Xdirectories. XAll the usual key bindings can be used in the text widget, except for Return Xand Control\-M, which are equivalent to pressing the OK button. XThe path can be scrolled using the large horizontal scroll bar, or by moving Xthe insertion cursor in the text widget. XThe directory entries can be scrolled using the vertical scroll bars, or by Xholding a mouse button down and moving out of the listing. XThe scrolling speed varies with the distance from the listing. X.PP XThe directory entries are terminated with special characters that show the Xtype of entry, similar to the X.I \-F Xoption of X.IR ls (1). X.PP XThe X.I Select File Xdialog widget is in total control until is pops down. XNo other controls in \fIghostview\fP will be active during this time. X.SH MENUS XThere are five buttons in the menu box. They are the X\fBFile\fP, \fBPage\fP, \fBMagstep\fP, \fBOrientation\fP, and \fBMedia\fP Xbuttons. XThere are keyboard accelerators for most of the popup menus. Be sure Xto read the keyboard accelerator section. X.IP \fBFile\fB 1i XThis popup menu controls file access: X.RS 1i X.IP "\fBOpen...\fP" 1i XPops up the Select File window in preparation to open a file. XThe Select File widget is in total control until it pops down. XOpens the file for viewing. X.IP "\fBReopen\fP" 1i XReopens the current file. X.IP "\fBPrint...\fP" 1i XPops up a dialog widget to ask for the printer name. XSends the whole document to the printer. X.IP "\fBPrint marked pages...\fP" 1i XPops up a dialog widget to ask for the printer name. XSends the marked pages to the printer. XIf no pages have been marked, the mark procedure is called before Xprinting and then the unmark procedure is called after printing. X.IP "\fBSave marked pages...\fP" 1i XPops up the Select File window in preparation to save a file. XThe Select File widget is in total control until it pops down. XSaves the marked pages in the selected file. XIf no pages have been marked, the mark procedure is called before Xsaving and then the unmark procedure is called after saving. X.IP "\fBCopyright...\fP" 1i XPops up the \fIcopyright\fP window. X.IP "\fBQuit\fP" 1i XCauses \fIghostview\fP to exit. X.RS -1i X.IP \fBPage\fP 1i XThis popup menu controls page access: X.RS 1i X.IP "\fBNext\fP" 1i XDisplay the next page. X.IP "\fBRedisplay\fP" 1i XDisplay the current page. X.IP "\fBPrevious\fP" 1i XDisplay the previous page. X.IP "\fBCenter\fP" 1i XCenter the page in the viewport. X.IP "\fBMark\fP" 1i XMark the pages that have been selected in the table of contents. XIf no pages have been selected, mark the current page. X.IP "\fBUnmark\fP" 1i +-+-+-+-+-+-+-+- END OF PART 4 +-+-+-+-+-+-+-+- Return-Path: mccall!tp@!mccall.com Delivery-Date: Tue, 27 Oct 92 19:12:12 -0600 Return-Path: mccall!tp@!mccall.com Received: from cs.wisc.edu by appenzell.cs.wisc.edu; Tue, 27 Oct 92 19:12:05 -0600 Received: from depot.cis.ksu.edu by cs.wisc.edu; Tue, 27 Oct 92 19:12:01 -0600 Return-Path: Received: from mccall.UUCP by depot.cis.ksu.edu UUCP (5.65a) id AA18638; Tue, 27 Oct 92 19:11:09 -0600 Received: by mccall.com (DECUS UUCP /1.3-1/2.5/); Tue, 27 Oct 92 19:00:03 CST Received: by mccall.com (MX V3.1C) id 12841; Tue, 27 Oct 1992 18:59:56 CST Date: Tue, 27 Oct 1992 18:59:58 CST From: Terry Poot To: tim Message-Id: <00962BB2.75D70FC0.12841@mccall.com> Subject: Ghostview for VMS 05/14 -+-+-+-+-+-+-+-+ START OF PART 5 -+-+-+-+-+-+-+-+ XUnmark the pages that have been selected in the table of contents. XIf no pages have been selected, unmark the current page. X.RS -1i X.IP \fBMagstep\fP 1i XThe Magstep menu controls the magnification at which the document is Xviewed. XThe default magstep of 0 implies no magnification (i.e. the size on Xthe screen should match the size on paper). X\fIGhostview\fP borrows the notion of magstep from TeX. The magnification Xis defined to be 1.2**magstep. At magstep 1, the document is magnified Xby 1.2. At magstep -1, the document is reduced by 1.2. XThe Magstep menu lists values from -5 to 5. X.IP \fBOrientation\fP 1i XThe Orientation menu controls the display orientation. XA `60`60dot'' appears in front of the current orientation. XThe first mouse button sets the default orientation. XThe DSC comments may specify an orientation of Portrait or Landscape that Xoverrides the default. XIn this case, a "document" appears in front of the current orientation. XThe second mouse button can be used to `60`60force'' the orientation on Xa document to override the DSC comments. XIf an orientation is being forced, then a `60`60tie fighter'' will appear in Xfront of the current orientation. X.RS 1i X.IP "\fBPortrait\fP" 1i XSet the orientation to Portrait. This implies no rotation. XA portrait orientation indicates that the longest edge of the paper Xis parallel to the vertical (y) axis. X.IP "\fBLandscape\fP" 1i XSet the orientation to Landscape. This implies a clockwise rotation of the Xpaper by 90 degrees. XA landscape orientation indicates that the longest edge of the paper Xis parallel to the horizontal (x) axis. X.IP "\fBUpside\-down\fP" 1i XSet the orientation to Upside\-Down. X.IP "\fBSeascape\fP" 1i XSet the orientation to Seascape. This implies a counterclockwise rotation Xof the paper by 90 degrees. X.IP "\fBSwap Landscape\fP" 1i XSwap the meaning of Landscape and Seascape. Most of the Landscape documents Xthat I have encountered require a 90 clockwise rotation of the paper to Xview. However, there is no standard and some documents need to be rotated Xthe other way. The swap landscape button allows \fIghostview\fP to automati Vcally Xrotate the document the right way in response to the \fB%%Orientation\fP com Vment Xin the PostScript file. X.RS -1i X.IP \fBMedia\fP 1i XThe entries on the Media menu set the page media. XMedia defined in the document appear at the beginning of the menu Xseparated by a line from the standard media. XA `60`60dot'' appears in front of the current media. XThe first mouse button sets the default media. XThe DSC comments may specify the page media that overrides the default. XIn this case, a "document" appears in front of the current media. XThe second mouse button can be used to `60`60force'' the media on Xa document to override the DSC comments. XForcing the media on an EPSF figure will override the Bounding Box. XThis makes is easy to view a figure with an incorrect \fB%%BoundingBox\fP co Vmment. XIf a media is being forced, then a `60`60tie fighter'' will appear in Xfront of the current media. X.sp XHere are the standard media names and their sizes. XThe size is given as the width and height in PostScript points. X.ta 1.5i 3.0i X.RS 1i X.nf X\fBLetter\fP`09 612 x 792`09(8.5 x 11 in.) X\fBTabloid\fP`09 792 x 1224`09(11 x 17 in.) X\fBLedger\fP`091224 x 792`09(17 x 11 in.) X\fBLegal\fP`09 612 x 1008`09(8.5 x 14 in.) X\fBStatement\fP`09 396 x 612`09(5.5 x 8.5 in.) X\fBExecutive\fP`09 540 x 720`09(7.5 x 10 in.) X\fBA3\fP`09 842 x 1190 X\fBA4\fP`09 595 x 842 X\fBA5\fP`09 420 x 595 X\fBB4\fP`09 729 x 1032 X\fBB5\fP`09 516 x 729 X\fBFolio\fP`09 612 x 936`09(8.5 x 13 in.) X\fBQuarto\fP`09 610 x 780 X\fB10x14\fP`09 720 x 1008`09(10 x 14 in.) X.fi X.SH KEYBOARD ACCELERATORS XMost of the popup menu commands have an equivalent action that can be Xinvoked from the keyboard. The popup menu entry must be sensitive (i.e. not V grayed Xout) for the action to have effect. Here is the default keyboard binding: X.IP \fBQ\fP 1i XBound to \fBGhostviewQuit()\fP which is Xequivalent to pushing the \fBQuit\fP menu button on the \fBGhostview\fP menu V. X.IP \fBO\fP 1i XBound to \fBGhostviewOpen()\fP which is Xequivalent to pushing the \fBOpen...\fP menu button on the \fBFile\fP menu. X.IP \fBR\fP 1i XBound to \fBGhostviewReopen()\fP which is Xequivalent to pushing the \fBReopen\fP menu button on the \fBFile\fP menu. X.IP \fBS\fP 1i XBound to \fBGhostviewSave()\fP which is Xequivalent to pushing the \fBSave marked pages...\fP menu button on the \fBF Vile\fP menu. X.IP \fBP\fP 1i XBound to \fBGhostviewPrintMarked()\fP which is Xequivalent to pushing the \fBPrint marked pages...\fP menu button on the \fB VFile\fP menu. X.IP \fBShift\-P\fP 1i XBound to \fBGhostviewPrintWhole()\fP which is Xequivalent to pushing the \fBPrint...\fP menu button on the \fBFile\fP menu. X.IP "\fBBackSpace\fP, \fBDelete\fP, \fBPrior\fP, \fBB\fP" 1i XBound to \fBGhostviewPrevious()\fP which is Xequivalent to pushing the \fBPrevious\fP menu button on the \fBPage\fP menu. X.IP "\fBspace\fP, \fBReturn\fP, \fBNext\fP, \fBF\fP" 1i XBound to \fBGhostviewNext()\fP which is Xequivalent to pushing the \fBNext\fP menu button on the \fBPage\fP menu. X.IP "\fBperiod\fP, \fBCtrl\-L\fP" 1i XBound to \fBGhostviewShow()\fP which is Xequivalent to pushing the \fBRedisplay\fP menu button on the \fBPage\fP menu V. X.IP \fBM\fP 1i XBound to \fBGhostviewMark()\fP which is Xequivalent to pushing the \fBMark\fP menu button on the \fBPage\fP menu. X.IP \fBN\fP 1i XBound to \fBGhostviewUnMark()\fP which is Xequivalent to pushing the \fBUnmark\fP menu button on the \fBPage\fP menu. X.IP \fB0\fP 1i XBound to \fBGhostviewMagstep(0)\fP which is Xequivalent to pushing the \fB0\fP menu button on the \fBMagstep\fP menu. X.IP \fB1\fP 1i XBound to \fBGhostviewMagstep(1)\fP which is Xequivalent to pushing the \fB1\fP menu button on the \fBMagstep\fP menu. X.IP \fB2\fP 1i XBound to \fBGhostviewMagstep(2)\fP which is Xequivalent to pushing the \fB2\fP menu button on the \fBMagstep\fP menu. X.IP \fB3\fP 1i XBound to \fBGhostviewMagstep(3)\fP which is Xequivalent to pushing the \fB3\fP menu button on the \fBMagstep\fP menu. X.IP \fB4\fP 1i XBound to \fBGhostviewMagstep(4)\fP which is Xequivalent to pushing the \fB4\fP menu button on the \fBMagstep\fP menu. X.IP \fB5\fP 1i XBound to \fBGhostviewMagstep(5)\fP which is Xequivalent to pushing the \fB5\fP menu button on the \fBMagstep\fP menu. X.IP \fB+\fP 1i XBound to \fBGhostviewIncreaseMagstep()\fP which increases the magstep by 1. X.IP \fB-\fP 1i XBound to \fBGhostviewDecreaseMagstep()\fP which decreases the magstep by 1. X.IP \fBU\fP 1i XBound to \fBGhostviewUp()\fP which scrolls the main viewport up. X.IP \fBD\fP 1i XBound to \fBGhostviewDown()\fP which scrolls the main viewport down. X.IP \fBH\fP 1i XBound to \fBGhostviewLeft()\fP which scrolls the main viewport left. X.IP \fBJ\fP 1i XBound to \fBGhostviewDown()\fP which scrolls the main viewport down. X.IP \fBK\fP 1i XBound to \fBGhostviewUp()\fP which scrolls the main viewport up. X.IP \fBL\fP 1i XBound to \fBGhostviewRight()\fP which scrolls the main viewport right. X.IP "\fBUp\fP (arrow)" 1i XBound to \fBGhostviewDefault() GhostviewSetOrientation(portrait)\fP which is Xequivalent to pushing \fBPortrait\fP with the first mouse button on the X\fBOrientation\fP menu. X.IP "\fBRight\fP (arrow)" 1i XBound to \fBGhostviewDefault() GhostviewSetOrientation(landscape)\fP which i Vs Xequivalent to pushing \fBLandscape\fP with the first mouse button on the X\fBOrientation\fP menu. X.IP "\fBDown\fP (arrow)" 1i XBound to \fBGhostviewDefault() GhostviewSetOrientation(upside\-down)\fP whic Vh is Xequivalent to pushing \fBUpside\-down\fP with the first mouse button on the X\fBOrientation\fP menu. X.IP "\fBLeft\fP (arrow)" 1i XBound to \fBGhostviewDefault() GhostviewSetOrientation(seascape)\fP which is Xequivalent to pushing \fBSeascape\fP with the first mouse button on the X\fBOrientation\fP menu. X.IP "\fBShift\-Up\fP (arrow)" 1i XBound to \fBGhostviewForce() GhostviewSetOrientation(portrait)\fP which is Xequivalent to pushing \fBPortrait\fP with the second mouse button on the X\fBOrientation\fP menu. X.IP "\fBShift\-Right\fP (arrow)" 1i XBound to \fBGhostviewForce() GhostviewSetOrientation(landscape)\fP which is Xequivalent to pushing \fBLandscape\fP with the second mouse button on the X\fBOrientation\fP menu. X.IP "\fBShift\-Down\fP (arrow)" 1i XBound to \fBGhostviewForce() GhostviewSetOrientation(upside\-down)\fP which V is Xequivalent to pushing \fBUpside\-down\fP with the second mouse button on the X\fBOrientation\fP menu. X.IP "\fBShift\-Left\fP (arrow)" 1i XBound to \fBGhostviewForce() GhostviewSetOrientation(seascape)\fP which is Xequivalent to pushing \fBSeascape\fP with the second mouse button on the X\fBOrientation\fP menu. X.SH ACTIONS XMost of the popup menu commands have an equivalent action that can be Xused in a translation. The popup menu entry must be sensitive (i.e. not gra Vyed Xout) for the action to have effect. Here is the list of actions: X.IP \fBGhostviewCopyright()\fP 1i XEquivalent to pushing the \fBCopyright...\fP menu button on the \fBGhostview V\fP menu. X.IP \fBGhostviewQuit()\fP 1i XEquivalent to pushing the \fBQuit\fP menu button on the \fBGhostview\fP menu V. X.IP \fBGhostviewOpen()\fP 1i XEquivalent to pushing the \fBOpen...\fP menu button on the \fBFile\fP menu. X.IP \fBGhostviewReopen()\fP 1i XEquivalent to pushing the \fBReopen\fP menu button on the \fBFile\fP menu. X.IP \fBGhostviewSave()\fP 1i XEquivalent to pushing the \fBSave marked pages...\fP menu button on the \fBF Vile\fP menu. X.IP \fBGhostviewPrintWhole()\fP 1i XEquivalent to pushing the \fBPrint...\fP menu button on the \fBFile\fP menu. X.IP \fBGhostviewPrintMarked()\fP 1i XEquivalent to pushing the \fBPrint marked pages...\fP menu button on the \fB VFile\fP menu. X.IP \fBGhostviewPrevious()\fP 1i XEquivalent to pushing the \fBPrevious\fP menu button on the \fBPage\fP menu. X.IP \fBGhostviewShow()\fP 1i XEquivalent to pushing the \fBRedisplay\fP menu button on the \fBPage\fP menu V. X.IP \fBGhostviewNext()\fP 1i XEquivalent to pushing the \fBNext\fP menu button on the \fBPage\fP menu. X.IP \fBGhostviewCenter()\fP 1i XEquivalent to pushing the \fBCenter\fP menu button on the \fBPage\fP menu. X.IP \fBGhostviewMark()\fP 1i XEquivalent to pushing the \fBMark\fP menu button on the \fBPage\fP menu. X.IP \fBGhostviewUnmark()\fP 1i XEquivalent to pushing the \fBUnmark\fP menu button on the \fBPage\fP menu. X.IP \fBGhostviewSetMagstep(magstep)\fP 1i XSets the magstep. The parameter must be an integer. X.IP \fBGhostviewIncreaseMagstep()\fP 1i XIncreases magstep by one. X.IP \fBGhostviewDecreaseMagstep()\fP 1i XDecreases magstep by one. X.IP \fBGhostviewSetOrientation(orientation)\fP 1i XSet the orientation to the passed parameter. The parameter must be X\fBportrait\fP, \fBlandscape\fP, \fBupside\-down\fP, or \fBseascape\fP. X.IP \fBGhostviewSwapLandscape()\fP 1i XEquivalent to pushing the \fBSwap Landscape\fP menu button on the \fBOrienta Vtion\fP menu. X.IP \fBGhostviewSetPageMedia(media\-name)\fP 1i XSets the media. The parameter should be either a media defined in the Xdocument or a standard media. X.IP \fBGhostviewDefault()\fP 1i XThe orientation or media being set is not forced on the document. XThis action is called before the action that sets the orientation Xor media. X.IP \fBGhostviewForce()\fP 1i XThe orientation or media being set is forced on the document. XThis action is called before the action that sets the orientation Xor media. X.IP \fBGhostviewDeleteWindow()\fP 1i XDestroy the current window. This provides a way to implement the Delete Win Vdow Xprotocol for window managers. X.IP \fBGhostviewDismiss()\fP 1i XPop down the current window. This provides a way to implement the Delete Wi Vndow Xprotocol for window managers. X.IP \fBGhostviewScrollUp()\fP 1i XScroll the main viewport up. X.IP \fBGhostviewScrollDown()\fP 1i XScroll the main viewport down. X.IP \fBGhostviewScrollLeft()\fP 1i XScroll the main viewport left. X.IP \fBGhostviewScrollRight()\fP 1i XScroll the main viewport right. X.IP \fBGhostviewEraseLocator()\fP 1i XUsed to erase the locator when leaving a Ghostview widget. X.IP \fBGhostviewCheckFile()\fP 1i XChecks to see if the file changed and refreshes the screen if necessary. X.SH APPLICATION RESOURCES XThe following application resources may be set to Xcontrol the default behavior of \fIghostview\fP. X.IP "\fBshowTitle (\fPclass\fB Labels)\fP" 1i XTells whether to display the \fB%%Title\fP comment. XThe default is `60`60true''. X.IP "\fBshowDate (\fPclass\fB Labels)\fP" 1i XTells whether to display the \fB%%Data\fP comment. XThe default is `60`60true''. X.IP "\fBshowLocator (\fPclass\fB Labels)\fP" 1i XTells whether to display the locator. XThe default is `60`60true''. X.IP "\fBinstallStdCmap (\fPclass\fB InstallStdCmap)\fP" 1i XTells whether to attempt to install a standard colormap. XThe default is `60`60false''. X.IP "\fBprivateCmap (\fPclass\fB PrivateCmap)\fP" 1i XTells whether to use a standard colormap that is not the default colormap. XThe default is `60`60false''. X.IP "\fBautoCenter (\fPclass\fB AutoCenter)\fP" 1i XTells whether to center the page within the viewport whenever the page size Xchanges. XThe default is `60`60true''. X.IP "\fBhorizonalMargin (\fPclass\fB Margin)\fP" 1i XTells how many pixels ghostview should reserve for window decorations Xin the horizontal direction. XThe default value is `60`6020''. X.IP "\fBverticalMargin (\fPclass\fB Margin)\fP" 1i XTells how many pixels ghostview should reserve for window decorations Xin the vertical direction. XThe default value is `60`6044''. X.IP "\fBminimumMagstep (\fPclass\fB Magstep)\fP" 1i XTells the smallest magstep to display. XThe default is `60`60-5''. X.IP "\fBmaximumMagstep (\fPclass\fB Magstep)\fP" 1i XTells the largest magstep to display. XThe default is `60`605''. X.IP "\fBmagstep (\fPclass\fB Magstep)\fP" 1i XSets the default magstep. XThe default is `60`600''. X.IP "\fBorientation (\fPclass\fB Orientation)\fP" 1i XSets the default orientation. XThe default is `60`60Portrait''. X.IP "\fBpage (\fPclass\fB Page)\fP" 1i XGives the initial page to display. This resource only affects the display Xof the file listed on the command line. XThe default is NULL. X.IP "\fBpageMedia (\fPclass\fB PageMedia)\fP" 1i XSets the default page media. XThe default is `60`60Letter''. X.IP "\fBforceOrientation (\fPclass\fB Force)\fP" 1i XTells whether to force the orientation on the document. XThe default is `60`60false''. X.IP "\fBforcePageMedia (\fPclass\fB Force)\fP" 1i XTells whether to force the page media on the document. XThe default is `60`60false''. X.IP "\fBswapLandscape (\fPclass\fB SwapLandscape)\fP" 1i XTells whether to swap the meaning of Landscape and Seascape. XThe default is `60`60false''. X.IP "\fBprintCommand (\fPclass\fB PrintCommand)\fP" 1i XSets the command used for printing. XThe printer environment variable is set to the desired printer Xand then this command is executed using popen. This command should Xread from `60`60stdin'' and send the file to the appropriate printer. XThe default value is `60`60lpr'' for BSD and `60`60lp'' for System V. X.IP "\fBprinterVariable (\fPclass\fB PrinterVariable)\fP" 1i XGives the name of the printer environment variable. XThe default value is `60`60PRINTER'' for BSD and `60`60LPDEST'' for System V V. X.IP "\fBdefaultPrinter (\fPclass\fB DefaultPrinter)\fP" 1i XGives the printer name to use when the printer environment variable is not s Vet. XThe default value is NULL. X.IP "\fBprintPrompt (\fPclass\fB PrintPrompt)\fP" 1i XSets the prompt used to ask for the printer name. XThe default value is `60`60Printer\ Name:\ ''. X.IP "\fBprintFail (\fPclass\fB printFail)\fP" 1i XSets the string used to inform the user that the printer command failed. XThe default is `60`60"lpr"\ command\ failed.''. X.IP "\fBopenPrompt (\fPclass\fB OpenPrompt)\fP" 1i XSets the prompt used to ask for a file name to open. XThe default value is `60`60Open\ File:\ ''. X.IP "\fBopenFail (\fPclass\fB OpenFail)\fP" 1i XSets the string used to inform the user that the open failed. XThe default value is `60`60Cannot\ open\ file:\ ''. X.IP "\fBsavePrompt (\fPclass\fB SavePrompt)\fP" 1i XSets the prompt used to ask for a file name to save. XThe default value is `60`60Save\ File:\ ''. X.IP "\fBsaveFail (\fPclass\fB SaveFail)\fP" 1i XSets the string used to inform the user that the save failed. XThe default value is `60`60Cannot\ save\ file:\ ''. X.IP "\fBopenWindows (\fPclass\fB OpenWindows)\fP" 1i XOpenWindows servers sometimes cause error messages about bitmaps not being X1 bit deep. Turning on this resource avoids the problem by not using any Xbitmaps. You lose the functionality of having the current magstep, Xorientation and media marked on the popup menus. XThe default value is `60`60false''. X.IP "\fBncdwm (\fPclass\fB Ncdwm)\fP" 1i XThe Xt Intrinsics has a bug that causes bogus information in Xthe window manager size hints. \fINcdwm\fP and possibly other window manage Vrs Xget confused by the bogus information and make the window extremely small. X\fITwm\fP and \fImwm\fP ignore the bogus information. Turning on the resour Vce avoids Xthe problem with \fIncdwm\fP by doing things slightly differently. However, V this Xcan confuse other window managers such as \fImwm\fP. This bug is fixed in X V11R5 Xfix-10. XYou should only set this resource if you have the problem. XThe default value is `60`60false''. X.SH GHOSTVIEW WIDGET RESOURCES XCertain resources in the Ghostview widget may be set by the user. XThese selected resources are presented below. X.IP "\fBbusyCursor (\fPclass\fB Cursor)\fP" 1i XThe cursor shown when \fIghostscript\fP is rendering to the window. XThe busy cursor is set to the `60`60target'' by the application defaults. X.IP "\fBcursor (\fPclass\fB Cursor)\fP" 1i XThe cursor shown when \fIghostscript\fP is idle. XThe default cursor is the `60`60crosshair''. X.IP "\fBinterpreter (\fPclass\fB Interpreter)\fP" 1i XThe name of the executable to call to render the PostScript. XIt is convenient to set this resource to the path of an alternate Xversion of ghostscript for testing. XThe default value is `60`60gs''. X.IP "\fBpreload (\fPclass\fB Preload)\fP" 1i XFiles to load before the PostScript program. XIt is convenient to name files that preload fonts here for PostScript progra Vms Xthat continually reload fonts while rendering a page. XThe default is to not preload any files. X.IP "\fBquiet (\fPclass\fB Quiet)\fP" 1i XTells \fIghostscript\fP whether to produce informational messages. XThe default value is `60`60false''. X.IP "\fBuseBackingPixmap (\fPclass\fB UseBackingPixmap)\fP" 1i XTells whether to use a backing pixmap. If this resource Xis false, backing store is requested on the Ghostview window. XSome X servers have limited resources for large pixmaps. XAlso, some X servers' backing store is much faster Xthan using a backing pixmap. You should reset this resource if your XX server is one of the server types mentioned. XThe default value is `60`60true''. X.IP "\fBxdpi (\fPclass\fB Resolution)\fP" 1i XSets the X resolution of the window in dots per inch. XYou can use this resource to affect the main window. XZoom windows have their X dpi set explicitly in the program. XThe default value is calculated from the screen metrics. X.IP "\fBydpi (\fPclass\fB Resolution)\fP" 1i XSets the Y resolution of the window in dots per inch. XYou can use this resource to affect the main window. XZoom windows have their Y dpi set explicitly in the program. XThe default value is calculated from the screen metrics. X.SH GHOSTVIEW WIDGET ACTIONS X.IP "\fBnotify(width height xdpi ydpi)\fP" 1i XThe notify event is used by the ghostview application for the locator Xand popup zoom windows. XIf the width and height are 0, the event is user for the locator. XOtherwise, it triggers a popup zoom window. XThe default widht and height are 72. XThe default xdpi and ydpi are 300. XThe height will default to the width if the height is omitted. XThe xdpi will default to the xdpi if the ydpi is omitted. X.SH OPTIONS X.IP \fB\-staticgray\fP 1i XEquivalent to setting `60`60*Visual: StaticGray''. X.IP \fB\-grayscale\fP 1i XEquivalent to setting `60`60*Visual: GrayScale''. X.IP \fB\-staticcolor\fP 1i XEquivalent to setting `60`60*Visual: StaticColor''. X.IP \fB\-pseudocolor\fP 1i XEquivalent to setting `60`60*Visual: PseudoColor''. X.IP \fB\-truecolor\fP 1i XEquivalent to setting `60`60*Visual: TrueColor''. X.IP \fB\-directcolor\fP 1i XEquivalent to setting `60`60*Visual: DirectColor''. X.IP \fB\-install\fP 1i XEquivalent to setting `60`60Ghostview.installStdCmap: True''. X.IP \fB\-noinstall\fP 1i XEquivalent to setting `60`60Ghostview.installStdCmap: False''. X.IP \fB\-private\fP 1i XEquivalent to setting `60`60Ghostview.privateCmap: True''. X.IP \fB\-noprivate\fP 1i XEquivalent to setting `60`60Ghostview.privateCmap: False''. X.IP \fB\-center\fP 1i XEquivalent to setting `60`60Ghostview.autoCenter: True''. X.IP \fB\-nocenter\fP 1i XEquivalent to setting `60`60Ghostview.autoCenter: False''. X.IP \fB\-title\fP 1i XEquivalent to setting `60`60Ghostview.showTitle: True''. X.IP \fB\-notitle\fP 1i XEquivalent to setting `60`60Ghostview.showTitle: False''. X.IP \fB\-date\fP 1i XEquivalent to setting `60`60Ghostview.showDate: True''. X.IP \fB\-nodate\fP 1i XEquivalent to setting `60`60Ghostview.showDate: False''. X.IP \fB\-locator\fP 1i XEquivalent to setting `60`60Ghostview.showLocator: True''. X.IP \fB\-nolocator\fP 1i XEquivalent to setting `60`60Ghostview.showLocator: False''. X.IP \fB\-labels\fP 1i XEquivalent to setting `60`60Ghostview.Labels: True''. X.IP \fB\-nolabels\fP 1i XEquivalent to setting `60`60Ghostview.Labels: False''. X.IP \fB\-quiet\fP 1i XEquivalent to setting `60`60*Ghostview.quiet: True''. X.IP \fB\-noquiet\fP 1i XEquivalent to setting `60`60*Ghostview.quiet: False''. X.IP "\fB\-preload\fP \fIfile\fP" 1i XEquivalent to setting `60`60*Ghostview.preload: \fIfile\fP''. X.IP "\fB\-xdpi\fP \fIdpi\fP" 1i XEquivalent to setting `60`60*Ghostview.xdpi: \fIdpi\fP''. X.IP "\fB\-ydpi\fP \fIdpi\fP" 1i XEquivalent to setting `60`60*Ghostview.ydpi: \fIdpi\fP''. X.IP "\fB\-resolution\fP \fIdpi\fP" 1i XEquivalent to setting `60`60*Ghostview.Resolution: \fIdpi\fP''. X.IP "\fB\-dpi\fP \fIdpi\fP" 1i XEquivalent to setting `60`60*Ghostview.Resolution: \fIdpi\fP''. X.IP "\fB\-magstep\fP \fImagstep\fP" 1i XEquivalent to setting `60`60Ghostview.magstep: \fImagstep\fP''. X.IP \fB\-portrait\fP 1i XEquivalent to setting `60`60Ghostview.orientation: Portrait''. X.IP \fB\-landscape\fP 1i XEquivalent to setting `60`60Ghostview.orientation: Landscape''. X.IP \fB\-upsidedown\fP 1i XEquivalent to setting `60`60Ghostview.orientation: Upside\-down''. X.IP \fB\-seascape\fP 1i XEquivalent to setting `60`60Ghostview.orientation: Seascape''. X.IP \fB\-forceorientation\fP 1i XEquivalent to setting `60`60Ghostview.forceOrientation: True''. X.IP "\fB\-page\fP \fIlabel\fP" 1i XEquivalent to setting `60`60Ghostview.page: \fIlabel\fP''. X.IP \fB\-letter\fP 1i XEquivalent to setting `60`60Ghostview.pageMedia: Letter''. X.IP \fB\-tabloid\fP 1i XEquivalent to setting `60`60Ghostview.pageMedia: Tabloid''. X.IP \fB\-ledger\fP 1i XEquivalent to setting `60`60Ghostview.pageMedia: Ledger''. X.IP \fB\-legal\fP 1i XEquivalent to setting `60`60Ghostview.pageMedia: Legal''. X.IP \fB\-statement\fP 1i XEquivalent to setting `60`60Ghostview.pageMedia: Statement''. X.IP \fB\-executive\fP 1i XEquivalent to setting `60`60Ghostview.pageMedia: Executive''. X.IP \fB\-a3\fP 1i XEquivalent to setting `60`60Ghostview.pageMedia: A3''. X.IP \fB\-a4\fP 1i XEquivalent to setting `60`60Ghostview.pageMedia: A4''. X.IP \fB\-a5\fP 1i XEquivalent to setting `60`60Ghostview.pageMedia: A5''. X.IP \fB\-b4\fP 1i XEquivalent to setting `60`60Ghostview.pageMedia: B4''. X.IP \fB\-b5\fP 1i XEquivalent to setting `60`60Ghostview.pageMedia: B5''. X.IP \fB\-folio\fP 1i XEquivalent to setting `60`60Ghostview.pageMedia: Folio''. X.IP \fB\-quarto\fP 1i XEquivalent to setting `60`60Ghostview.pageMedia: Quarto''. X.IP \fB\-10x14\fP 1i XEquivalent to setting `60`60Ghostview.pageMedia: 10x14''. X.IP \fB\-forcemedia\fP 1i XEquivalent to setting `60`60Ghostview.forcePageMedia: True''. X.IP \fB\-force\fP 1i XEquivalent to setting `60`60Ghostview.Force: True''. X.IP \fB\-swap\fP 1i XEquivalent to setting `60`60Ghostview.swapLandscape: True''. X.IP \fB\-noswap\fP 1i XEquivalent to setting `60`60Ghostview.swapLandscape: False''. X.IP \fB\-openwindows\fP 1i XEquivalent to setting `60`60Ghostview.openWindows: True''. X.IP \fB\-noopenwindows\fP 1i XEquivalent to setting `60`60Ghostview.openWindows: False''. X.IP \fB\-ncdwm\fP 1i XEquivalent to setting `60`60Ghostview.ncdwm: True''. X.IP \fB\-noncdwm\fP 1i XEquivalent to setting `60`60Ghostview.ncdwm: False''. X.SH WIDGET HIERARCHY X.nf X\fIThe hierarchy of the ghostview application:\fR X.sp X.DT XGhostview ghostview X`09Form form X`09`09MenuButton titleButton X`09`09`09SimpleMenu menu X`09`09`09`09SmeBSB title X`09`09MenuButton dateButton X`09`09`09SimpleMenu menu X`09`09`09`09SmeBSB date X`09`09Label locator X`09`09Box box X`09`09`09MenuButton fileButton X`09`09`09`09SimpleMenu menu X`09`09`09`09`09SmeBSB open X`09`09`09`09`09SmeBSB reopen X`09`09`09`09`09SmeBSB printwhole X`09`09`09`09`09SmeBSB printmarked X`09`09`09`09`09SmeBSB save X`09`09`09`09`09SmeLine line X`09`09`09`09`09SmeBSB copyright X`09`09`09`09`09SmeBSB quit X`09`09`09MenuButton pageButton X`09`09`09`09SimpleMenu menu X`09`09`09`09`09SmeBSB next X`09`09`09`09`09SmeBSB show X`09`09`09`09`09SmeBSB prev X`09`09`09`09`09SmeLine line X`09`09`09`09`09SmeBSB center X`09`09`09`09`09SmeLine line X`09`09`09`09`09SmeBSB mark X`09`09`09`09`09SmeBSB unmark X`09`09`09MenuButton magstepButton X`09`09`09`09SimpleMenu menu X`09`09`09`09`09SmeBSB -5 X`09`09`09`09`09SmeBSB -4 X`09`09`09`09`09SmeBSB -3 X`09`09`09`09`09SmeBSB -2 X`09`09`09`09`09SmeBSB -1 X`09`09`09`09`09SmeBSB 0 X`09`09`09`09`09SmeBSB 1 X`09`09`09`09`09SmeBSB 2 X`09`09`09`09`09SmeBSB 3 X`09`09`09`09`09SmeBSB 4 X`09`09`09`09`09SmeBSB 5 X`09`09`09MenuButton orientationButton X`09`09`09`09SimpleMenu menu X`09`09`09`09`09SmeBSB portrait X`09`09`09`09`09SmeBSB landscape X`09`09`09`09`09SmeBSB upsidedown X`09`09`09`09`09SmeBSB seascape X`09`09`09`09`09SmeLine line X`09`09`09`09`09SmeBSB swap X`09`09`09MenuButton pagemediaButton X`09`09`09`09SimpleMenu menu X`09`09`09`09`09SmeBSB Letter X`09`09`09`09`09SmeBSB Tabloid X`09`09`09`09`09SmeBSB Ledger X`09`09`09`09`09SmeBSB Legal X`09`09`09`09`09SmeBSB Statement X`09`09`09`09`09SmeBSB Executive X`09`09`09`09`09SmeBSB A3 X`09`09`09`09`09SmeBSB A4 X`09`09`09`09`09SmeBSB A5 X`09`09`09`09`09SmeBSB B4 X`09`09`09`09`09SmeBSB B5 X`09`09`09`09`09SmeBSB Folio X`09`09`09`09`09SmeBSB Quarto X`09`09`09`09`09SmeBSB 10x14 X`09`09Text toc X`09`09Viewport pageview X`09`09`09Core clip X`09`09`09Ghostview page X`09`09`09Scrollbar horizontal X`09`09`09Scrollbar vertical X`09TopLevelShell information X`09`09Form form X`09`09`09Text text X`09`09`09Command dismiss X`09TopLevelShell copyright X`09`09Form form X`09`09`09Text text X`09`09`09Command dismiss X`09TransientShell popup X`09`09Form dialog X`09`09`09Label prompt X`09`09`09Text response X`09`09`09Command okay X`09`09`09Command cancel X`09TopLevelShell zoom X`09`09Form form X`09`09`09Ghostview page X`09`09`09Command dismiss X.sp X\fIThe hierarchy of the Select File dialog box:\fR X.sp XTransientShell selFile X`09Form selFileForm X`09`09Label selFilePrompt X`09`09Text selFileField X`09`09Scrollbar selFileHScroll X`09`09Composite selFileList1 X`09`09`09Scrollbar selFileVScroll X`09`09`09Scrollbar selFileHScroll X`09`09Composite selFileList2 X`09`09`09Scrollbar selFileVScroll X`09`09`09Scrollbar selFileHScroll X`09`09Composite selFileList3 X`09`09`09Scrollbar selFileVScroll X`09`09`09Scrollbar selFileHScroll X`09`09Command selFileOK X`09`09Command selFileCancel X.fi X.SH ENVIRONMENT X.IP \fBLPDEST\fP 1i XThe LPDEST environment variable gives the default printer destination Xon System V. X.IP \fBPRINTER\fP 1i XThe PRINTER environment variable gives the default printer destination Xon BSD. X.SH LIMITATIONS XIf the document does not begin with `60`60%!PS\-Adobe\-'', it does not Xclaim conformance to the document structuring convention. XWhen these documents are encountered, the functionality of \fIghostview\fP Xis limited to giving you scroll bars and a next page capability. XBecause there is no table of contents, Xskipping around the document and marking pages is impossible. X.PP XIf there is no table of contents for the document, the popup zoom Xwindow will always show the first page. X.SH BUGS XIf you find a bug, please send a bug report to ghostview@cs.wisc.edu. X.SH AUTHOR XCopyright (C) 1992 Timothy O. Theisen X.PP XThis program is free software; you can redistribute it and/or modify Xit under the terms of the GNU General Public License as published by Xthe Free Software Foundation; either version 2 of the License, or X(at your option) any later version. X.PP XThis program is distributed in the hope that it will be useful, Xbut WITHOUT ANY WARRANTY; without even the implied warranty of XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the XGNU General Public License for more details. X.PP XYou should have received a copy of the GNU General Public License Xalong with this program; if not, write to the Free Software XFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X.sp X.ta 1.0i 3.0i X.nf XAuthor:`09Tim Theisen`09Systems Programmer XInternet:`09tim@cs.wisc.edu`09Department of Computer Sciences XUUCP:`09uwvax!tim`09University of Wisconsin\-Madison XPhone:`09(608)262\-0438`091210 West Dayton Street XFAX:`09(608)262\-9777`09Madison, WI 53706 X.fi X.SH ACKNOWLEDGEMENTS XThe Select File widget contains the following copyright notice: X.PP XCopyright 1989 Software Research Associates, Inc., Tokyo, Japan X.PP XPermission to use, copy, modify, and distribute this software and its Xdocumentation for any purpose and without fee is hereby granted, provided Xthat the above copyright notice appear in all copies and that both that Xcopyright notice and this permission notice appear in supporting Xdocumentation, and that the name of Software Research Associates not be used Xin advertising or publicity pertaining to distribution of the software Xwithout specific, written prior permission. Software Research Associates Xmakes no representations about the suitability of this software for any Xpurpose. It is provided "as is" without express or implied warranty. X.PP XSOFTWARE RESEARCH ASSOCIATES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS XSOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, XIN NO EVENT SHALL SOFTWARE RESEARCH ASSOCIATES BE LIABLE FOR ANY SPECIAL, XINDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM XLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE XOR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR XPERFORMANCE OF THIS SOFTWARE. X.sp X.nf XAuthor:`09Erik M. van der Poel X`09Software Research Associates, Inc., Tokyo, Japan X`09erik@sra.co.jp X.fi $ CALL UNPACK GHOSTVIEW.MAN;1 258158459 $ create 'f' X%!PS-Adobe-1.0 X%%Creator: appenzell:tim (Tim Theisen,3375C,20438,2219620) X%%Title: stdin (ditroff) X%%CreationDate: Mon Oct 12 09:41:42 1992 X%%EndComments X% Start of psdit.pro -- prolog for ditroff translator X% Copyright (c) 1985,1987 Adobe Systems Incorporated. All Rights Reserved.`2 V0 X% GOVERNMENT END USERS: See Notice file in TranScript library directory X% -- probably /usr/lib/ps/Notice X% RCS: $Header: /src/misc/transcript/lib/RCS/psdit.pro,v 1.5 90/04/12 11:45: V51 tim Exp $ X/$DITroff 180 dict def $DITroff begin X X/DocumentInitState `5B matrix currentmatrix currentlinewidth currentlinecap Xcurrentlinejoin currentdash currentgray currentmiterlimit `5D cvx def X X%% Psfig additions X/startFig `7B X`09/SavedState save def X`09userdict maxlength dict begin X`09currentpoint transform X X`09DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap X`09`09setlinewidth setmatrix X X`09itransform moveto X X`09/ury exch def X`09/urx exch def X`09/lly exch def X`09/llx exch def X`09/y exch 72 mul resolution div def X`09/x exch 72 mul resolution div def X`09 X`09currentpoint /cy exch def /cx exch def X X`09/sx x urx llx sub div def `09% scaling for x X`09/sy y ury lly sub div def`09% scaling for y X X`09sx sy scale`09`09`09% scale by (sx,sy) X X`09cx sx div llx sub X`09cy sy div ury sub translate X`09 X`09/DefFigCTM matrix currentmatrix def X X`09/initmatrix `7B X`09`09DefFigCTM setmatrix X`09`7D def X`09/defaultmatrix `7B X`09`09DefFigCTM exch copy X`09`7D def X X`09/initgraphics `7B X`09`09DocumentInitState setmiterlimit setgray setdash`20 X`09`09`09setlinejoin setlinecap setlinewidth setmatrix X`09`09DefFigCTM setmatrix X`09`7D def X X`09/showpage `7B X`09`09initgraphics X`09`7D def X X`7D def X% Args are llx lly urx ury (in figure coordinates) X/clipFig `7B X`09currentpoint 6 2 roll X`09newpath 4 copy X`094 2 roll moveto X`096 -1 roll exch lineto X`09exch lineto X`09exch lineto X`09closepath clip X`09newpath X`09moveto X`7D def X% doclip, if called, will always be just after a `60startfig' X/doclip `7B llx lly urx ury clipFig `7D def X/endFig `7B X`09end SavedState restore X`7D def X/globalstart `7B X`09% Push details about the enviornment on the stack. X`09fontnum fontsize fontslant fontheight`20 X`09% firstpage`20 X`09mh my resolution slotno currentpoint`20 X`09pagesave restore gsave`20 X`7D def X/globalend `7B X`09grestore moveto X`09/slotno exch def /resolution exch def /my exch def X`09/mh exch def`20 X`09% /firstpage exch def X`09/fontheight exch def X`09/fontslant exch def /fontsize exch def /fontnum exch def X`09F X`09/pagesave save def X`7D def X X%% end XMOD additions X X/fontnum 1 def /fontsize 10 def /fontheight 10 def /fontslant 0 def X/xi `7B0 72 11 mul translate 72 resolution div dup neg scale 0 0 moveto X /fontnum 1 def /fontsize 10 def /fontheight 10 def /fontslant 0 def F X /pagesave save def`7Ddef X/xiG `7B0 72 14 mul translate 72 resolution div dup neg scale 0 0 moveto X /fontnum 1 def /fontsize 10 def /fontheight 10 def /fontslant 0 def F X /pagesave save def`7Ddef X/xiL `7B90 rotate 72 resolution div dup neg scale 0 0 moveto X /fontnum 1 def /fontsize 10 def /fontheight 10 def /fontslant 0 def F X /pagesave save def`7Ddef X/@manualfeed `7Bstatusdict /manualfeed true put`7Ddef X/PB`7Bsave /psv exch def currentpoint translate X resolution 72 div dup neg scale 0 0 moveto`7Ddef X/PE`7Bpsv restore`7Ddef X/m1 matrix def /m2 matrix def /m3 matrix def /oldmat matrix def X/tan`7Bdup sin exch cos div`7Dbind def X/point`7Bresolution 72 div mul`7Dbind def X/dround`09`7Btransform round exch round exch itransform`7Dbind def X/xT`7B/devname exch def`7Ddef X/xr`7B/mh exch def /my exch def /resolution exch def`7Ddef X/xp`7B`7Ddef X/xs`7Bdocsave restore end`7Ddef X/xt`7B`7Ddef X/xf`7B/fontname exch def /slotno exch def fontnames slotno get fontname eq n Vot X `7Bfonts slotno fontname findfont put fontnames slotno fontname put`7Dif`7D Vdef X/xH`7B/fontheight exch def F`7Dbind def X/xS`7B/fontslant exch def F`7Dbind def X/s`7B/fontsize exch def /fontheight fontsize def F`7Dbind def X/f`7B/fontnum exch def F`7Dbind def X/F`7Bfontheight 0 le `7B/fontheight fontsize def`7Dif X fonts fontnum get fontsize point 0 0 fontheight point neg 0 0 m1 astore X fontslant 0 ne`7B1 0 fontslant tan 1 0 0 m2 astore m3 concatmatrix`7Dif X makefont setfont .04 fontsize point mul 0 dround pop setlinewidth`7Dbind V def X/X`7Bexch currentpoint exch pop moveto show`7Dbind def X/N`7B3 1 roll moveto show`7Dbind def X/Y`7Bexch currentpoint pop exch moveto show`7Dbind def X/S /show load def X/ditpush`7B`7Ddef/ditpop`7B`7Ddef X/AX`7B3 -1 roll currentpoint exch pop moveto 0 exch ashow`7Dbind def X/AN`7B4 2 roll moveto 0 exch ashow`7Dbind def X/AY`7B3 -1 roll currentpoint pop exch moveto 0 exch ashow`7Dbind def X/AS`7B0 exch ashow`7Dbind def X/MX`7Bcurrentpoint exch pop moveto`7Dbind def X/MY`7Bcurrentpoint pop exch moveto`7Dbind def X/MXY /moveto load def X/cb`7Bpop`7Ddef`09% action on unknown char -- nothing for now X/n`7B`7Ddef/w`7B`7Ddef X/p`7Bpop showpage pagesave restore /pagesave save def`7Ddef X/abspoint`7Bcurrentpoint exch pop add exch currentpoint pop add exch`7Ddef X/dstroke`7Bcurrentpoint stroke moveto`7Dbind def X/Dg`7Bgsave`7Ddef X/Dgi`7Brlineto`7Ddef X/Dgl`7Bstroke grestore moveto`7Ddef X/Dl`7B2 copy gsave rlineto stroke grestore rmoveto`7Dbind def X/arcellipse`7Boldmat currentmatrix pop X currentpoint translate 1 diamv diamh div scale /rad diamh 2 div def X rad 0 rad -180 180 arc oldmat setmatrix`7Ddef X/Dc`7Bgsave dup /diamv exch def /diamh exch def arcellipse dstroke`20 X grestore diamh 0 rmoveto`7Ddef X/De`7Bgsave /diamv exch def /diamh exch def arcellipse dstroke X grestore diamh 0 rmoveto`7Ddef X/Da`7Bcurrentpoint /by exch def /bx exch def /fy exch def /fx exch def X /cy exch def /cx exch def /rad cx cx mul cy cy mul add sqrt def X /ang1 cy neg cx neg atan def /ang2 fy fx atan def cx bx add cy by add X 2 copy rad ang1 ang2 arcn stroke exch fx add exch fy add moveto`7Ddef X/Barray 200 array def % 200 values in a wiggle X/D`7E`7Bmark`7Ddef X/D`7E`7E`7Bcounttomark Barray exch 0 exch getinterval astore /Bcontrol exch V def pop X /Blen Bcontrol length def Blen 4 ge Blen 2 mod 0 eq and X `7BBcontrol 0 get Bcontrol 1 get abspoint /Ycont exch def /Xcont exch def X Bcontrol 0 2 copy get 2 mul put Bcontrol 1 2 copy get 2 mul put X Bcontrol Blen 2 sub 2 copy get 2 mul put X Bcontrol Blen 1 sub 2 copy get 2 mul put X /Ybi /Xbi currentpoint 3 1 roll def def 0 2 Blen 4 sub X `7B/i exch def X Bcontrol i get 3 div Bcontrol i 1 add get 3 div X Bcontrol i get 3 mul Bcontrol i 2 add get add 6 div X Bcontrol i 1 add get 3 mul Bcontrol i 3 add get add 6 div X /Xbi Xcont Bcontrol i 2 add get 2 div add def X /Ybi Ycont Bcontrol i 3 add get 2 div add def X /Xcont Xcont Bcontrol i 2 add get add def X /Ycont Ycont Bcontrol i 3 add get add def X Xbi currentpoint pop sub Ybi currentpoint exch pop sub rcurveto X `7Dfor dstroke`7Dif`7Ddef Xend X/ditstart`7B$DITroff begin X /nfonts 60 def`09`09`09% NFONTS makedev/ditroff dependent! X /fonts`5Bnfonts`7B0`7Drepeat`5Ddef X /fontnames`5Bnfonts`7B()`7Drepeat`5Ddef X/docsave save def X`7Ddef X X% character outcalls X/oc `7B/pswid exch def /cc exch def /name exch def X /ditwid pswid fontsize mul resolution mul 72000 div def X /ditsiz fontsize resolution mul 72 div def X ocprocs name known`7Bocprocs name get exec`7D`7Bname cb`7D X ifelse`7Ddef X/fractm `5B.65 0 0 .6 0 0`5D def X/fraction X `7B/fden exch def /fnum exch def gsave /cf currentfont def X cf fractm makefont setfont 0 .3 dm 2 copy neg rmoveto X fnum show rmoveto currentfont cf setfont(\244)show setfont fden show`20 X grestore ditwid 0 rmoveto`7D def X/oce `7Bgrestore ditwid 0 rmoveto`7Ddef X/dm `7Bditsiz mul`7Ddef X/ocprocs 50 dict def ocprocs begin X(14)`7B(1)(4)fraction`7Ddef X(12)`7B(1)(2)fraction`7Ddef X(34)`7B(3)(4)fraction`7Ddef X(13)`7B(1)(3)fraction`7Ddef X(23)`7B(2)(3)fraction`7Ddef X(18)`7B(1)(8)fraction`7Ddef X(38)`7B(3)(8)fraction`7Ddef X(58)`7B(5)(8)fraction`7Ddef X(78)`7B(7)(8)fraction`7Ddef X(sr)`7Bgsave .05 dm .16 dm rmoveto(\326)show oce`7Ddef X(is)`7Bgsave 0 .15 dm rmoveto(\362)show oce`7Ddef X(->)`7Bgsave 0 .02 dm rmoveto(\256)show oce`7Ddef X(<-)`7Bgsave 0 .02 dm rmoveto(\254)show oce`7Ddef X(==)`7Bgsave 0 .05 dm rmoveto(\272)show oce`7Ddef Xend X% DIThacks fonts for some special chars X50 dict dup begin X/FontType 3 def X/FontName /DIThacks def X/FontMatrix `5B.001 0.0 0.0 .001 0.0 0.0`5D def X/FontBBox `5B-220 -280 900 900`5D def% a lie but ... X/Encoding 256 array def X0 1 255`7BEncoding exch /.notdef put`7Dfor XEncoding X dup 8#040/space put %space X dup 8#110/rc put %right ceil X dup 8#111/lt put %left top curl X dup 8#112/bv put %bold vert X dup 8#113/lk put %left mid curl X dup 8#114/lb put %left bot curl X dup 8#115/rt put %right top curl X dup 8#116/rk put %right mid curl X dup 8#117/rb put %right bot curl X dup 8#120/rf put %right floor X dup 8#121/lf put %left floor X dup 8#122/lc put %left ceil X dup 8#140/sq put %square X dup 8#141/bx put %box X dup 8#142/ci put %circle X dup 8#143/br put %box rule X dup 8#144/rn put %root extender X dup 8#145/vr put %vertical rule X dup 8#146/ob put %outline bullet X dup 8#147/bu put %bullet X dup 8#150/ru put %rule X dup 8#151/ul put %underline X pop X/DITfd 100 dict def X/BuildChar`7B0 begin X /cc exch def /fd exch def X /charname fd /Encoding get cc get def X /charwid fd /Metrics get charname get def X /charproc fd /CharProcs get charname get def X charwid 0 fd /FontBBox get aload pop setcachedevice X 40 setlinewidth X newpath 0 0 moveto gsave charproc grestore X end`7Ddef X/BuildChar load 0 DITfd put X%/UniqueID 5 def X/CharProcs 50 dict def XCharProcs begin X/space`7B`7Ddef X/.notdef`7B`7Ddef X/ru`7B500 0 rls`7Ddef X/rn`7B0 750 moveto 500 0 rls`7Ddef X/vr`7B20 800 moveto 0 -770 rls`7Ddef X/bv`7B20 800 moveto 0 -1000 rls`7Ddef X/br`7B20 770 moveto 0 -1040 rls`7Ddef X/ul`7B0 -250 moveto 500 0 rls`7Ddef X/ob`7B200 250 rmoveto currentpoint newpath 200 0 360 arc closepath stroke`7D Vdef X/bu`7B200 250 rmoveto currentpoint newpath 200 0 360 arc closepath fill`7Dde Vf X/sq`7B80 0 rmoveto currentpoint dround newpath moveto X 640 0 rlineto 0 640 rlineto -640 0 rlineto closepath stroke`7Ddef X/bx`7B80 0 rmoveto currentpoint dround newpath moveto X 640 0 rlineto 0 640 rlineto -640 0 rlineto closepath fill`7Ddef X/ci`7B355 333 rmoveto currentpoint newpath 333 0 360 arc X 50 setlinewidth stroke`7Ddef X X/lt`7B20 -200 moveto 0 550 rlineto currx 800 2cx s4 add exch s4 a4p stroke`7 VDdef X/lb`7B20 800 moveto 0 -550 rlineto currx -200 2cx s4 add exch s4 a4p stroke` V7Ddef X/rt`7B20 -200 moveto 0 550 rlineto currx 800 2cx s4 sub exch s4 a4p stroke`7 VDdef X/rb`7B20 800 moveto 0 -500 rlineto currx -200 2cx s4 sub exch s4 a4p stroke` V7Ddef X/lk`7B20 800 moveto 20 300 -280 300 s4 arcto pop pop 1000 sub X currentpoint stroke moveto X 20 300 4 2 roll s4 a4p 20 -200 lineto stroke`7Ddef X/rk`7B20 800 moveto 20 300 320 300 s4 arcto pop pop 1000 sub X currentpoint stroke moveto X 20 300 4 2 roll s4 a4p 20 -200 lineto stroke`7Ddef X/lf`7B20 800 moveto 0 -1000 rlineto s4 0 rls`7Ddef X/rf`7B20 800 moveto 0 -1000 rlineto s4 neg 0 rls`7Ddef X/lc`7B20 -200 moveto 0 1000 rlineto s4 0 rls`7Ddef X/rc`7B20 -200 moveto 0 1000 rlineto s4 neg 0 rls`7Ddef Xend X X/Metrics 50 dict def Metrics begin X/.notdef 0 def X/space 500 def X/ru 500 def X/br 0 def X/lt 250 def X/lb 250 def X/rt 250 def X/rb 250 def X/lk 250 def X/rk 250 def X/rc 250 def X/lc 250 def X/rf 250 def X/lf 250 def X/bv 250 def X/ob 350 def X/bu 350 def X/ci 750 def X/bx 750 def X/sq 750 def X/rn 500 def X/ul 500 def X/vr 0 def Xend X XDITfd begin X/s2 500 def /s4 250 def /s3 333 def X/a4p`7Barcto pop pop pop pop`7Ddef X/2cx`7B2 copy exch`7Ddef X/rls`7Brlineto stroke`7Ddef X/currx`7Bcurrentpoint pop`7Ddef X/dround`7Btransform round exch round exch itransform`7D def Xend Xend X/DIThacks exch definefont pop X Xditstart X(psc)xT X576 1 1 xr X1(Times-Roman)xf 1 f X2(Times-Italic)xf 2 f X3(Times-Bold)xf 3 f X4(Times-BoldItalic)xf 4 f X5(Helvetica)xf 5 f X6(Helvetica-Bold)xf 6 f X7(Courier)xf 7 f X8(Courier-Bold)xf 8 f X9(Symbol)xf 9 f X10(DIThacks)xf 10 f X10 s X1 f Xxi X%%EndProlog X X%%Page: 1 1 X10 s 10 xH 0 xS 1 f X576 384(GHOSTVIEW)N X1066(\()X X1106(1)X X1159(\))X X1975(UNIX)X X2196(Programmer's)X X2675(Manual)X X3710(GHOSTVIEW)X X4200(\()X X4240(1)X X4293(\))X X3 f X9 s X576 768(NAME)N X2 f X10 s X864 864(ghostview)N X1 f X9 f X1204(-)X X1 f X1268(View)X X1462(PostScript)X X1810(documents)X X2177(using)X X2370(ghostscript)X X3 f X9 s X576 998(SYNOPSIS)N X10 s X864 1094(ghostview)N X1 f X1222(`5B\256lename`5D)X X864 1190(or)N X3 f X864 1286(ghostview)N X1 f X1293(`5B)X X9 f X1320(-)X X1 f X1364(staticgray`5D)X X1794(`5B)X X9 f X1821(-)X X1 f X1865(grayscale`5D)X X2288(`5B)X X9 f X2315(-)X X1 f X2359(staticcolor`5D)X X2812(`5B)X X9 f X2839(-)X X1 f X2883(pseudocolor`5D)X X3394(`5B)X X9 f X3421(-)X X1 f X3465(truecolor`5D)X X3874(`5B)X X9 f X3901(-)X X1 f X3945(directcolor`5D)X X864 1382(`5B)N X9 f X891(-)X X1 f X935(`5Bno`5Dinstall`5D)X X1383(`5B)X X9 f X1410(-)X X1 f X1454(`5Bno`5Dprivate`5D)X X1930(`5B)X X9 f X1957(-)X X1 f X2001(`5Bno`5Dcenter`5D)X X2451(`5B)X X9 f X2478(-)X X1 f X2522(`5Bno`5Dtitle`5D)X X2898(`5B)X X9 f X2925(-)X X1 f X2969(`5Bno`5Ddate`5D)X X3355(`5B)X X9 f X3382(-)X X1 f X3426(`5Bno`5Dlocator`5D)X X3901(`5B)X X9 f X3928(-)X X1 f X3972(`5Bno`5Dlabels`5D)X X864 1478(`5B)N X9 f X891(-)X X1 f X935(resolution)X X2 f X1275(dpi)X X1 f X1377(`5D)X X1441(`5B)X X9 f X1468(-)X X1 f X1512(dpi)X X2 f X1634(dpi)X X1 f X1736(`5D)X X1800(`5B)X X9 f X1827(-)X X1 f X1871(xdpi)X X2 f X2033(dpi)X X1 f X2135(`5D)X X2199(`5B)X X9 f X2226(-)X X1 f X2270(ydpi)X X2 f X2432(dpi)X X1 f X2534(`5D)X X2598(`5B)X X9 f X2625(-)X X1 f X2669(`5Bno`5Dquiet`5D)X X3028(`5B)X X9 f X3055(-)X X1 f X3099(preload)X X2 f X3360(\256le)X X1 f X3458(`5D)X X3523(`5B)X X9 f X3550(-)X X1 f X3594(magstep)X X2 f X3881(n)X X1 f X(`5D)S X3986(`5B)X X9 f X4013(-)X X1 f X4057(portrait`5D)X X864 1574(`5B)N X9 f X891(-)X X1 f X935(landscape`5D)X X1308(`5B)X X9 f X1335(-)X X1 f X1379(upsidedown`5D)X X1822(`5B)X X9 f X1849(-)X X1 f X1893(seascape`5D)X X2231(`5B)X X9 f X2258(-)X X1 f X2302(letter`5D)X X2523(`5B)X X9 f X2550(-)X X1 f X2594(tabloid`5D)X X2872(`5B)X X9 f X2899(-)X X1 f X2943(ledger`5D)X X3199(`5B)X X9 f X3226(-)X X1 f X3270(legal`5D)X X3481(`5B)X X9 f X3508(-)X X1 f X3552(statement`5D)X X3914(`5B)X X9 f X3941(-)X X1 f X3985(executive`5D)X X864 1670(`5B)N X9 f X891(-)X X1 f X935(a3`5D)X X1077(`5B)X X9 f X1104(-)X X1 f X1148(a4`5D)X X1290(`5B)X X9 f X1317(-)X X1 f X1361(a5`5D)X X1503(`5B)X X9 f X1530(-)X X1 f X1574(b4`5D)X X1720(`5B)X X9 f X1747(-)X X1 f X1791(b5`5D)X X1937(`5B)X X9 f X1964(-)X X1 f X2008(folio`5D)X X2225(`5B)X X9 f X2252(-)X X1 f X2296(quarto`5D)X X2567(`5B)X X9 f X2594(-)X X1 f X2638(10x14`5D)X X2905(`5B)X X9 f X2932(-)X X1 f X2976(force`5D)X X3209(`5B)X X9 f X3236(-)X X1 f X3280(forceorientation`5D)X X3860(`5B)X X9 f X3887(-)X X1 f X3931(forcemedia`5D)X X864 1766(`5B)N X9 f X891(-)X X1 f X935(`5Bno`5Dswap`5D)X X1281(`5B)X X9 f X1308(-)X X1 f X1352(`5Bno`5Dopenwindows`5D)X X1978(`5B)X X9 f X2005(-)X X1 f X2049(`5Bno`5Dncdwm`5D)X X2466(`5B)X X9 f X2493(-)X X1 f X2537(page)X X2 f X2709(label)X X1 f X(`5D)S X2916(`5B)X X9 f X2943(-)X X2 f X2987(toolkitoption)X X1 f X3415(...`5D)X X3542(`5B\256lename`5D)X X3 f X9 s X576 1900(DESCRIPTION)N X1 f X10 s X864 1996(The)N X2 f X1024(ghostview)X X1 f X1379(program)X X1686(provides)X X1997(an)X X2108(X11)X X2281(user)X X2450(interface)X X2767(for)X +-+-+-+-+-+-+-+- END OF PART 5 +-+-+-+-+-+-+-+- Return-Path: mccall!tp@!mccall.com Delivery-Date: Tue, 27 Oct 92 19:13:02 -0600 Return-Path: mccall!tp@!mccall.com Received: from cs.wisc.edu by appenzell.cs.wisc.edu; Tue, 27 Oct 92 19:12:50 -0600 Received: from depot.cis.ksu.edu by cs.wisc.edu; Tue, 27 Oct 92 19:12:44 -0600 Return-Path: Received: from mccall.UUCP by depot.cis.ksu.edu UUCP (5.65a) id AA18665; Tue, 27 Oct 92 19:11:45 -0600 Received: by mccall.com (DECUS UUCP /1.3-1/2.5/); Tue, 27 Oct 92 19:07:21 CST Received: by mccall.com (MX V3.1C) id 12843; Tue, 27 Oct 1992 19:07:14 CST Date: Tue, 27 Oct 1992 19:07:14 CST From: Terry Poot To: tim Message-Id: <00962BB3.79C82AA0.12843@mccall.com> Subject: Ghostview for VMS 06/14 -+-+-+-+-+-+-+-+ START OF PART 6 -+-+-+-+-+-+-+-+ X2896(the)X X2 f X3029(ghostscript)X X1 f X3419(interpreter.)X X2 f X3830(Ghostview)X X1 f X4204(and)X X2 f X864 2092(ghostscript)N X1 f X1243(function)X X1534(as)X X1624(two)X X1767(cooperating)X X2169(programs.)X X2 f X2535(Ghostview)X X1 f X2896(creates)X X3143(the)X X3264(viewing)X X3545(window)X X3826(and)X X2 f X3965(ghostscript)X X1 f X864 2188(draws)N X1076(in)X X1158(it.)X X864 2322(Don't)N X1071(be)X X1167(alarmed)X X1447(by)X X1548(the)X X1667(number)X X1933(of)X X2021(options.)X X2317(Generally,)X X2675(one)X X2812(invokes)X X2 f X3082(ghostview)X X1 f X3423(with)X X3586(just)X X3722(one)X X3859(parameter,)X X4222(the)X X864 2418(name)N X1064(of)X X1157(the)X X1281(\256le)X X1409(to)X X1497(be)X X1599(previewed.)X X2000(If)X X2080(the)X X2204(\256lename)X X2506(is)X X2585(`60`60-'',)X X2 f X2766(ghostview)X X1 f X3112(will)X X3262(read)X X3426(from)X X3607(`60`60stdin''.)X X3935(The)X X4085(options)X X864 2514(provide)N X1129(a)X X1185(way)X X1339(to)X X1421(set)X X1531(X)X X1610(resources)X X1935(from)X X2112(the)X X2231(command)X X2568(line)X X2709(for)X X2824(a)X X2881(single)X X3093(invocation)X X3452(of)X X2 f X3540(ghostview)X X1 f X(.)S X3921(For)X X4053(that)X X4194(rea-)X X864 2610(son,)N X1015(discussion)X X1368(of)X X1455(the)X X1573(options)X X1828(is)X X1901(delayed)X X2171(until)X X2337(after)X X2505(the)X X2623(X)X X2701(resources)X X3025(are)X X3144(discussed.)X X3 f X9 s X576 2744(MAIN)N X806(WINDOW)X X1 f X10 s X864 2840(The)N X1014(main)X X1199(viewport)X X1509(is)X X1587(on)X X1692(the)X X1815(right)X X1991(side)X X2145(of)X X2237(the)X X2360(main)X X2545(window.)X X2868(If)X X2947(the)X X3070(page)X X3247(is)X X3326(larger)X X3540(than)X X3704(the)X X3828(viewport,)X X4159(there)X X864 2936(will)N X1010(be)X X1108(scroll)X X1308(bars)X X1464(along)X X1664(the)X X1784(bottom)X X2032(and)X X2170(right)X X2343(edges)X X2548(of)X X2636(the)X X2755(viewport.)X X3101(To)X X3211(the)X X3330(left)X X3458(of)X X3546(the)X X3665(viewport)X X3971(is)X X4045(the)X X4164(table)X X864 3032(of)N X954(contents.)X X1284(If)X X1361(the)X X1482(PostScript)X X1833(\256le)X X1958(has)X X2088(document)X X2427(structuring)X X2798(convention)X X3178(\(DSC\))X X3411(comments,)X X3784(the)X X3906(table)X X4086(of)X X4177(con-)X X864 3128(text)N X1005(will)X X1150(display)X X1402(the)X X1521(page)X X1694(labels)X X1902(\(i.e.)X X2048(usually)X X2300(page)X X2473(numbers\).)X X2837(To)X X2947(the)X X3066(left)X X3194(of)X X3282(the)X X3401(table)X X3577(of)X X3664(contents)X X3951(is)X X4024(the)X X4142(menu)X X864 3224(box.)N X1048(Each)X X1233(push)X X1408(button)X X1636(brings)X X1860(up)X X1964(a)X X2024(popup)X X2248(menu.)X X2490(Over)X X2675(the)X X2797(menu)X X2999(box)X X3143(and)X X3284(table)X X3465(of)X X3557(contents)X X3849(there)X X4035(are)X X4159(three)X X864 3320(optional)N X1151(labels)X X1363(that)X X1508(contain)X X1769(the)X X1892(title,)X X2061(date,)X X2240(and)X X2381(locator.)X X2669(The)X X2818(title)X X2966(label)X X3146(contains)X X3437(the)X X3559(document)X X3899(title)X X4047(found)X X4258(in)X X864 3416(the)N X986(DSC)X X1165(comments.)X X1558(If)X X1636(no)X X1740(title)X X1888(can)X X2024(be)X X2124(found,)X X2355(the)X X2477(\256lename)X X2777(is)X X2854(used)X X3025(in)X X3111(its)X X3210(place.)X X3444(The)X X3593(date)X X3751(label)X X3931(contains)X X4222(the)X X864 3512(document)N X1207(date)X X1368(found)X X1582(in)X X1671(the)X X1796(DSC)X X1977(comments.)X X2372(If)X X2452(no)X X2558(date)X X2718(can)X X2856(be)X X2958(found,)X X3191(the)X X3315(last)X X3452(modi\256ed)X X3762(date)X X3922(of)X X4015(the)X X4139(\256le)X X4267(is)X X864 3608(used)N X1039(in)X X1129(its)X X1232(place.)X X1470(Since)X X1676(the)X X1802(title)X X1954(and)X X2098(date)X X2260(labels)X X2475(may)X X2641(be)X X2745(clipped)X X3009(by)X X3117(the)X X3243(main)X X3431(viewport,)X X3764(the)X X3890(date)X X4052(and)X X4196(title)X X864 3704(labels)N X1080(are)X X1208(push)X X1387(buttons)X X1650(that)X X1798(bring)X X1995(up)X X2103(a)X X2167(popup)X X2395(window)X X2681(with)X X2851(the)X X2977(title)X X3129(or)X X3224(date.)X X3426(These)X X3646(popup)X X3874(windows)X X4191(also)X X864 3800(show)N X1055(the)X X1175(`60`60document'')X X1621(icon)X X1781(when)X X1977(the)X X2097(displayed)X X2426(string)X X2630(comes)X X2857(from)X X3035(the)X X3156(DSC)X X3334(comments.)X X3726(The)X X3874(locator)X X4120(shows)X X864 3896(the)N X986(location)X X1268(of)X X1359(the)X X1481(cursor)X X1706(in)X X1792(the)X X1914(viewport.)X X2262(The)X X2410(location)X X2691(is)X X2767(expressed)X X3107(in)X X3192(the)X X3313(default)X X3559(user)X X3716(coordinate)X X4078(system.)X X864 3992(The)N X1009(locator)X X1252(is)X X1325(useful)X X1541(for)X X1655(measuring)X X2009(bounding)X X2331(boxes.)X X864 4126(Within)N X1109(the)X X1230(main)X X1413(viewport)X X1721(the)X X1842(mouse)X X2074(cursor)X X2298(is)X X2374(a)X X2433(`60`60target'')X X2747(when)X X2 f X2944(ghostscript)X X1 f X3322(is)X X3398(doing)X X3604(work.)X X3833(The)X X3982(cursor)X X4207(is)X X4284(a)X X864 4222(`60`60cross)N X1106(hair'')X X1308(when)X X2 f X1505(ghostscript)X X1 f X1883(is)X X1959(idle.)X X2142(When)X X2357(moving)X X2624(to)X X2708(another)X X2971(page)X X3145(in)X X3229(a)X X3287(document,)X X3645(it)X X3711(is)X X3786(generally)X X4107(best)X X4258(to)X X864 4318(wait)N X1022(for)X X2 f X1136(ghostscript)X X1 f X1511(to)X X1593(become)X X1863(idle.)X X2043(Otherwise,)X X2413(the)X X2531(current)X X2 f X2780(ghostscript)X X1 f X3156(process)X X3418(must)X X3594(be)X X3691(killed)X X3894(and)X X4031(the)X X4150(over-)X X864 4414(head)N X1036(of)X X1123(reading)X X1384(the)X X1502(prologue)X X1807(is)X X1880(incurred)X X2168(again.)X X2 f X864 4548(Ghostview)N X1 f X1223(will)X X1368(check)X X1577(to)X X1660(see)X X1785(if)X X1856(the)X X1976(\256le)X X2100(has)X X2229(been)X X2403(modi\256ed)X X2709(just)X X2846(before)X X3074(it)X X3140(displays)X X3424(a)X X3482(page)X X3656(or)X X3745(when)X X3941(the)X X4061(applica-)X X864 4644(tion)N X1008(is)X X1081(deiconi\256ed.)X X1497(If)X X1571(the)X X1689(\256le)X X1811(has)X X1938(changed,)X X2246(it)X X2310(will)X X2454(reopen)X X2693(the)X X2811(\256le.)X X864 4778(Clicking)N X1169(anywhere)X X1512(within)X X1746(the)X X1874(viewport)X X2189(will)X X2344(popup)X X2575(a)X X2642(zoom)X X2851(window.)X X3180(The)X X3336(window)X X3625(is)X X3709(centered)X X4013(about)X X4222(the)X X864 4874(location)N X1152(that)X X1302(was)X X1456(clicked.)X X1757(Clicking)X X2061(with)X X2232(the)X X2359(\256rst)X X2512(mouse)X X2750(button)X X2983(pops)X X3163(up)X X3272(a)X X3337(low)X X3486(resolution)X X3835(zoom)X X4042(window.)X X864 4970(Clicking)N X1170(with)X X1343(the)X X1472(second)X X1726(mouse)X X1966(button)X X2201(pops)X X2383(up)X X2494(a)X X2561(medium)X X2854(resolution)X X3205(zoom)X X3414(window.)X X3743(Clicking)X X4049(with)X X4222(the)X X864 5066(third)N X1036(mouse)X X1266(button)X X1491(pops)X X1663(up)X X1764(a)X X1821(high)X X1984(resolution)X X2325(zoom)X X2524(window.)X X2843(The)X X2989(cursor)X X3211(in)X X3294(the)X X3413(zoom)X X3611(window)X X3889(will)X X4033(display)X X4284(a)X X864 5162(`60`60target'')N X1176(or)X X1264(`60`60cross)X X1504(hair'')X X1704(depending)X X2059(on)X X2160(the)X X2279(state)X X2447(of)X X2 f X2535(ghostscript)X X1 f X2890(.)X X2951(The)X X3097(locator)X X3341(reports)X X3585(the)X X3704(position)X X3982(of)X X4070(the)X X4190(cur-)X X864 5258(sor)N X982(in)X X1064(the)X X1182(zoom)X X1380(windows)X X1689(as)X X1776(well)X X1934(as)X X2021(the)X X2139(main)X X2319(viewport.)X X864 5392(In)N X951(the)X X1069(table)X X1245(of)X X1332(contents,)X X1639(the)X X1757(\256rst)X X1902(and)X X2039(third)X X2211(mouse)X X2441(button)X X2666(functions)X X2985(exactly)X X3238(as)X X3326(they)X X3485(do)X X3586(in)X X3669(a)X X3726(Text)X X3894(widget.)X X4173(That)X X864 5488(is)N X939(the)X X1059(\256rst)X X1205(mouse)X X1436(button)X X1662(selects)X X1898(text)X X2040(and)X X2178(the)X X2298(third)X X2470(mouse)X X2700(button)X X2925(extends)X X3191(selections.)X X3568(However,)X X3904(clicking)X X4183(on)X X4284(a)X X864 5584(page)N X1043(label)X X1226(with)X X1395(the)X X1520(second)X X1770(mouse)X X2006(button)X X2237(will)X X2388(cause)X X2594(that)X X2742(page)X X2922(to)X X3012(be)X X3116(shown.)X X3393(The)X X3546(page)X X3726(being)X X3932(displayed)X X4267(is)X X864 5680(marked)N X1125(with)X X1287(a)X X1343('<')X X1462(in)X X1544(the)X X1662(right)X X1833(margin)X X2080(of)X X2167(the)X X2285(table)X X2461(of)X X2548(contents.)X X576 6144(7th)N X698(Edition)X X4280(1)X X X2 p X%%Page: 2 2 X10 s 10 xH 0 xS 1 f X576 384(GHOSTVIEW)N X1066(\()X X1106(1)X X1159(\))X X1975(UNIX)X X2196(Programmer's)X X2675(Manual)X X3710(GHOSTVIEW)X X4200(\()X X4240(1)X X4293(\))X X3 f X9 s X576 768(POPUP)N X846(WINDOWS)X X1 f X10 s X864 864(The)N X1014(are)X X1138(several)X X1391(additional)X X1736(windows)X X2050(that)X X2195(may)X X2358(appear.)X X2639(The)X X2 f X2790(copyright)X X1 f X3123(window)X X3407(will)X X3557(appear)X X3798(whenever)X X4137(copy-)X X864 960(right)N X1042(information)X X1447(is)X X1527(requested.)X X1902(The)X X2 f X2054(information)X X1 f X2457(window)X X2741(appears)X X3013(whenever)X X3352(the)X X2 f X3476(ghostscript)X X1 f X3857(process)X X4124(writes)X X864 1056(to)N X948(`60`60stdout'')X X1273(or)X X1362(`60`60stderr''.)X X1715(Whenever)X X2068(there)X X2251(is)X X2326(an)X X2424(error)X X2603(in)X X2687(the)X X2807(PostScript)X X3157(program,)X X3471(the)X X3591(stack)X X3778(trace)X X3958(will)X X4105(appear)X X864 1152(in)N X947(this)X X1083(window.)X X1402(When)X X2 f X1614(ghostscript)X X1 f X1989(is)X X2062(invoked)X X2340(without)X X2604(the)X X2722(quiet)X X2902(option,)X X3146(informational)X X3602(message)X X3894(regarding)X X4222(the)X X864 1248(state)N X1031(of)X X2 f X1118(ghostscript)X X1 f X1493(will)X X1637(appear)X X1873(in)X X1956(the)X X2 f X2075(information)X X1 f X2473(window.)X X2792(The)X X2 f X2938(copyright)X X1 f X3266(and)X X2 f X3403(information)X X1 f X3801(windows)X X4111(can)X X4244(be)X X864 1344(dismissed)N X1199(by)X X1299(pushing)X X1572(the)X X1690(`60`60Dismiss'')X X2075(button.)X X864 1478(The)N X2 f X1018(Select)X X1239(File)X X1 f X1397(dialog)X X1626(widget)X X1873(will)X X2026(appear)X X2270(when)X X2473(you)X X2622(wish)X X2802(to)X X2893(open)X X3078(or)X X3174(save)X X3346(a)X X3412(\256le.)X X3584(The)X X2 f X3739(Select)X X3961(File)X X1 f X4120(dialog)X X864 1574(widget)N X1104(allows)X X1335(an)X X1433(X11)X X1593(user)X X1749(to)X X1832(select)X X2036(a)X X2093(\256le)X X2216(by)X X2317(typing)X X2542(the)X X2661(path)X X2820(or)X X2908(by)X X3009(browsing)X X3328(in)X X3411(directory)X X3722(listings)X X3973(and)X X4110(select-)X X864 1670(ing)N X986(entries)X X1220(with)X X1382(the)X X1500(mouse.)X X864 1804(The)N X1014(space)X X1218(bar)X X1346(can)X X1483(be)X X1584(pressed)X X1850(to)X X1937(complete)X X2256(\256lenames,)X X2608(and)X X2750(tilde)X X2918(is)X X2997(used)X X3170(for)X X3290(home)X X3494(directories.)X X3899(All)X X4027(the)X X4151(usual)X X864 1900(key)N X1010(bindings)X X1315(can)X X1457(be)X X1563(used)X X1740(in)X X1832(the)X X1960(text)X X2110(widget,)X X2378(except)X X2618(for)X X2742(Return)X X2989(and)X X3134(Control)X X9 f X3378(-)X X1 f X3422(M,)X X3542(which)X X3767(are)X X3895(equivalent)X X4258(to)X X864 1996(pressing)N X1157(the)X X1281(OK)X X1423(button.)X X1693(The)X X1844(path)X X2008(can)X X2146(be)X X2249(scrolled)X X2530(using)X X2730(the)X X2855(large)X X3043(horizontal)X X3395(scroll)X X3600(bar,)X X3750(or)X X3844(by)X X3951(moving)X X4222(the)X X864 2092(insertion)N X1165(cursor)X X1387(in)X X1470(the)X X1589(text)X X1730(widget.)X X2009(The)X X2155(directory)X X2466(entries)X X2701(can)X X2834(be)X X2931(scrolled)X X3206(using)X X3400(the)X X3519(vertical)X X3781(scroll)X X3979(bars,)X X4153(or)X X4240(by)X X864 2188(holding)N X1133(a)X X1194(mouse)X X1428(button)X X1657(down)X X1860(and)X X2001(moving)X X2271(out)X X2399(of)X X2492(the)X X2616(listing.)X X2881(The)X X3032(scrolling)X X3338(speed)X X3547(varies)X X3765(with)X X3933(the)X X4057(distance)X X864 2284(from)N X1040(the)X X1158(listing.)X X864 2418(The)N X1014(directory)X X1330(entries)X X1570(are)X X1695(terminated)X X2064(with)X X2232(special)X X2481(characters)X X2834(that)X X2980(show)X X3175(the)X X3299(type)X X3463(of)X X3556(entry,)X X3767(similar)X X4015(to)X X4103(the)X X2 f X9 f X4227(-)X X2 f X4271(F)X X1 f X864 2514(option)N X1088(of)X X2 f X1175(ls)X X1 f X1234(\(1\).)X X864 2648(The)N X2 f X1012(Select)X X1227(File)X X1 f X1379(dialog)X X1602(widget)X X1843(is)X X1919(in)X X2004(total)X X2169(control)X X2419(until)X X2588(is)X X2664(pops)X X2838(down.)X X3079(No)X X3200(other)X X3388(controls)X X3669(in)X X2 f X3754(ghostview)X X1 f X4097(will)X X4244(be)X X864 2744(active)N X1076(during)X X1305(this)X X1440(time.)X X3 f X9 s X576 2878(MENUS)N X1 f X10 s X864 2974(There)N X1076(are)X X1199(\256ve)X X1344(buttons)X X1604(in)X X1691(the)X X1814(menu)X X2017(box.)X X2202(They)X X2392(are)X X2516(the)X X3 f X2639(File)X X1 f X2768(,)X X3 f X2813(Page)X X1 f X2978(,)X X3 f X3023(Magstep)X X1 f X3317(,)X X3 f X3362(Orientation)X X1 f X(,)S X3807(and)X X3 f X3948(Media)X X1 f X4191(but-)X X864 3070(tons.)N X1077(There)X X1305(are)X X1444(keyboard)X X1783 0.2841(accelerators)AX X2207(for)X X2340(most)X X2534(of)X X2640(the)X X2777(popup)X X3016(menus.)X X3304(Be)X X3432(sure)X X3605(to)X X3706(read)X X3884(the)X X4021(keyboard)X X864 3166 0.3250(accelerator)AN X1238(section.)X X3 f X864 3300(File)N X1 f X1440(This)X X1602(popup)X X1822(menu)X X2020(controls)X X2298(\256le)X X2420(access:)X X3 f X1440 3434(Open...)N X1 f X2016(Pops)X X2208(up)X X2325(the)X X2460(Select)X X2693(File)X X2854(window)X X3149(in)X X3248(preparation)X X3651(to)X X3750(open)X X3943(a)X X4016(\256le.)X X4195(The)X X2016 3530(Select)N X2237(File)X X2386(widget)X X2629(is)X X2707(in)X X2794(total)X X2961(control)X X3212(until)X X3382(it)X X3450(pops)X X3625(down.)X X3867(Opens)X X4096(the)X X4218(\256le)X X2016 3626(for)N X2130(viewing.)X X3 f X1440 3760(Reopen)N X1 f X2016(Reopens)X X2312(the)X X2430(current)X X2678(\256le.)X X3 f X1440 3894(Print...)N X1 f X2016(Pops)X X2197(up)X X2303(a)X X2365(dialog)X X2591(widget)X X2835(to)X X2923(ask)X X3056(for)X X3176(the)X X3300(printer)X X3540(name.)X X3781(Sends)X X3999(the)X X4124(whole)X X2016 3990(document)N X2352(to)X X2434(the)X X2552(printer.)X X3 f X1440 4124(Print)N X1638(marked)X X1925(pages...)X X1 f X2016 4220(Pops)N X2193(up)X X2295(a)X X2353(dialog)X X2576(widget)X X2817(to)X X2902(ask)X X3032(for)X X3149(the)X X3270(printer)X X3507(name.)X X3744(Sends)X X3958(the)X X4079(marked)X X2016 4316(pages)N X2219(to)X X2301(the)X X2419(printer.)X X2693(If)X X2767(no)X X2867(pages)X X3070(have)X X3242(been)X X3414(marked,)X X3695(the)X X3813(mark)X X3998(procedure)X X2016 4412(is)N X2095(called)X X2313(before)X X2545(printing)X X2824(and)X X2966(then)X X3130(the)X X3254(unmark)X X3525(procedure)X X3873(is)X X3953(called)X X4172(after)X X2016 4508(printing.)N X3 f X1440 4642(Save)N X1620(marked)X X1907(pages...)X X1 f X2016 4738(Pops)N X2191(up)X X2291(the)X X2409(Select)X X2625(File)X X2769(window)X X3047(in)X X3129(preparation)X X3515(to)X X3597(save)X X3760(a)X X3816(\256le.)X X3978(The)X X4124(Select)X X2016 4834(File)N X2173(widget)X X2424(is)X X2510(in)X X2605(total)X X2780(control)X X3040(until)X X3219(it)X X3296(pops)X X3480(down.)X X3730(Saves)X X3949(the)X X4079(marked)X X2016 4930(pages)N X2220(in)X X2303(the)X X2422(selected)X X2702(\256le.)X X2865(If)X X2941(no)X X3043(pages)X X3248(have)X X3422(been)X X3596(marked,)X X3879(the)X X3999(mark)X X4186(pro-)X X2016 5026(cedure)N X2256(is)X X2333(called)X X2549(before)X X2779(saving)X X3012(and)X X3152(then)X X3314(the)X X3436(unmark)X X3705(procedure)X X4051(is)X X4128(called)X X2016 5122(after)N X2184(saving.)X X3 f X1440 5256(Copyright...)N X1 f X2016(Pops)X X2191(up)X X2291(the)X X2 f X2409(copyright)X X1 f X2736(window.)X X3 f X1440 5390(Quit)N X1 f X2016(Causes)X X2 f X2263(ghostview)X X1 f X2603(to)X X2685(exit.)X X3 f X864 5524(Page)N X1 f X1440(This)X X1602(popup)X X1822(menu)X X2020(controls)X X2298(page)X X2470(access:)X X3 f X1440 5658(Next)N X1 f X2016(Display)X X2285(the)X X2403(next)X X2561(page.)X X576 6144(7th)N X698(Edition)X X4280(2)X X X3 p X%%Page: 3 3 X10 s 10 xH 0 xS 1 f X576 384(GHOSTVIEW)N X1066(\()X X1106(1)X X1159(\))X X1975(UNIX)X X2196(Programmer's)X X2675(Manual)X X3710(GHOSTVIEW)X X4200(\()X X4240(1)X X4293(\))X X3 f X1440 768(Redisplay)N X1 f X2016(Display)X X2285(the)X X2403(current)X X2651(page.)X X3 f X1440 902(Previous)N X1 f X2016(Display)X X2285(the)X X2403(previous)X X2699(page.)X X3 f X1440 1036(Center)N X1 f X2016(Center)X X2250(the)X X2368(page)X X2540(in)X X2622(the)X X2740(viewport.)X X3 f X1440 1170(Mark)N X1 f X2016(Mark)X X2216(the)X X2340(pages)X X2549(that)X X2695(have)X X2873(been)X X3051(selected)X X3336(in)X X3424(the)X X3548(table)X X3731(of)X X3825(contents.)X X4159(If)X X4240(no)X X2016 1266(pages)N X2219(have)X X2391(been)X X2563(selected,)X X2862(mark)X X3047(the)X X3165(current)X X3413(page.)X X3 f X1440 1400(Unmark)N X1 f X2016(Unmark)X X2306(the)X X2431(pages)X X2641(that)X X2789(have)X X2969(been)X X3149(selected)X X3436(in)X X3526(the)X X3652(table)X X3836(of)X X3931(contents.)X X4266(If)X X2016 1496(no)N X2116(pages)X X2319(have)X X2491(been)X X2663(selected,)X X2962(unmark)X X3227(the)X X3345(current)X X3593(page.)X X3 f X864 1630(Magstep)N X1 f X1440(The)X X1597(Magstep)X X1905(menu)X X2115(controls)X X2405(the)X X2535(magni\256cation)X X3007(at)X X3097(which)X X3325(the)X X3455(document)X X3804(is)X X3890(viewed.)X X4195(The)X X1440 1726(default)N X1691(magstep)X X1986(of)X X2081(0)X X2149(implies)X X2412(no)X X2520(magni\256cation)X X2988(\(i.e.)X X3141(the)X X3267(size)X X3419(on)X X3526(the)X X3651(screen)X X3884(should)X X4124(match)X X1440 1822(the)N X1590(size)X X1767(on)X X1899(paper\).)X X2 f X2197(Ghostview)X X1 f X2587(borrows)X X2902(the)X X3053(notion)X X3310(of)X X3430(magstep)X X3750(from)X X3959(TeX.)X X4195(The)X X1440 1918(magni\256cation)N X1908(is)X X1989(de\256ned)X X2253(to)X X2343(be)X X2447(1.2)X X9 f X(**)S X1 f X(magstep.)S X2962(At)X X3070(magstep)X X3365(1,)X X3452(the)X X3577(document)X X3920(is)X X4000(magni\256ed)X X1440 2014(by)N X1544(1.2.)X X1708(At)X X1812(magstep)X X2104(-1,)X X2216(the)X X2339(document)X X2680(is)X X2758(reduced)X X3038(by)X X3143(1.2.)X X3308(The)X X3458(Magstep)X X3759(menu)X X3962(lists)X X4115(values)X X1440 2110(from)N X1616(-5)X X1703(to)X X1785(5.)X X3 f X864 2244(Orientation)N X1 f X1440(The)X X1591(Orientation)X X1982(menu)X X2186(controls)X X2470(the)X X2594(display)X X2851(orientation.)X X3264(A)X X3348(`60`60dot'')X X3584(appears)X X3856(in)X X3945(front)X X4128(of)X X4222(the)X X1440 2340(current)N X1696(orientation.)X X2111(The)X X2264(\256rst)X X2416(mouse)X X2653(button)X X2885(sets)X X3032(the)X X3157(default)X X3407(orientation.)X X3821(The)X X3973(DSC)X X4155(com-)X X1440 2436(ments)N X1656(may)X X1819(specify)X X2076(an)X X2177(orientation)X X2549(of)X X2641(Portrait)X X2906(or)X X2999(Landscape)X X3369(that)X X3515(overrides)X X3840(the)X X3964(default.)X X4253(In)X X1440 2532(this)N X1585(case,)X X1774(a)X X1840("document")X X2252(appears)X X2528(in)X X2620(front)X X2806(of)X X2903(the)X X3031(current)X X3289(orientation.)X X3705(The)X X3859(second)X X4111(mouse)X X1440 2628(button)N X1669(can)X X1806(be)X X1907(used)X X2079(to)X X2166 0.4062(`60`60force'')AX X2465(the)X X2588(orientation)X X2960(on)X X3065(a)X X3126(document)X X3468(to)X X3556(override)X X3850(the)X X3974(DSC)X X4155(com-)X X1440 2724(ments.)N X1698(If)X X1779(an)X X1882(orientation)X X2256(is)X X2336(being)X X2541(forced,)X X2793(then)X X2957(a)X X3019(`60`60tie)X X3179(\256ghter'')X X3468(will)X X3618(appear)X X3859(in)X X3947(front)X X4129(of)X X4222(the)X X1440 2820(current)N X1688(orientation.)X X3 f X1440 2954(Portrait)N X1 f X2016(Set)X X2157(the)X X2294(orientation)X X2680(to)X X2781(Portrait.)X X3080(This)X X3262(implies)X X3537(no)X X3657(rotation.)X X3986(A)X X4084(portrait)X X2016 3050(orientation)N X2386(indicates)X X2694(that)X X2837(the)X X2958(longest)X X3212(edge)X X3387(of)X X3477(the)X X3598(paper)X X3800(is)X X3875(parallel)X X4138(to)X X4222(the)X X2016 3146(vertical)N X2277(\(y\))X X2391(axis.)X X3 f X1440 3280(Landscape)N X1 f X2016(Set)X X2144(the)X X2268(orientation)X X2641(to)X X2729(Landscape.)X X3139(This)X X3307(implies)X X3568(a)X X3630(clockwise)X X3977(rotation)X X4253(of)X X2016 3376(the)N X2150(paper)X X2365(by)X X2481(90)X X2597(degrees.)X X2919(A)X X3013(landscape)X X3365(orientation)X X3747(indicates)X X4067(that)X X4222(the)X X2016 3472(longest)N X2267(edge)X X2439(of)X X2526(the)X X2644(paper)X X2843(is)X X2916(parallel)X X3177(to)X X3259(the)X X3377(horizontal)X X3722(\(x\))X X3836(axis.)X X3 f X1440 3606(Upside)N X9 f X1675(-)X X1677(-)X X3 f X1721(down)X X1 f X2016(Set)X X2138(the)X X2256(orientation)X X2623(to)X X2705(Upside)X X9 f X2932(-)X X1 f X2976(Down.)X X3 f X1440 3740(Seascape)N X1 f X2016(Set)X X2143(the)X X2267(orientation)X X2640(to)X X2728(Seascape.)X X3089(This)X X3257(implies)X X3518(a)X X3580(counterclockwise)X X4168(rota-)X X2016 3836(tion)N X2160(of)X X2247(the)X X2365(paper)X X2564(by)X X2664(90)X X2764(degrees.)X X3 f X1440 3970(Swap)N X1646(Landscape)X X1 f X2016 4066(Swap)N X2215(the)X X2334(meaning)X X2631(of)X X2720(Landscape)X X3086(and)X X3224(Seascape.)X X3581(Most)X X3767(of)X X3856(the)X X3976(Landscape)X X2016 4162(documents)N X2392(that)X X2541(I)X X2597(have)X X2778(encountered)X X3199(require)X X3455(a)X X3519(90)X X3627(clockwise)X X3976(rotation)X X4253(of)X X2016 4258(the)N X2135(paper)X X2335(to)X X2418(view.)X X2655(However,)X X2991(there)X X3173(is)X X3248(no)X X3350(standard)X X3644(and)X X3782(some)X X3973(documents)X X2016 4354(need)N X2199(to)X X2292(be)X X2399(rotated)X X2653(the)X X2781(other)X X2976(way.)X X3180(The)X X3335(swap)X X3530(landscape)X X3877(button)X X4111(allows)X X2 f X2016 4450(ghostview)N X1 f X2385(to)X X2496(automatically)X X2981(rotate)X X3213(the)X X3360(document)X X3725(the)X X3873(right)X X4074(way)X X4258(in)X X2016 4546(response)N X2317(to)X X2399(the)X X3 f X2517(%%Orientation)X X1 f X3097(comment)X X3415(in)X X3497(the)X X3615(PostScript)X X3963(\256le.)X X3 f X864 4680(Media)N X1 f X1440(The)X X1599(entries)X X1847(on)X X1962(the)X X2095(Media)X X2335(menu)X X2548(set)X X2672(the)X X2805(page)X X2992(media.)X X3263(Media)X X3503(de\256ned)X X3774(in)X X3871(the)X X4004(document)X X1440 4776(appear)N X1688(at)X X1779(the)X X1910(beginning)X X2263(of)X X2363(the)X X2494(menu)X X2704(separated)X X3040(by)X X3152(a)X X3220(line)X X3372(from)X X3560(the)X X3690(standard)X X3994(media.)X X4262(A)X X1440 4872(`60`60dot'')N X1683(appears)X X1962(in)X X2058(front)X X2248(of)X X2349(the)X X2481(current)X X2743(media.)X X3013(The)X X3172(\256rst)X X3330(mouse)X X3573(button)X X3811(sets)X X3965(the)X X4097(default)X X1440 4968(media.)N X1705(The)X X1859(DSC)X X2043(comments)X X2401(may)X X2568(specify)X X2829(the)X X2956(page)X X3137(media)X X3361(that)X X3509(overrides)X X3836(the)X X3962(default.)X X4253(In)X X1440 5064(this)N X1578(case,)X X1760(a)X X1820("document")X X2226(appears)X X2496(in)X X2582(front)X X2762(of)X X2853(the)X X2975(current)X X3227(media.)X X3487(The)X X3636(second)X X3883(mouse)X X4116(button)X X1440 5160(can)N X1576(be)X X1676(used)X X1847(to)X X1933 0.4062(`60`60force'')AX X2231(the)X X2353(media)X X2573(on)X X2677(a)X X2737(document)X X3077(to)X X3163(override)X X3455(the)X X3576(DSC)X X3754(comments.)X X4146(Forc-)X X1440 5256(ing)N X1565(the)X X1686(media)X X1905(on)X X2008(an)X X2107(EPSF)X X2311(\256gure)X X2521(will)X X2669(override)X X2961(the)X X3083(Bounding)X X3422(Box.)X X3619(This)X X3785(makes)X X4014(is)X X4091(easy)X X4258(to)X X1440 5352(view)N X1619(a)X X1678(\256gure)X X1888(with)X X2053(an)X X2152(incorrect)X X3 f X2461(%%BoundingBox)X X1 f X3107(comment.)X X3467(If)X X3543(a)X X3601(media)X X3819(is)X X3894(being)X X4094(forced,)X X1440 5448(then)N X1598(a)X X1654(`60`60tie)X X1808(\256ghter'')X X2091(will)X X2235(appear)X X2470(in)X X2552(front)X X2728(of)X X2815(the)X X2933(current)X X3181(media.)X X1440 5640(Here)N X1625(are)X X1752(the)X X1878(standard)X X2178(media)X X2402(names)X X2635(and)X X2779(their)X X2954(sizes.)X X3178(The)X X3331(size)X X3484(is)X X3565(given)X X3771(as)X X3866(the)X X3993(width)X X4204(and)X X1440 5736(height)N X1660(in)X X1742(PostScript)X X2090(points.)X X3 f X1440 5832(Letter)N X1 f X2324(612)X X2464(x)X X2544(792)X X3168(\(8.5)X X3315(x)X X3375(11)X X3495(in.\))X X576 6216(7th)N X698(Edition)X X4280(3)X X X4 p X%%Page: 4 4 X10 s 10 xH 0 xS 1 f X576 384(GHOSTVIEW)N X1066(\()X X1106(1)X X1159(\))X X1975(UNIX)X X2196(Programmer's)X X2675(Manual)X X3710(GHOSTVIEW)X X4200(\()X X4240(1)X X4293(\))X X3 f X1440 768(Tabloid)N X1 f X2324(792)X X2464(x)X X2524(1224)X X3168(\(11)X X3315(x)X X3375(17)X X3495(in.\))X X3 f X1440 864(Ledger)N X1 f X2304(1224)X X2484(x)X X2564(792)X X3168(\(17)X X3315(x)X X3375(11)X X3495(in.\))X X3 f X1440 960(Legal)N X1 f X2324(612)X X2464(x)X X2524(1008)X X3168(\(8.5)X X3315(x)X X3375(14)X X3495(in.\))X X3 f X1440 1056(Statement)N X1 f X2324(396)X X2464(x)X X2544(612)X X3168(\(5.5)X X3315(x)X X3375(8.5)X X3495(in.\))X X3 f X1440 1152(Executive)N X1 f X2324(540)X X2464(x)X X2544(720)X X3168(\(7.5)X X3315(x)X X3375(10)X X3495(in.\))X X3 f X1440 1248(A3)N X1 f X2324(842)X X2464(x)X X2524(1190)X X3 f X1440 1344(A4)N X1 f X2324(595)X X2464(x)X X2544(842)X X3 f X1440 1440(A5)N X1 f X2324(420)X X2464(x)X X2544(595)X X3 f X1440 1536(B4)N X1 f X2324(729)X X2464(x)X X2524(1032)X X3 f X1440 1632(B5)N X1 f X2324(516)X X2464(x)X X2544(729)X X3 f X1440 1728(Folio)N X1 f X2324(612)X X2464(x)X X2544(936)X X3168(\(8.5)X X3315(x)X X3375(13)X X3495(in.\))X X3 f X1440 1824(Quarto)N X1 f X2324(610)X X2464(x)X X2544(780)X X3 f X1440 1920(10x14)N X1 f X2324(720)X X2464(x)X X2524(1008)X X3168(\(10)X X3315(x)X X3375(14)X X3495(in.\))X X3 f X9 s X576 2054(KEYBOARD)N X1022(ACCELERATORS)X X1 f X10 s X864 2150(Most)N X1049(of)X X1137(the)X X1256(popup)X X1477(menu)X X1676(commands)X X2044(have)X X2217(an)X X2314(equivalent)X X2669(action)X X2886(that)X X3027(can)X X3160(be)X X3257(invoked)X X3536(from)X X3714(the)X X3834(keyboard.)X X4195(The)X X864 2246(popup)N X1089(menu)X X1292(entry)X X1482(must)X X1662(be)X X1763(sensitive)X X2068(\(i.e.)X X2218(not)X X2345(grayed)X X2589(out\))X X2743(for)X X2862(the)X X2985(action)X X3206(to)X X3293(have)X X3469(effect.)X X3717(Here)X X3898(is)X X3975(the)X X4097(default)X X864 2342(keyboard)N X1183(binding:)X X3 f X864 2476(Q)N X1 f X1440(Bound)X X1678(to)X X3 f X1765(GhostviewQuit\(\))X X1 f X2359(which)X X2580(is)X X2658(equivalent)X X3017(to)X X3104(pushing)X X3382(the)X X3 f X3505(Quit)X X1 f X3685(menu)X X3888(button)X X4117(on)X X4222(the)X X3 f X1440 2572(Ghostview)N X1 f X1820(menu.)X X3 f X864 2706(O)N X1 f X1440(Bound)X X1678(to)X X3 f X1765(GhostviewOpen\(\))X X1 f X2390(which)X X2611(is)X X2689(equivalent)X X3048(to)X X3135(pushing)X X3413(the)X X3 f X3536(Open...)X X1 f X3807(menu)X X4010(button)X X4240(on)X X1440 2802(the)N X3 f X1558(File)X X1 f X1707(menu.)X X3 f X864 2936(R)N X1 f X1440(Bound)X X1680(to)X X3 f X1769(GhostviewReopen\(\))X X1 f X2468(which)X X2691(is)X X2771(equivalent)X X3132(to)X X3221(pushing)X X3501(the)X X3 f X3626(Reopen)X X1 f X3911(menu)X X4116(button)X X1440 3032(on)N X1540(the)X X3 f X1658(File)X X1 f X1807(menu.)X X3 f X864 3166(S)N X1 f X1440(Bound)X X1685(to)X X3 f X1779(GhostviewSave\(\))X X1 f X2385(which)X X2613(is)X X2698(equivalent)X X3064(to)X X3159(pushing)X X3445(the)X X3 f X3576(Save)X X3769(marked)X X4069(pages...)X X1 f X1440 3262(menu)N X1638(button)X X1862(on)X X1962(the)X X3 f X2080(File)X X1 f X2229(menu.)X X3 f X864 3396(P)N X1 f X1440(Bound)X X1682(to)X X3 f X1773(GhostviewPrintMarked\(\))X X1 f X2670(which)X X2895(is)X X2978(equivalent)X X3342(to)X X3434(pushing)X X3717(the)X X3 f X3845(Print)X X4053(marked)X X1440 3492(pages...)N X1 f X1711(menu)X X1909(button)X X2133(on)X X2233(the)X X3 f X2351(File)X X1 f X2500(menu.)X X3 f X864 3626(Shift)N X9 f X1028(-)X X1030(-)X X3 f X1074(P)X X1 f X1440(Bound)X X1675(to)X X3 f X1759(GhostviewPrintWhole\(\))X X1 f X2595(which)X X2814(is)X X2890(equivalent)X X3247(to)X X3332(pushing)X X3608(the)X X3 f X3729(Print...)X X1 f X3990(menu)X X4191(but-)X X1440 3722(ton)N X1562(on)X X1662(the)X X3 f X1780(File)X X1 f X1929(menu.)X X3 f X864 3856(BackSpace)N X1 f X1237(,)X X3 f X1277(Delete)X X1 f X1492(,)X X3 f X1532(Prior)X X1 f X1715(,)X X3 f X1755(B)X X1 f X1440 3952(Bound)N X1679(to)X X3 f X1767(GhostviewPrevious\(\))X X1 f X2505(which)X X2727(is)X X2806(equivalent)X X3167(to)X X3256(pushing)X X3536(the)X X3 f X3661(Previous)X X1 f X3986(menu)X X4191(but-)X X1440 4048(ton)N X1562(on)X X1662(the)X X3 f X1780(Page)X X1 f X1965(menu.)X X3 f X864 4182(space)N X1 f X1051(,)X X3 f X1091(Return)X X1 f X1336(,)X X3 f X1376(Next)X X1 f X1537(,)X X3 f X1577(F)X X1 f X1440 4278(Bound)N X1677(to)X X3 f X1763(GhostviewNext\(\))X X1 f X2362(which)X X2582(is)X X2659(equivalent)X X3017(to)X X3103(pushing)X X3380(the)X X3 f X3502(Next)X X1 f X3687(menu)X X3889(button)X X4117(on)X X4222(the)X X3 f X1440 4374(Page)N X1 f X1625(menu.)X X3 f X864 4508(period)N X1 f X1086(,)X X3 f X1126(Ctrl)X X9 f X1269(-)X X1271(-)X X3 f X1315(L)X X1 f X1440(Bound)X X1679(to)X X3 f X1767(GhostviewShow\(\))X X1 f X2393(which)X X2615(is)X X2694(equivalent)X X3054(to)X X3142(pushing)X X3422(the)X X3 f X3547(Redisplay)X X1 f X3911(menu)X X4116(button)X X1440 4604(on)N X1540(the)X X3 f X1658(Page)X X1 f X1843(menu.)X X3 f X864 4738(M)N X1 f X1440(Bound)X X1681(to)X X3 f X1771(GhostviewMark\(\))X X1 f X2409(which)X X2633(is)X X2714(equivalent)X X3076(to)X X3166(pushing)X X3448(the)X X3 f X3575(Mark)X X1 f X3800(menu)X X4007(button)X X4240(on)X X1440 4834(the)N X3 f X1558(Page)X X1 f X1743(menu.)X X3 f X864 4968(N)N X1 f X1440(Bound)X X1673(to)X X3 f X1755(GhostviewUnMark\(\))X X1 f X2487(which)X X2703(is)X X2776(equivalent)X X3131(to)X X3214(pushing)X X3488(the)X X3 f X3607(Unmark)X X1 f X3917(menu)X X4116(button)X X1440 5064(on)N X1540(the)X X3 f X1658(Page)X X1 f X1843(menu.)X X3 f X864 5198(0)N X1 f X1440(Bound)X X1673(to)X X3 f X1755(GhostviewMagstep\(0\))X X1 f X2523(which)X X2739(is)X X2812(equivalent)X X3166(to)X X3248(pushing)X X3521(the)X X3 f X3639(0)X X1 f X3699(menu)X X3897(button)X X4121(on)X X4222(the)X X3 f X1440 5294(Magstep)N X1 f X1754(menu.)X X3 f X864 5428(1)N X1 f X1440(Bound)X X1673(to)X X3 f X1755(GhostviewMagstep\(1\))X X1 f X2523(which)X X2739(is)X X2812(equivalent)X X3166(to)X X3248(pushing)X X3521(the)X X3 f X3639(1)X X1 f X3699(menu)X X3897(button)X X4121(on)X X4222(the)X X3 f X1440 5524(Magstep)N X1 f X1754(menu.)X X3 f X864 5658(2)N X1 f X1440(Bound)X X1673(to)X X3 f X1755(GhostviewMagstep\(2\))X X1 f X2523(which)X X2739(is)X X2812(equivalent)X X3166(to)X X3248(pushing)X X3521(the)X X3 f X3639(2)X X1 f X3699(menu)X X3897(button)X X4121(on)X X4222(the)X X3 f X1440 5754(Magstep)N X1 f X1754(menu.)X X576 6144(7th)N X698(Edition)X X4280(4)X X X5 p X%%Page: 5 5 X10 s 10 xH 0 xS 1 f X576 384(GHOSTVIEW)N X1066(\()X X1106(1)X X1159(\))X X1975(UNIX)X X2196(Programmer's)X X2675(Manual)X X3710(GHOSTVIEW)X X4200(\()X X4240(1)X X4293(\))X X3 f X864 768(3)N X1 f X1440(Bound)X X1673(to)X X3 f X1755(GhostviewMagstep\(3\))X X1 f X2523(which)X X2739(is)X X2812(equivalent)X X3166(to)X X3248(pushing)X X3521(the)X X3 f X3639(3)X X1 f X3699(menu)X X3897(button)X X4121(on)X X4222(the)X X3 f X1440 864(Magstep)N X1 f X1754(menu.)X X3 f X864 998(4)N X1 f X1440(Bound)X X1673(to)X X3 f X1755(GhostviewMagstep\(4\))X X1 f X2523(which)X X2739(is)X X2812(equivalent)X X3166(to)X X3248(pushing)X X3521(the)X X3 f X3639(4)X X1 f X3699(menu)X X3897(button)X X4121(on)X X4222(the)X X3 f X1440 1094(Magstep)N X1 f X1754(menu.)X X3 f X864 1228(5)N X1 f X1440(Bound)X X1673(to)X X3 f X1755(GhostviewMagstep\(5\))X X1 f X2523(which)X X2739(is)X X2812(equivalent)X X3166(to)X X3248(pushing)X X3521(the)X X3 f X3639(5)X X1 f X3699(menu)X X3897(button)X X4121(on)X X4222(the)X X3 f X1440 1324(Magstep)N X1 f X1754(menu.)X X3 f X864 1458(+)N X1 f X1440(Bound)X X1673(to)X X3 f X1755(GhostviewIncreaseMagstep\(\))X X1 f X2773(which)X X2989(increases)X X3304(the)X X3422(magstep)X X3709(by)X X3809(1.)X X3 f X864 1592(-)N X1 f X1440(Bound)X X1673(to)X X3 f X1755 0.1650(GhostviewDecreaseMagstep\(\))AX X1 f X2792(which)X X3008(decreases)X X3337(the)X X3455(magstep)X X3742(by)X X3842(1.)X X3 f X864 1726(U)N X1 f X1440(Bound)X X1673(to)X X3 f X1755(GhostviewUp\(\))X X1 f X2291(which)X X2507(scrolls)X X2736(the)X X2854(main)X X3034(viewport)X X3339(up.)X X3 f X864 1860(D)N X1 f X1440(Bound)X X1673(to)X X3 f X1755(GhostviewDown\(\))X X1 f X2389(which)X X2605(scrolls)X X2834(the)X X2952(main)X X3132(viewport)X X3437(down.)X X3 f X864 1994(H)N X1 f X1440(Bound)X X1673(to)X X3 f X1755(GhostviewLeft\(\))X X1 f X2332(which)X X2548(scrolls)X X2777(the)X X2895(main)X X3075(viewport)X X3380(left.)X X3 f X864 2128(J)N X1 f X1440(Bound)X X1673(to)X X3 f X1755(GhostviewDown\(\))X X1 f X2389(which)X X2605(scrolls)X X2834(the)X X2952(main)X X3132(viewport)X X3437(down.)X X3 f X864 2262(K)N X1 f X1440(Bound)X X1673(to)X X3 f X1755(GhostviewUp\(\))X X1 f X2291(which)X X2507(scrolls)X X2736(the)X X2854(main)X X3034(viewport)X X3339(up.)X X3 f X864 2396(L)N X1 f X1440(Bound)X X1673(to)X X3 f X1755(GhostviewRight\(\))X X1 f X2380(which)X X2596(scrolls)X X2825(the)X X2943(main)X X3123(viewport)X X3428(right.)X X3 f X864 2530(Up)N X1 f X986(\(arrow\))X X1440(Bound)X X1679(to)X X3 f X1768(GhostviewDefault\(\))X X2463(GhostviewSetOrientation\(portrait\))X X1 f X3683(which)X X3906(is)X X3986(equivalent)X X1440 2626(to)N X1522(pushing)X X3 f X1795(Portrait)X X1 f X2092(with)X X2254(the)X X2372(\256rst)X X2516(mouse)X X2745(button)X X2969(on)X X3069(the)X X3 f X3187(Orientation)X X1 f X3607(menu.)X X3 f X864 2760(Right)N X1 f X1075(\(arrow\))X X1440(Bound)X X1739(to)X X3 f X1887(GhostviewDefault\(\))X X2641(GhostviewSetOrientation\(landscape\))X X1 f X3985(which)X X4267(is)X X1440 2856(equivalent)N X1794(to)X X1876(pushing)X X3 f X2149(Landscape)X X1 f X2537(with)X X2699(the)X X2817(\256rst)X X2961(mouse)X X3190(button)X X3414(on)X X3514(the)X X3 f X3632(Orientation)X X1 f X4052(menu.)X X3 f X864 2990(Down)N X1 f X1084(\(arrow\))X X1440(Bound)X X1715(to)X X3 f X1840(GhostviewDefault\(\))X X2571(GhostviewSetOrientation\(upside)X X9 f X3686(-)X X3688(-)X X3 f X3732(down\))X X1 f X4008(which)X X4267(is)X X1440 3086(equivalent)N X1812(to)X X1912(pushing)X X3 f X2202(Upside)X X9 f X2437(-)X X2439(-)X X3 f X2483(down)X X1 f X2706(with)X X2885(the)X X3020(\256rst)X X3181(mouse)X X3427(button)X X3668(on)X X3785(the)X X3 f X3920(Orientation)X X1 f X1440 3182(menu.)N X3 f X864 3316(Left)N X1 f X1027(\(arrow\))X X1440(Bound)X X1676(to)X X3 f X1761(GhostviewDefault\(\))X X2452(GhostviewSetOrientation\(seascape\))X X1 f X3690(which)X X3909(is)X X3986(equivalent)X X1440 3412(to)N X1522(pushing)X X3 f X1795(Seascape)X X1 f X2122(with)X X2284(the)X X2402(\256rst)X X2546(mouse)X X2775(button)X X2999(on)X X3099(the)X X3 f X3217(Orientation)X X1 f X3637(menu.)X X3 f X864 3546(Shift)N X9 f X1028(-)X X1030(-)X X3 f X1074(Up)X X1 f X1196(\(arrow\))X X1440 3642(Bound)N X1675(to)X X3 f X1759(GhostviewForce\(\))X X2392(GhostviewSetOrientation\(portrait\))X X1 f X3607(which)X X3825(is)X X3901(equivalent)X X4258(to)X X1440 3738(pushing)N X3 f X1713(Portrait)X X1 f X2010(with)X X2172(the)X X2290(second)X X2533(mouse)X X2762(button)X X2986(on)X X3086(the)X X3 f X3204(Orientation)X X1 f X3624(menu.)X X3 f X864 3872(Shift)N X9 f X1028(-)X X1030(-)X X3 f X1074(Right)X X1 f X1285(\(arrow\))X X1440 3968(Bound)N X1678(to)X X3 f X1765(GhostviewForce\(\))X X2401(GhostviewSetOrientation\(landscape\))X X1 f X3685(which)X X3907(is)X X3986(equivalent)X X1440 4064(to)N X1522(pushing)X X3 f X1795(Landscape)X X1 f X2183(with)X X2345(the)X X2463(second)X X2706(mouse)X X2935(button)X X3159(on)X X3259(the)X X3 f X3377(Orientation)X X1 f X3797(menu.)X X3 f X864 4198(Shift)N X9 f X1028(-)X X1030(-)X X3 f X1074(Down)X X1 f X1294(\(arrow\))X X1440 4294(Bound)N X1727(to)X X3 f X1863(GhostviewForce\(\))X X2548(GhostviewSetOrientation\(upside)X X9 f X3663(-)X X3665(-)X X3 f X3709(down\))X X1 f X3996(which)X X4267(is)X X1440 4390(equivalent)N X1803(to)X X1894(pushing)X X3 f X2175(Upside)X X9 f X2410(-)X X2412(-)X X3 f X2456(down)X X1 f X2670(with)X X2840(the)X X2966(second)X X3217(mouse)X X3454(button)X X3686(on)X X3794(the)X X3 f X3920(Orientation)X X1 f X1440 4486(menu.)N X3 f X864 4620(Shift)N X9 f X1028(-)X X1030(-)X X3 f X1074(Left)X X1 f X1237(\(arrow\))X X1440 4716(Bound)N X1685(to)X X3 f X1779(GhostviewForce\(\))X X2423(GhostviewSetOrientation\(seascape\))X X1 f X3671(which)X X3900(is)X X3986(equivalent)X X1440 4812(to)N X1522(pushing)X X3 f X1795(Seascape)X X1 f X2122(with)X X2284(the)X X2402(second)X X2645(mouse)X X2874(button)X X3098(on)X X3198(the)X X3 f X3316(Orientation)X X1 f X3736(menu.)X X3 f X9 s X576 4946(ACTIONS)N X1 f X10 s X864 5042(Most)N X1049(of)X X1137(the)X X1256(popup)X X1477(menu)X X1676(commands)X X2044(have)X X2217(an)X X2314(equivalent)X X2670(action)X X2888(that)X X3030(can)X X3164(be)X X3262(used)X X3431(in)X X3515(a)X X3573(translation.)X X3973(The)X X4120(popup)X X864 5138(menu)N X1062(entry)X X1247(must)X X1422(be)X X1518(sensitive)X X1818(\(i.e.)X X1963(not)X X2085(grayed)X X2324(out\))X X2473(for)X X2587(the)X X2705(action)X X2921(to)X X3003(have)X X3175(effect.)X X3419(Here)X X3596(is)X X3669(the)X X3787(list)X X3904(of)X X3991(actions:)X X3 f X864 5272(GhostviewCopyright\(\))N X1 f X1440 5368(Equivalent)N X1807(to)X X1889(pushing)X X2162(the)X X3 f X2280(Copyright...)X X1 f X2711(menu)X X2909(button)X X3133(on)X X3233(the)X X3 f X3351(Ghostview)X X1 f X3731(menu.)X X3 f X864 5502(GhostviewQuit\(\))N X1 f X1440 5598(Equivalent)N X1807(to)X X1889(pushing)X X2162(the)X X3 f X2280(Quit)X X1 f X2455(menu)X X2653(button)X X2877(on)X X2977(the)X X3 f X3095(Ghostview)X X1 f X3475(menu.)X X3 f X864 5732(GhostviewOpen\(\))N X1 f X1440 5828(Equivalent)N X1807(to)X X1889(pushing)X X2162(the)X X3 f X2280(Open...)X X1 f X2546(menu)X X2744(button)X X2968(on)X X3068(the)X X3 f X3186(File)X X1 f X3335(menu.)X X576 6212(7th)N X698(Edition)X X4280(5)X X X6 p X%%Page: 6 6 X10 s 10 xH 0 xS 1 f X576 384(GHOSTVIEW)N X1066(\()X X1106(1)X X1159(\))X X1975(UNIX)X X2196(Programmer's)X X2675(Manual)X X3710(GHOSTVIEW)X X4200(\()X X4240(1)X X4293(\))X X3 f X864 768(GhostviewReopen\(\))N X1 f X1440 864(Equivalent)N X1807(to)X X1889(pushing)X X2162(the)X X3 f X2280(Reopen)X X1 f X2558(menu)X X2756(button)X X2980(on)X X3080(the)X X3 f X3198(File)X X1 f X3347(menu.)X X3 f X864 998(GhostviewSave\(\))N X1 f X1440 1094(Equivalent)N X1807(to)X X1889(pushing)X X2162(the)X X3 f X2280(Save)X X2460(marked)X X2747(pages...)X X1 f X3018(menu)X X3216(button)X X3440(on)X X3540(the)X X3 f X3658(File)X X1 f X3807(menu.)X X3 f X864 1228(GhostviewPrintWhole\(\))N X1 f X1440 1324(Equivalent)N X1807(to)X X1889(pushing)X X2162(the)X X3 f X2280(Print...)X X1 f X2538(menu)X X2736(button)X X2960(on)X X3060(the)X X3 f X3178(File)X X1 f X3327(menu.)X X3 f X864 1458(GhostviewPrintMarked\(\))N X1 f X1440 1554(Equivalent)N X1807(to)X X1889(pushing)X X2162(the)X X3 f X2280(Print)X X2478(marked)X X2765(pages...)X X1 f X3036(menu)X X3234(button)X X3458(on)X X3558(the)X X3 f X3676(File)X X1 f X3825(menu.)X X3 f X864 1688(GhostviewPrevious\(\))N X1 f X1440 1784(Equivalent)N X1807(to)X X1889(pushing)X X2162(the)X X3 f X2280(Previous)X X1 f X2598(menu)X X2796(button)X X3020(on)X X3120(the)X X3 f X3238(Page)X X1 f X3423(menu.)X X3 f X864 1918(GhostviewShow\(\))N X1 f X1440 2014(Equivalent)N X1807(to)X X1889(pushing)X X2162(the)X X3 f X2280(Redisplay)X X1 f X2637(menu)X X2835(button)X X3059(on)X X3159(the)X X3 f X3277(Page)X X1 f X3462(menu.)X X3 f X864 2148(GhostviewNext\(\))N X1 f X1440 2244(Equivalent)N X1807(to)X X1889(pushing)X X2162(the)X X3 f X2280(Next)X X1 f X2461(menu)X X2659(button)X X2883(on)X X2983(the)X X3 f X3101(Page)X X1 f X3286(menu.)X X3 f X864 2378(GhostviewCenter\(\))N X1 f X1440 2474(Equivalent)N X1807(to)X X1889(pushing)X X2162(the)X X3 f X2280(Center)X X1 f X2537(menu)X X2735(button)X X2959(on)X X3059(the)X X3 f X3177(Page)X X1 f X3362(menu.)X X3 f X864 2608(GhostviewMark\(\))N X1 f X1440 2704(Equivalent)N X1807(to)X X1889(pushing)X X2162(the)X X3 f X2280(Mark)X X1 f X2496(menu)X X2694(button)X X2918(on)X X3018(the)X X3 f X3136(Page)X X1 f X3321(menu.)X X3 f X864 2838(GhostviewUnmark\(\))N X1 f X1440 2934(Equivalent)N X1807(to)X X1889(pushing)X X2162(the)X X3 f X2280(Unmark)X X1 f X2589(menu)X X2787(button)X X3011(on)X X3111(the)X X3 f X3229(Page)X X1 f X3414(menu.)X X3 f X864 3068(GhostviewSetMagstep\(magstep\))N X1 f X1440 3164(Sets)N X1593(the)X X1711(magstep.)X X2038(The)X X2183(parameter)X X2525(must)X X2700(be)X X2796(an)X X2892(integer.)X X3 f X864 3298(GhostviewIncreaseMagstep\(\))N X1 f X1440 3394(Increases)N X1760(magstep)X X2047(by)X X2147(one.)X X3 f X864 3528 0.1650(GhostviewDecreaseMagstep\(\))AN X1 f X1440 3624(Decreases)N X1787(magstep)X X2074(by)X X2174(one.)X X3 f X864 3758(GhostviewSetOrientation\(orientation\))N X1 f X1440 3854(Set)N X1564(the)X X1684(orientation)X X2053(to)X X2137(the)X X2257(passed)X X2493(parameter.)X X2878(The)X X3026(parameter)X X3371(must)X X3549(be)X X3 f X3648(portrait)X X1 f X3920(,)X X3 f X3963(landscape)X X1 f X4300(,)X X3 f X1440 3950(upside)N X9 f X1661(-)X X1663(-)X X3 f X1707(down)X X1 f X1893(,)X X1933(or)X X3 f X2020(seascape)X X1 f X2314(.)X X3 f X864 4084(GhostviewSwapLandscape\(\))N X1 f X1440 4180(Equivalent)N X1807(to)X X1889(pushing)X X2162(the)X X3 f X2280(Swap)X X2486(Landscape)X X1 f X2874(menu)X X3072(button)X X3296(on)X X3396(the)X X3 f X3514(Orientation)X X1 f X3934(menu.)X X3 f X864 4314(GhostviewSetPageMedia\(media)N X9 f X1950(-)X X1952(-)X X3 f X1996(name\))X X1 f X1440 4410(Sets)N X1602(the)X X1729(media.)X X1994(The)X X2149(parameter)X X2501(should)X X2744(be)X X2850(either)X X3063(a)X X3129(media)X X3355(de\256ned)X X3621(in)X X3713(the)X X3841(document)X X4187(or)X X4284(a)X X1440 4506(standard)N X1732(media.)X X3 f X864 4640(GhostviewDefault\(\))N X1 f X1440 4736(The)N X1591(orientation)X X1964(or)X X2057(media)X X2279(being)X X2483(set)X X2599(is)X X2679(not)X X2808(forced)X X3041(on)X X3148(the)X X3273(document.)X X3656(This)X X3825(action)X X4048(is)X X4128(called)X X1440 4832(before)N X1666(the)X X1784(action)X X2000(that)X X2140(sets)X X2280(the)X X2398(orientation)X X2765(or)X X2852(media.)X X3 f X864 4966(GhostviewForce\(\))N X1 f X1440 5062(The)N X1600(orientation)X X1982(or)X X2085(media)X X2317(being)X X2531(set)X X2656(is)X X2745(forced)X X2987(on)X X3103(the)X X3237(document.)X X3629(This)X X3807(action)X X4039(is)X X4128(called)X X1440 5158(before)N X1666(the)X X1784(action)X X2000(that)X X2140(sets)X X2280(the)X X2398(orientation)X X2765(or)X X2852(media.)X X3 f X864 5292(GhostviewDeleteWindow\(\))N X1 f X1440 5388(Destroy)N X1716(the)X X1836(current)X X2086(window.)X +-+-+-+-+-+-+-+- END OF PART 6 +-+-+-+-+-+-+-+- Return-Path: mccall!tp@!mccall.com Delivery-Date: Tue, 27 Oct 92 19:39:19 -0600 Return-Path: mccall!tp@!mccall.com Received: from cs.wisc.edu by appenzell.cs.wisc.edu; Tue, 27 Oct 92 19:39:05 -0600 Received: from depot.cis.ksu.edu by cs.wisc.edu; Tue, 27 Oct 92 19:39:01 -0600 Return-Path: Received: from mccall.UUCP by depot.cis.ksu.edu UUCP (5.65a) id AA20183; Tue, 27 Oct 92 19:38:05 -0600 Received: by mccall.com (DECUS UUCP /1.3-1/2.5/); Tue, 27 Oct 92 19:13:48 CST Received: by mccall.com (MX V3.1C) id 12849; Tue, 27 Oct 1992 19:13:38 CST Date: Tue, 27 Oct 1992 19:13:40 CST From: Terry Poot To: tim Message-Id: <00962BB4.5F966D80.12849@mccall.com> Subject: Ghostview for VMS 07/14 -+-+-+-+-+-+-+-+ START OF PART 7 -+-+-+-+-+-+-+-+ X2406(This)X X2570(provides)X X2868(a)X X2926(way)X X3083(to)X X3168(implement)X X3533(the)X X3654(Delete)X X3887(Window)X X4186(pro-)X X1440 5484(tocol)N X1620(for)X X1734(window)X X2012(managers.)X X3 f X864 5618(GhostviewDismiss\(\))N X1 f X1440 5714(Pop)N X1593(down)X X1800(the)X X1927(current)X X2184(window.)X X2511(This)X X2682(provides)X X2987(a)X X3052(way)X X3215(to)X X3306(implement)X X3677(the)X X3804(Delete)X X4044(Window)X X1440 5810(protocol)N X1727(for)X X1841(window)X X2119(managers.)X X576 6194(7th)N X698(Edition)X X4280(6)X X X7 p X%%Page: 7 7 X10 s 10 xH 0 xS 1 f X576 384(GHOSTVIEW)N X1066(\()X X1106(1)X X1159(\))X X1975(UNIX)X X2196(Programmer's)X X2675(Manual)X X3710(GHOSTVIEW)X X4200(\()X X4240(1)X X4293(\))X X3 f X864 768(GhostviewScrollUp\(\))N X1 f X1440 864(Scroll)N X1651(the)X X1769(main)X X1949(viewport)X X2254(up.)X X3 f X864 998(GhostviewScrollDown\(\))N X1 f X1440 1094(Scroll)N X1651(the)X X1769(main)X X1949(viewport)X X2254(down.)X X3 f X864 1228(GhostviewScrollLeft\(\))N X1 f X1440 1324(Scroll)N X1651(the)X X1769(main)X X1949(viewport)X X2254(left.)X X3 f X864 1458(GhostviewScrollRight\(\))N X1 f X1440 1554(Scroll)N X1651(the)X X1769(main)X X1949(viewport)X X2254(right.)X X3 f X864 1688(GhostviewEraseLocator\(\))N X1 f X1440 1784(Used)N X1625(to)X X1707(erase)X X1893(the)X X2011(locator)X X2254(when)X X2448(leaving)X X2704(a)X X2760(Ghostview)X X3127(widget.)X X3 f X864 1918(GhostviewCheckFile\(\))N X1 f X1440 2014(Checks)N X1696(to)X X1778(see)X X1901(if)X X1970(the)X X2088(\256le)X X2210(changed)X X2498(and)X X2634(refreshes)X X2945(the)X X3063(screen)X X3289(if)X X3358(necessary.)X X3 f X9 s X576 2148(APPLICATION)N X1110(RESOURCES)X X1 f X10 s X864 2244(The)N X1009(following)X X1340(application)X X1716(resources)X X2040(may)X X2198(be)X X2294(set)X X2403(to)X X2485(control)X X2732(the)X X2850(default)X X3093(behavior)X X3394(of)X X2 f X3481(ghostview)X X1 f X(.)S X3 f X864 2378(showTitle)N X1217(\()X X1 f X1244(class)X X3 f X1420(Labels\))X X1 f X1440 2474(Tells)N X1620(whether)X X1899(to)X X1981(display)X X2232(the)X X3 f X2350(%%Title)X X1 f X2690(comment.)X X3048(The)X X3193(default)X X3436(is)X X3509(`60`60true''.)X X3 f X864 2608(showDate)N X1218(\()X X1 f X1245(class)X X3 f X1421(Labels\))X X1 f X1440 2704(Tells)N X1620(whether)X X1899(to)X X1981(display)X X2232(the)X X3 f X2350(%%Data)X X1 f X2695(comment.)X X3053(The)X X3198(default)X X3441(is)X X3514(`60`60true''.)X X3 f X864 2838(showLocator)N X1329(\()X X1 f X1356(class)X X3 f X1532(Labels\))X X1 f X1440 2934(Tells)N X1620(whether)X X1899(to)X X1981(display)X X2232(the)X X2350(locator.)X X2633(The)X X2778(default)X X3021(is)X X3094(`60`60true''.)X X3 f X864 3068(installStdCmap)N X1416(\()X X1 f X1443(class)X X3 f X1619(InstallStdCmap\))X X1 f X1440 3164(Tells)N X1620(whether)X X1899(to)X X1981(attempt)X X2241(to)X X2323(install)X X2538(a)X X2594(standard)X X2886(colormap.)X X3249(The)X X3394(default)X X3637(is)X X3710(`60`60false''.)X X3 f X864 3298(privateCmap)N X1338(\()X X1 f X1365(class)X X3 f X1541(PrivateCmap\))X X1 f X1440 3394(Tells)N X1622(whether)X X1903(to)X X1987(use)X X2116(a)X X2175(standard)X X2470(colormap)X X2796(that)X X2939(is)X X3015(not)X X3140(the)X X3261(default)X X3507(colormap.)X X3873(The)X X4021(default)X X4267(is)X X1440 3490(`60`60false''.)N X3 f X864 3624(autoCenter)N X1272(\()X X1 f X1299(class)X X3 f X1475(AutoCenter\))X X1 f X1440 3720(Tells)N X1630(whether)X X1919(to)X X2011(center)X X2238(the)X X2366(page)X X2549(within)X X2784(the)X X2913(viewport)X X3229(whenever)X X3573(the)X X3702(page)X X3885(size)X X4041(changes.)X X1440 3816(The)N X1585(default)X X1828(is)X X1901(`60`60true''.)X X3 f X864 3950(horizonalMargin)N X1466(\()X X1 f X1493(class)X X3 f X1669(Margin\))X X1 f X1440 4046(Tells)N X1623(how)X X1784(many)X X1985(pixels)X X2199(ghostview)X X2552(should)X X2789(reserve)X X3046(for)X X3164(window)X X3446(decorations)X X3840(in)X X3926(the)X X4048(horizon-)X X1440 4142(tal)N X1540(direction.)X X1885(The)X X2030(default)X X2273(value)X X2467(is)X X2540(`60`6020''.)X X3 f X864 4276(verticalMargin)N X1401(\()X X1 f X1428(class)X X3 f X1604(Margin\))X X1 f X1440 4372(Tells)N X1626(how)X X1790(many)X X1994(pixels)X X2211(ghostview)X X2566(should)X X2805(reserve)X X3064(for)X X3184(window)X X3468(decorations)X X3865(in)X X3954(the)X X4079(vertical)X X1440 4468(direction.)N X1785(The)X X1930(default)X X2173(value)X X2367(is)X X2440(`60`6044''.)X X3 f X864 4602(minimumMagstep)N X1511(\()X X1 f X1538(class)X X3 f X1714(Magstep\))X X1 f X1440 4698(Tells)N X1620(the)X X1738(smallest)X X2020(magstep)X X2307(to)X X2389(display.)X X2680(The)X X2825(default)X X3068(is)X X3141(`60`60-5''.)X X3 f X864 4832(maximumMagstep)N X1525(\()X X1 f X1552(class)X X3 f X1728(Magstep\))X X1 f X1440 4928(Tells)N X1620(the)X X1738(largest)X X1972(magstep)X X2259(to)X X2341(display.)X X2632(The)X X2777(default)X X3020(is)X X3093(`60`605''.)X X3 f X864 5062(magstep)N X1169(\()X X1 f X1196(class)X X3 f X1372(Magstep\))X X1 f X1440 5158(Sets)N X1593(the)X X1711(default)X X1954(magstep.)X X2281(The)X X2426(default)X X2669(is)X X2742(`60`600''.)X X3 f X864 5292(orientation)N X1262(\()X X1 f X1289(class)X X3 f X1465(Orientation\))X X1 f X1440 5388(Sets)N X1593(the)X X1711(default)X X1954(orientation.)X X2361(The)X X2506(default)X X2749(is)X X2822(`60`60Portrait''.)X X3 f X864 5522(page)N X1044(\()X X1 f X1071(class)X X3 f X1247(Page\))X X1 f X1440 5618(Gives)N X1652(the)X X1775(initial)X X1986(page)X X2163(to)X X2250(display.)X X2546(This)X X2713(resource)X X3012(only)X X3180(affects)X X3421(the)X X3545(display)X X3802(of)X X3895(the)X X4019(\256le)X X4147(listed)X X1440 5714(on)N X1540(the)X X1658(command)X X1994(line.)X X2174(The)X X2319(default)X X2562(is)X X2635(NULL.)X X576 6144(7th)N X698(Edition)X X4280(7)X X X8 p X%%Page: 8 8 X10 s 10 xH 0 xS 1 f X576 384(GHOSTVIEW)N X1066(\()X X1106(1)X X1159(\))X X1975(UNIX)X X2196(Programmer's)X X2675(Manual)X X3710(GHOSTVIEW)X X4200(\()X X4240(1)X X4293(\))X X3 f X864 768(pageMedia)N X1262(\()X X1 f X1289(class)X X3 f X1465(PageMedia\))X X1 f X1440 864(Sets)N X1593(the)X X1711(default)X X1954(page)X X2126(media.)X X2382(The)X X2527(default)X X2770(is)X X2843(`60`60Letter''.)X X3 f X864 998(forceOrientation)N X1459(\()X X1 f X1486(class)X X3 f X1662(Force\))X X1 f X1440 1094(Tells)N X1620(whether)X X1899(to)X X1981(force)X X2167(the)X X2285(orientation)X X2652(on)X X2752(the)X X2870(document.)X X3246(The)X X3391(default)X X3634(is)X X3707(`60`60false''.)X X3 f X864 1228(forcePageMedia)N X1442(\()X X1 f X1469(class)X X3 f X1645(Force\))X X1 f X1440 1324(Tells)N X1620(whether)X X1899(to)X X1981(force)X X2167(the)X X2285(page)X X2457(media)X X2673(on)X X2773(the)X X2891(document.)X X3267(The)X X3412(default)X X3655(is)X X3728(`60`60false''.)X X3 f X864 1458(swapLandscape)N X1425(\()X X1 f X1452(class)X X3 f X1628(SwapLandscape\))X X1 f X1440 1554(Tells)N X1620(whether)X X1899(to)X X1981(swap)X X2166(the)X X2284(meaning)X X2580(of)X X2667(Landscape)X X3031(and)X X3167(Seascape.)X X3522(The)X X3667(default)X X3910(is)X X3983(`60`60false''.)X X3 f X864 1688(printCommand)N X1417(\()X X1 f X1444(class)X X3 f X1620(PrintCommand\))X X1 f X1440 1784(Sets)N X1611(the)X X1747(command)X X2101(used)X X2286(for)X X2418(printing.)X X2749(The)X X2912(printer)X X3164(environment)X X3607(variable)X X3904(is)X X3995(set)X X4122(to)X X4222(the)X X1440 1880(desired)N X1700(printer)X X1942(and)X X2086(then)X X2252(this)X X2395(command)X X2739(is)X X2819(executed)X X3132(using)X X3332(popen.)X X3595(This)X X3764(command)X X4107(should)X X1440 1976(read)N X1599(from)X X1775(`60`60stdin'')X X2058(and)X X2194(send)X X2361(the)X X2479(\256le)X X2601(to)X X2683(the)X X2802(appropriate)X X3189(printer.)X X3464(The)X X3610(default)X X3854(value)X X4049(is)X X4123(`60`60lpr'')X X1440 2072(for)N X1554(BSD)X X1729(and)X X1865(`60`60lp'')X X2055(for)X X2169(System)X X2424(V.)X X3 f X864 2206(printerVariable)N X1427(\()X X1 f X1454(class)X X3 f X1630(PrinterVariable\))X X1 f X1440 2302(Gives)N X1653(the)X X1777(name)X X1978(of)X X2072(the)X X2197(printer)X X2438(environment)X X2870(variable.)X X3196(The)X X3348(default)X X3598(value)X X3799(is)X X3879(`60`60PRINTER'')X X1440 2398(for)N X1554(BSD)X X1729(and)X X1865(`60`60LPDEST'')X X2286(for)X X2400(System)X X2655(V.)X X3 f X864 2532(defaultPrinter)N X1374(\()X X1 f X1401(class)X X3 f X1577(DefaultPrinter\))X X1 f X1440 2628(Gives)N X1661(the)X X1793(printer)X X2041(name)X X2249(to)X X2345(use)X X2486(when)X X2694(the)X X2826(printer)X X3074(environment)X X3513(variable)X X3806(is)X X3894(not)X X4031(set.)X X4195(The)X X1440 2724(default)N X1683(value)X X1877(is)X X1950(NULL.)X X3 f X864 2858(printPrompt)N X1320(\()X X1 f X1347(class)X X3 f X1523(PrintPrompt\))X X1 f X1440 2954(Sets)N X1593(the)X X1711(prompt)X X1962(used)X X2129(to)X X2211(ask)X X2338(for)X X2452(the)X X2570(printer)X X2804(name.)X X3038(The)X X3183(default)X X3426(value)X X3620(is)X X3693(`60`60Printer)X X3985(Name:)X X4219(''.)X X3 f X864 3088(printFail)N X1190(\()X X1 f X1217(class)X X3 f X1393(printFail\))X X1 f X1440 3184(Sets)N X1602(the)X X1729(string)X X1940(used)X X2116(to)X X2207(inform)X X2454(the)X X2581(user)X X2744(that)X X2893(the)X X3020(printer)X X3263(command)X X3608(failed.)X X3860(The)X X4014(default)X X4267(is)X X1440 3280(`60`60"lpr")N X1669(command)X X2005(failed.''.)X X3 f X864 3414(openPrompt)N X1311(\()X X1 f X1338(class)X X3 f X1514(OpenPrompt\))X X1 f X1440 3510(Sets)N X1593(the)X X1711(prompt)X X1962(used)X X2129(to)X X2211(ask)X X2338(for)X X2452(a)X X2508(\256le)X X2630(name)X X2824(to)X X2906(open.)X X3122(The)X X3267(default)X X3510(value)X X3704(is)X X3777(`60`60Open)X X4025(File:)X X4191(''.)X X3 f X864 3644(openFail)N X1181(\()X X1 f X1208(class)X X3 f X1384(OpenFail\))X X1 f X1440 3740(Sets)N X1615(the)X X1755(string)X X1979(used)X X2168(to)X X2272(inform)X X2532(the)X X2672(user)X X2848(that)X X3010(the)X X3151(open)X X3350(failed.)X X3616(The)X X3784(default)X X4050(value)X X4267(is)X X1440 3836(`60`60Cannot)N X1745(open)X X1921(\256le:)X X2065(''.)X X3 f X864 3970(savePrompt)N X1294(\()X X1 f X1321(class)X X3 f X1497(SavePrompt\))X X1 f X1440 4066(Sets)N X1593(the)X X1711(prompt)X X1962(used)X X2129(to)X X2211(ask)X X2338(for)X X2452(a)X X2508(\256le)X X2630(name)X X2824(to)X X2906(save.)X X3109(The)X X3254(default)X X3497(value)X X3691(is)X X3764(`60`60Save)X X3994(File:)X X4160(''.)X X3 f X864 4200(saveFail)N X1164(\()X X1 f X1191(class)X X3 f X1367(SaveFail\))X X1 f X1440 4296(Sets)N X1616(the)X X1757(string)X X1982(used)X X2172(to)X X2277(inform)X X2538(the)X X2679(user)X X2856(that)X X3019(the)X X3160(save)X X3346(failed.)X X3613(The)X X3782(default)X X4049(value)X X4267(is)X X1440 4392(`60`60Cannot)N X1745(save)X X1908(\256le:)X X2052(''.)X X3 f X864 4526(openWindows)N X1367(\()X X1 f X1394(class)X X3 f X1570(OpenWindows\))X X1 f X1440 4622(OpenWindows)N X1953(servers)X X2213(sometimes)X X2587(cause)X X2798(error)X X2987(messages)X X3322(about)X X3532(bitmaps)X X3817(not)X X3952(being)X X4163(1)X X4236(bit)X X1440 4718(deep.)N X1658(Turning)X X1942(on)X X2048(this)X X2189(resource)X X2488(avoids)X X2723(the)X X2847(problem)X X3139(by)X X3244(not)X X3371(using)X X3569(any)X X3710(bitmaps.)X X4028(You)X X4191(lose)X X1440 4814(the)N X1571(functionality)X X2013(of)X X2113(having)X X2364(the)X X2495(current)X X2756(magstep,)X X3076(orientation)X X3456(and)X X3605(media)X X3834(marked)X X4108(on)X X4222(the)X X1440 4910(popup)N X1660(menus.)X X1929(The)X X2074(default)X X2317(value)X X2511(is)X X2584(`60`60false''.)X X3 f X864 5044(ncdwm)N X1133(\()X X1 f X1160(class)X X3 f X1336(Ncdwm\))X X1 f X1440 5140(The)N X1593(Xt)X X1701(Intrinsics)X X2027(has)X X2162(a)X X2226(bug)X X2374(that)X X2522(causes)X X2760(bogus)X X2979(information)X X3385(in)X X3475(the)X X3602(window)X X3889(manager)X X4195(size)X X1440 5236(hints.)N X2 f X1660(Ncdwm)X X1 f X1925(and)X X2066(possibly)X X2357(other)X X2547(window)X X2830(managers)X X3162(get)X X3284(confused)X X3598(by)X X3702(the)X X3824(bogus)X X4039(informa-)X X1440 5332(tion)N X1591(and)X X1734(make)X X1935(the)X X2061(window)X X2347(extremely)X X2696(small.)X X2 f X2937(Twm)X X1 f X3120(and)X X2 f X3264(mwm)X X1 f X3461(ignore)X X3694(the)X X3820(bogus)X X4039(informa-)X X1440 5428(tion.)N X1633(Turning)X X1920(on)X X2029(the)X X2156(resource)X X2457(avoids)X X2694(the)X X2820(problem)X X3115(with)X X2 f X3285(ncdwm)X X1 f X3540(by)X X3648(doing)X X3858(things)X X4081(slightly)X X1440 5524(differently.)N X1843(However,)X X2182(this)X X2321(can)X X2457(confuse)X X2731(other)X X2920(window)X X3202(managers)X X3535(such)X X3707(as)X X2 f X3799(mwm)X X1 f X3968(.)X X4033(This)X X4200(bug)X X1440 5620(is)N X1514(\256xed)X X1695(in)X X1777(X11R5)X X2028(\256x-10.)X X2279(You)X X2437(should)X X2670(only)X X2832(set)X X2941(this)X X3076(resource)X X3369(if)X X3438(you)X X3578(have)X X3750(the)X X3868(problem.)X X4195(The)X X1440 5716(default)N X1683(value)X X1877(is)X X1950(`60`60false''.)X X576 6144(7th)N X698(Edition)X X4280(8)X X X9 p X%%Page: 9 9 X10 s 10 xH 0 xS 1 f X576 384(GHOSTVIEW)N X1066(\()X X1106(1)X X1159(\))X X1975(UNIX)X X2196(Programmer's)X X2675(Manual)X X3710(GHOSTVIEW)X X4200(\()X X4240(1)X X4293(\))X X3 f X9 s X576 768(GHOSTVIEW)N X1062(WIDGET)X X1396(RESOURCES)X X1 f X10 s X864 864(Certain)N X1123(resources)X X1450(in)X X1535(the)X X1656(Ghostview)X X2026(widget)X X2267(may)X X2428(be)X X2527(set)X X2639(by)X X2742(the)X X2864(user.)X X3062(These)X X3278(selected)X X3561(resources)X X3889(are)X X4012(presented)X X864 960(below.)N X3 f X864 1094(busyCursor)N X1288(\()X X1 f X1315(class)X X3 f X1491(Cursor\))X X1 f X1440 1190(The)N X1586(cursor)X X1808(shown)X X2038(when)X X2 f X2233(ghostscript)X X1 f X2609(is)X X2683(rendering)X X3012(to)X X3095(the)X X3214(window.)X X3533(The)X X3679(busy)X X3851(cursor)X X4073(is)X X4147(set)X X4258(to)X X1440 1286(the)N X1558(`60`60target'')X X1869(by)X X1969(the)X X2087(application)X X2463(defaults.)X X3 f X864 1420(cursor)N X1107(\()X X1 f X1134(class)X X3 f X1310(Cursor\))X X1 f X1440 1516(The)N X1585(cursor)X X1806(shown)X X2035(when)X X2 f X2229(ghostscript)X X1 f X2604(is)X X2677(idle.)X X2857(The)X X3002(default)X X3245(cursor)X X3466(is)X X3539(the)X X3657(`60`60crosshair''.)X X3 f X864 1650(interpreter)N X1264(\()X X1 f X1291(class)X X3 f X1467(Interpreter\))X X1 f X1440 1746(The)N X1592(name)X X1793(of)X X1887(the)X X2012(executable)X X2383(to)X X2472(call)X X2615(to)X X2704(render)X X2938(the)X X3064(PostScript.)X X3460(It)X X3537(is)X X3618(convenient)X X3998(to)X X4088(set)X X4205(this)X X1440 1842(resource)N X1734(to)X X1817(the)X X1936(path)X X2095(of)X X2183(an)X X2280(alternate)X X2578(version)X X2835(of)X X2923(ghostscript)X X3295(for)X X3410(testing.)X X3684(The)X X3830(default)X X4073(value)X X4267(is)X X1440 1938(`60`60gs''.)N X3 f X864 2072(preload)N X1146(\()X X1 f X1173(class)X X3 f X1349(Preload\))X X1 f X1440 2168(Files)N X1623(to)X X1713(load)X X1879(before)X X2113(the)X X2239(PostScript)X X2595(program.)X X2935(It)X X3012(is)X X3093(convenient)X X3474(to)X X3565(name)X X3768(\256les)X X3930(that)X X4079(preload)X X1440 2264(fonts)N X1627(here)X X1793(for)X X1914(PostScript)X X2269(programs)X X2599(that)X X2746(continually)X X3133(reload)X X3361(fonts)X X3548(while)X X3752(rendering)X X4086(a)X X4148(page.)X X1440 2360(The)N X1585(default)X X1828(is)X X1901(to)X X1983(not)X X2105(preload)X X2366(any)X X2502(\256les.)X X3 f X864 2494(quiet)N X1057(\()X X1 f X1084(class)X X3 f X1260(Quiet\))X X1 f X1440 2590(Tells)N X2 f X1643(ghostscript)X X1 f X2041(whether)X X2343(to)X X2448(produce)X X2750(informational)X X3229(messages.)X X3615(The)X X3783(default)X X4049(value)X X4267(is)X X1440 2686(`60`60false''.)N X3 f X864 2820(useBackingPixmap)N X1536(\()X X1 f X1563(class)X X3 f X1739(UseBackingPixmap\))X X1 f X1440 2916(Tells)N X1642(whether)X X1943(to)X X2047(use)X X2196(a)X X2274(backing)X X2570(pixmap.)X X2892(If)X X2988(this)X X3145(resource)X X3460(is)X X3556(false,)X X3771(backing)X X4068(store)X X4267(is)X X1440 3012(requested)N X1777(on)X X1886(the)X X2013(Ghostview)X X2389(window.)X X2716(Some)X X2927(X)X X3014(servers)X X3271(have)X X3451(limited)X X3705(resources)X X4037(for)X X4159(large)X X1440 3108(pixmaps.)N X1777(Also,)X X1974(some)X X2169(X)X X2253(servers')X X2534(backing)X X2814(store)X X2996(is)X X3075(much)X X3279(faster)X X3484(than)X X3648(using)X X3847(a)X X3910(backing)X X4191(pix-)X X1440 3204(map.)N X1649(You)X X1818(should)X X2062(reset)X X2245(this)X X2391(resource)X X2695(if)X X2775(your)X X2953(X)X X3042(server)X X3270(is)X X3354(one)X X3501(of)X X3599(the)X X3728(server)X X3956(types)X X4155(men-)X X1440 3300(tioned.)N X1700(The)X X1845(default)X X2088(value)X X2282(is)X X2355(`60`60true''.)X X3 f X864 3434(xdpi)N X1034(\()X X1 f X1061(class)X X3 f X1237(Resolution\))X X1 f X1440 3530(Sets)N X1595(the)X X1715(X)X X1795(resolution)X X2137(of)X X2226(the)X X2346(window)X X2626(in)X X2710(dots)X X2865(per)X X2990(inch.)X X3191(You)X X3352(can)X X3487(use)X X3617(this)X X3755(resource)X X4051(to)X X4136(affect)X X1440 3626(the)N X1567(main)X X1756(window.)X X2083(Zoom)X X2303(windows)X X2621(have)X X2801(their)X X2976(X)X X3062(dpi)X X3192(set)X X3309(explicitly)X X3639(in)X X3729(the)X X3855(program.)X X4195(The)X X1440 3722(default)N X1683(value)X X1877(is)X X1950(calculated)X X2296(from)X X2472(the)X X2590(screen)X X2816(metrics.)X X3 f X864 3856(ydpi)N X1034(\()X X1 f X1061(class)X X3 f X1237(Resolution\))X X1 f X1440 3952(Sets)N X1595(the)X X1715(Y)X X1795(resolution)X X2137(of)X X2226(the)X X2346(window)X X2626(in)X X2710(dots)X X2865(per)X X2990(inch.)X X3191(You)X X3352(can)X X3487(use)X X3617(this)X X3755(resource)X X4051(to)X X4136(affect)X X1440 4048(the)N X1567(main)X X1756(window.)X X2083(Zoom)X X2303(windows)X X2621(have)X X2801(their)X X2976(Y)X X3062(dpi)X X3192(set)X X3309(explicitly)X X3639(in)X X3729(the)X X3855(program.)X X4195(The)X X1440 4144(default)N X1683(value)X X1877(is)X X1950(calculated)X X2296(from)X X2472(the)X X2590(screen)X X2816(metrics.)X X3 f X9 s X576 4278(GHOSTVIEW)N X1062(WIDGET)X X1396(ACTIONS)X X10 s X864 4374(notify\(width)N X1306(height)X X1539(xdpi)X X1709(ydpi\))X X1 f X1440 4470(The)N X1594(notify)X X1814(event)X X2018(is)X X2101(used)X X2278(by)X X2388(the)X X2516(ghostview)X X2875(application)X X3261(for)X X3385(the)X X3513(locator)X X3766(and)X X3912(popup)X X4142(zoom)X X1440 4566(windows.)N X1797(If)X X1879(the)X X2004(width)X X2213(and)X X2356(height)X X2583(are)X X2709(0,)X X2796(the)X X2921(event)X X3122(is)X X3202(user)X X3363(for)X X3484(the)X X3609(locator.)X X3899(Otherwise,)X X4276(it)X X1440 4662(triggers)N X1711(a)X X1773(popup)X X1999(zoom)X X2203(window.)X X2527(The)X X2678(default)X X2927(widht)X X3135(and)X X3277(height)X X3503(are)X X3629(72.)X X3776(The)X X3928(default)X X4178(xdpi)X X1440 4758(and)N X1580(ydpi)X X1746(are)X X1869(300.)X X2053(The)X X2202(height)X X2426(will)X X2574(default)X X2820(to)X X2905(the)X X3026(width)X X3231(if)X X3303(the)X X3424(height)X X3647(is)X X3723(omitted.)X X4030(The)X X4178(xdpi)X X1440 4854(will)N X1584(default)X X1827(to)X X1909(the)X X2027(xdpi)X X2189(if)X X2258(the)X X2376(ydpi)X X2538(is)X X2611(omitted.)X X3 f X9 s X576 4988(OPTIONS)N X10 s X9 f X864 5084(-)N X866(-)X X3 f X910(staticgray)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60)X X9 f X2176(*)X X1 f X(Visual:)S X2467(StaticGray''.)X X3 f X9 f X864 5218(-)N X866(-)X X3 f X910(grayscale)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60)X X9 f X2176(*)X X1 f X(Visual:)S X2467(GrayScale''.)X X3 f X9 f X864 5352(-)N X866(-)X X3 f X910(staticcolor)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60)X X9 f X2176(*)X X1 f X(Visual:)S X2467(StaticColor''.)X X3 f X9 f X864 5486(-)N X866(-)X X3 f X910(pseudocolor)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60)X X9 f X2176(*)X X1 f X(Visual:)S X2467(PseudoColor''.)X X3 f X9 f X864 5620(-)N X866(-)X X3 f X910(truecolor)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60)X X9 f X2176(*)X X1 f X(Visual:)S X2467(TrueColor''.)X X576 6144(7th)N X698(Edition)X X4280(9)X X X10 p X%%Page: 10 10 X10 s 10 xH 0 xS 1 f X576 384(GHOSTVIEW)N X1066(\()X X1106(1)X X1159(\))X X1975(UNIX)X X2196(Programmer's)X X2675(Manual)X X3710(GHOSTVIEW)X X4200(\()X X4240(1)X X4293(\))X X3 f X9 f X864 768(-)N X866(-)X X3 f X910(directcolor)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60)X X9 f X2176(*)X X1 f X(Visual:)S X2467(DirectColor''.)X X3 f X9 f X864 902(-)N X866(-)X X3 f X910(install)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.installStdCmap:)X X3077(True''.)X X3 f X9 f X864 1036(-)N X866(-)X X3 f X910(noinstall)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.installStdCmap:)X X3077(False''.)X X3 f X9 f X864 1170(-)N X866(-)X X3 f X910(private)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.privateCmap:)X X2999(True''.)X X3 f X9 f X864 1304(-)N X866(-)X X3 f X910(noprivate)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.privateCmap:)X X2999(False''.)X X3 f X9 f X864 1438(-)N X866(-)X X3 f X910(center)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.autoCenter:)X X2937(True''.)X X3 f X9 f X864 1572(-)N X866(-)X X3 f X910(nocenter)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.autoCenter:)X X2937(False''.)X X3 f X9 f X864 1706(-)N X866(-)X X3 f X910(title)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.showTitle:)X X2905(True''.)X X3 f X9 f X864 1840(-)N X866(-)X X3 f X910(notitle)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.showTitle:)X X2905(False''.)X X3 f X9 f X864 1974(-)N X866(-)X X3 f X910(date)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.showDate:)X X2906(True''.)X X3 f X9 f X864 2108(-)N X866(-)X X3 f X910(nodate)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.showDate:)X X2906(False''.)X X3 f X9 f X864 2242(-)N X866(-)X X3 f X910(locator)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.showLocator:)X X3004(True''.)X X3 f X9 f X864 2376(-)N X866(-)X X3 f X910(nolocator)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.showLocator:)X X3004(False''.)X X3 f X9 f X864 2510(-)N X866(-)X X3 f X910(labels)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.Labels:)X X2799(True''.)X X3 f X9 f X864 2644(-)N X866(-)X X3 f X910(nolabels)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.Labels:)X X2799(False''.)X X3 f X9 f X864 2778(-)N X866(-)X X3 f X910(quiet)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60)X X9 f X2176(*)X X1 f X(Ghostview.quiet:)S X2785(True''.)X X3 f X9 f X864 2912(-)N X866(-)X X3 f X910(noquiet)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60)X X9 f X2176(*)X X1 f X(Ghostview.quiet:)S X2785(False''.)X X3 f X9 f X864 3046(-)N X866(-)X X3 f X910(preload)X X2 f X1192(\256le)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60)X X9 f X2176(*)X X1 f X(Ghostview.preload:)S X2 f X2866(\256le)X X1 f X2964(''.)X X3 f X9 f X864 3180(-)N X866(-)X X3 f X910(xdpi)X X2 f X1080(dpi)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60)X X9 f X2176(*)X X1 f X(Ghostview.xdpi:)S X2 f X2767(dpi)X X1 f X2869(''.)X X3 f X9 f X864 3314(-)N X866(-)X X3 f X910(ydpi)X X2 f X1080(dpi)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60)X X9 f X2176(*)X X1 f X(Ghostview.ydpi:)S X2 f X2767(dpi)X X1 f X2869(''.)X X3 f X9 f X864 3448(-)N X866(-)X X3 f X910(resolution)X X2 f X1272(dpi)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60)X X9 f X2176(*)X X1 f X(Ghostview.Resolution:)S X2 f X2971(dpi)X X1 f X3073(''.)X X3 f X9 f X864 3582(-)N X866(-)X X3 f X910(dpi)X X2 f X1040(dpi)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60)X X9 f X2176(*)X X1 f X(Ghostview.Resolution:)S X2 f X2971(dpi)X X1 f X3073(''.)X X3 f X9 f X864 3716(-)N X866(-)X X3 f X910(magstep)X X2 f X1215(magstep)X X1 f X1440 3812(Equivalent)N X1807(to)X X1889(setting)X X2122(`60`60Ghostview.magstep:)X X2 f X2852(magstep)X X1 f X3119(''.)X X3 f X9 f X864 3946(-)N X866(-)X X3 f X910(portrait)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.orientation:)X X2932(Portrait''.)X X3 f X9 f X864 4080(-)N X866(-)X X3 f X910(landscape)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.orientation:)X X2932(Landscape''.)X X3 f X9 f X864 4214(-)N X866(-)X X3 f X910(upsidedown)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.orientation:)X X2932(Upside)X X9 f X3159(-)X X1 f X3203(down''.)X X3 f X9 f X864 4348(-)N X866(-)X X3 f X910(seascape)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.orientation:)X X2932(Seascape''.)X X3 f X9 f X864 4482(-)N X866(-)X X3 f X910(forceorientation)X X1 f X1440 4578(Equivalent)N X1807(to)X X1889(setting)X X2122 0.1161(`60`60Ghostview.forceOrientation:)AX X3116(True''.)X X3 f X9 f X864 4712(-)N X866(-)X X3 f X910(page)X X2 f X1090(label)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.page:)X X2 f X2737(label)X X1 f X(''.)S X3 f X9 f X864 4846(-)N X866(-)X X3 f X910(letter)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.pageMedia:)X X2942(Letter''.)X X3 f X9 f X864 4980(-)N X866(-)X X3 f X910(tabloid)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.pageMedia:)X X2942(Tabloid''.)X X3 f X9 f X864 5114(-)N X866(-)X X3 f X910(ledger)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.pageMedia:)X X2942(Ledger''.)X X3 f X9 f X864 5248(-)N X866(-)X X3 f X910(legal)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.pageMedia:)X X2942(Legal''.)X X3 f X9 f X864 5382(-)N X866(-)X X3 f X910(statement)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.pageMedia:)X X2942(Statement''.)X X3 f X9 f X864 5516(-)N X866(-)X X3 f X910(executive)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.pageMedia:)X X2942(Executive''.)X X3 f X9 f X864 5650(-)N X866(-)X X3 f X910(a3)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.pageMedia:)X X2942(A3''.)X X576 6144(7th)N X698(Edition)X X4240(10)X X X11 p X%%Page: 11 11 X10 s 10 xH 0 xS 1 f X576 384(GHOSTVIEW)N X1066(\()X X1106(1)X X1159(\))X X1975(UNIX)X X2196(Programmer's)X X2675(Manual)X X3710(GHOSTVIEW)X X4200(\()X X4240(1)X X4293(\))X X3 f X9 f X864 768(-)N X866(-)X X3 f X910(a4)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.pageMedia:)X X2942(A4''.)X X3 f X9 f X864 902(-)N X866(-)X X3 f X910(a5)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.pageMedia:)X X2942(A5''.)X X3 f X9 f X864 1036(-)N X866(-)X X3 f X910(b4)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.pageMedia:)X X2942(B4''.)X X3 f X9 f X864 1170(-)N X866(-)X X3 f X910(b5)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.pageMedia:)X X2942(B5''.)X X3 f X9 f X864 1304(-)N X866(-)X X3 f X910(folio)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.pageMedia:)X X2942(Folio''.)X X3 f X9 f X864 1438(-)N X866(-)X X3 f X910(quarto)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.pageMedia:)X X2942(Quarto''.)X X3 f X9 f X864 1572(-)N X866(-)X X3 f X910(10x14)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.pageMedia:)X X2942(10x14''.)X X3 f X9 f X864 1706(-)N X866(-)X X3 f X910(forcemedia)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122 0.1442(`60`60Ghostview.forcePageMedia:)AX X3112(True''.)X X3 f X9 f X864 1840(-)N X866(-)X X3 f X910(force)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.Force:)X X2768(True''.)X X3 f X9 f X864 1974(-)N X866(-)X X3 f X910(swap)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122 0.1400(`60`60Ghostview.swapLandscape:)AX X3094(True''.)X X3 f X9 f X864 2108(-)N X866(-)X X3 f X910(noswap)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122 0.1400(`60`60Ghostview.swapLandscape:)AX X3094(False''.)X X3 f X9 f X864 2242(-)N X866(-)X X3 f X910(openwindows)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.openWindows:)X X3048(True''.)X X3 f X9 f X864 2376(-)N X866(-)X X3 f X910(noopenwindows)X X1 f X1440 2472(Equivalent)N X1807(to)X X1889(setting)X X2122(`60`60Ghostview.openWindows:)X X3048(False''.)X X3 f X9 f X864 2606(-)N X866(-)X X3 f X910(ncdwm)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.ncdwm:)X X2821(True''.)X X3 f X9 f X864 2740(-)N X866(-)X X3 f X910(noncdwm)X X1 f X1440(Equivalent)X X1807(to)X X1889(setting)X X2122(`60`60Ghostview.ncdwm:)X X2821(False''.)X X3 f X9 s X576 2874(WIDGET)N X910(HIERARCHY)X X2 f X10 s X864 2970(The)N X1004(hierarchy)X X1336(of)X X1418(the)X X1536(ghostview)X X1876(application:)X X1 f X864 3162(Ghostview)N X1251(ghostview)X X1152 3258(Form)N X1365(form)X X1440 3354(MenuButton)N X1884(titleButton)X X1728 3450(SimpleMenu)N X2181(menu)X X2016 3546(SmeBSB)N X2348(title)X X1440 3642(MenuButton)N X1884(dateButton)X X1728 3738(SimpleMenu)N X2181(menu)X X2016 3834(SmeBSB)N X2348(date)X X1440 3930(Label)N X1663(locator)X X1440 4026(Box)N X1613(box)X X1728 4122(MenuButton)N X2172(\256leButton)X X2016 4218(SimpleMenu)N X2469(menu)X X2304 4314(SmeBSB)N X2636(open)X X2304 4410(SmeBSB)N X2636(reopen)X X2304 4506(SmeBSB)N X2636(printwhole)X X2304 4602(SmeBSB)N X2636(printmarked)X X2304 4698(SmeBSB)N X2636(save)X X2304 4794(SmeLine)N X2633(line)X X2304 4890(SmeBSB)N X2636(copyright)X X2304 4986(SmeBSB)N X2636(quit)X X1728 5082(MenuButton)N X2172(pageButton)X X2016 5178(SimpleMenu)N X2469(menu)X X2304 5274(SmeBSB)N X2636(next)X X2304 5370(SmeBSB)N X2636(show)X X2304 5466(SmeBSB)N X2636(prev)X X2304 5562(SmeLine)N X2633(line)X X2304 5658(SmeBSB)N X2636(center)X X2304 5754(SmeLine)N X2633(line)X X2304 5850(SmeBSB)N X2636(mark)X X576 6234(7th)N X698(Edition)X X4240(11)X X X12 p X%%Page: 12 12 X10 s 10 xH 0 xS 1 f X576 384(GHOSTVIEW)N X1066(\()X X1106(1)X X1159(\))X X1975(UNIX)X X2196(Programmer's)X X2675(Manual)X X3710(GHOSTVIEW)X X4200(\()X X4240(1)X X4293(\))X X2304 768(SmeBSB)N X2636(unmark)X X1728 864(MenuButton)N X2172(magstepButton)X X2016 960(SimpleMenu)N X2469(menu)X X2304 1056(SmeBSB)N X2636(-5)X X2304 1152(SmeBSB)N X2636(-4)X X2304 1248(SmeBSB)N X2636(-3)X X2304 1344(SmeBSB)N X2636(-2)X X2304 1440(SmeBSB)N X2636(-1)X X2304 1536(SmeBSB)N X2636(0)X X2304 1632(SmeBSB)N X2636(1)X X2304 1728(SmeBSB)N X2636(2)X X2304 1824(SmeBSB)N X2636(3)X X2304 1920(SmeBSB)N X2636(4)X X2304 2016(SmeBSB)N X2636(5)X X1728 2112(MenuButton)N X2172(orientationButton)X X2016 2208(SimpleMenu)N X2469(menu)X X2304 2304(SmeBSB)N X2636(portrait)X X2304 2400(SmeBSB)N X2636(landscape)X X2304 2496(SmeBSB)N X2636(upsidedown)X X2304 2592(SmeBSB)N X2636(seascape)X X2304 2688(SmeLine)N X2633(line)X X2304 2784(SmeBSB)N X2636(swap)X X1728 2880(MenuButton)N X2172(pagemediaButton)X X2016 2976(SimpleMenu)N X2469(menu)X X2304 3072(SmeBSB)N X2636(Letter)X X2304 3168(SmeBSB)N X2636(Tabloid)X X2304 3264(SmeBSB)N X2636(Ledger)X X2304 3360(SmeBSB)N X2636(Legal)X X2304 3456(SmeBSB)N X2636(Statement)X X2304 3552(SmeBSB)N X2636(Executive)X X2304 3648(SmeBSB)N X2636(A3)X X2304 3744(SmeBSB)N X2636(A4)X X2304 3840(SmeBSB)N X2636(A5)X X2304 3936(SmeBSB)N X2636(B4)X X2304 4032(SmeBSB)N X2636(B5)X X2304 4128(SmeBSB)N X2636(Folio)X X2304 4224(SmeBSB)N X2636(Quarto)X X2304 4320(SmeBSB)N X2636(10x14)X X1440 4416(Text)N X1627(toc)X X1440 4512(Viewport)N X1783(pageview)X X1728 4608(Core)N X1924(clip)X X1728 4704(Ghostview)N X2115(page)X X1728 4800(Scrollbar)N X2062(horizontal)X X1728 4896(Scrollbar)N X2062(vertical)X X1152 4992(TopLevelShell)N X1668(information)X X1440 5088(Form)N X1653(form)X X1728 5184(Text)N X1915(text)X X1728 5280(Command)N X2101(dismiss)X X1152 5376(TopLevelShell)N X1668(copyright)X X1440 5472(Form)N X1653(form)X X1728 5568(Text)N X1915(text)X X1728 5664(Command)N X2101(dismiss)X X1152 5760(TransientShell)N X1659(popup)X X576 6144(7th)N X698(Edition)X X4240(12)X X X13 p X%%Page: 13 13 X10 s 10 xH 0 xS 1 f X576 384(GHOSTVIEW)N X1066(\()X X1106(1)X X1159(\))X X1975(UNIX)X X2196(Programmer's)X X2675(Manual)X X3710(GHOSTVIEW)X X4200(\()X X4240(1)X X4293(\))X X1440 768(Form)N X1653(dialog)X X1728 864(Label)N X1951(prompt)X X1728 960(Text)N X1915(response)X X1728 1056(Command)N X2101(okay)X X1728 1152(Command)N X2101(cancel)X X1152 1248(TopLevelShell)N X1668(zoom)X X1440 1344(Form)N X1653(form)X X1728 1440(Ghostview)N X2115(page)X X1728 1536(Command)N X2101(dismiss)X X2 f X864 1728(The)N X1004(hierarchy)X X1336(of)X X1418(the)X X1536(Select)X X1748(File)X X1897(dialog)X X2121(box:)X X1 f X864 1920(TransientShell)N X1371(selFile)X X1152 2016(Form)N X1365(selFileForm)X X1440 2112(Label)N X1663(selFilePrompt)X X1440 2208(Text)N X1627(selFileField)X X1440 2304(Scrollbar)N X1774(selFileHScroll)X X1440 2400(Composite)N X1826(selFileList1)X X1728 2496(Scrollbar)N X2062(selFileVScroll)X X1728 2592(Scrollbar)N X2062(selFileHScroll)X X1440 2688(Composite)N X1826(selFileList2)X X1728 2784(Scrollbar)N X2062(selFileVScroll)X X1728 2880(Scrollbar)N X2062(selFileHScroll)X X1440 2976(Composite)N X1826(selFileList3)X X1728 3072(Scrollbar)N X2062(selFileVScroll)X X1728 3168(Scrollbar)N X2062(selFileHScroll)X X1440 3264(Command)N X1813(selFileOK)X X1440 3360(Command)N X1813(selFileCancel)X X3 f X9 s X576 3494(ENVIRONMENT)N X10 s X864 3590(LPDEST)N X1 f X1440(The)X X1585(LPDEST)X X1898(environment)X X2323(variable)X X2602(gives)X X2791(the)X X2909(default)X X3152(printer)X X3386(destination)X X3757(on)X X3857(System)X X4112(V.)X X3 f X864 3724(PRINTER)N X1 f X1440(The)X X1585(PRINTER)X X1938(environment)X X2363(variable)X X2642(gives)X X2831(the)X X2949(default)X X3192(printer)X X3426(destination)X X3797(on)X X3897(BSD.)X X3 f X9 s X576 3858(LIMITATIONS)N X1 f X10 s X864 3954(If)N X947(the)X X1074(document)X X1419(does)X X1595(not)X X1726(begin)X X1933(with)X X2104(`60`60%!PS)X X9 f X2340(-)X X1 f X2384(Adobe)X X9 f X2598(-)X X1 f X2642('',)X X2745(it)X X2818(does)X X2994(not)X X3126(claim)X X3334(conformance)X X3784(to)X X3876(the)X X4004(document)X X864 4050(structuring)N X1232(convention.)X X1649(When)X X1861(these)X X2046(documents)X X2413(are)X X2532(encountered,)X X2965(the)X X3083(functionality)X X3512(of)X X2 f X3599(ghostview)X X1 f X3939(is)X X4012(limited)X X4258(to)X X864 4146(giving)N X1094(you)X X1240(scroll)X X1444(bars)X X1604(and)X X1746(a)X X1808(next)X X1972(page)X X2151(capability.)X X2534(Because)X X2829(there)X X3017(is)X X3097(no)X X3204(table)X X3387(of)X X3481(contents,)X X3795(skipping)X X4097(around)X X864 4242(the)N X982(document)X X1318(and)X X1454(marking)X X1741(pages)X X1944(is)X X2017(impossible.)X X864 4376(If)N X938(there)X X1119(is)X X1192(no)X X1292(table)X X1468(of)X X1555(contents)X X1842(for)X X1956(the)X X2074(document,)X X2430(the)X X2548(popup)X X2768(zoom)X X2966(window)X X3244(will)X X3388(always)X X3631(show)X X3820(the)X X3938(\256rst)X X4082(page.)X X3 f X9 s X576 4510(BUGS)N X1 f X10 s X864 4606(If)N X938(you)X X1078(\256nd)X X1222(a)X X1278(bug,)X X1438(please)X X1659(send)X X1826(a)X X1882(bug)X X2022(report)X X2234(to)X X2316(ghostview@cs.wisc.edu.)X X3 f X9 s X576 4740(AUTHOR)N X1 f X10 s X864 4836(Copyright)N X1208(\(C\))X X1335(1992)X X1535(Timothy)X X1830(O.)X X1928(Theisen)X X864 4970(This)N X1027(program)X X1320(is)X X1394(free)X X1541(software;)X X1861(you)X X2002(can)X X2136(redistribute)X X2523(it)X X2589(and/or)X X2816(modify)X X3069(it)X X3135(under)X X3340(the)X X3460(terms)X X3660(of)X X3749(the)X X3869(GNU)X X4065(General)X X864 5066(Public)N X1094(License)X X1370(as)X X1463(published)X X1800(by)X X1906(the)X X2030(Free)X X2199(Software)X X2515(Foundation;)X X2927(either)X X3135(version)X X3396(2)X X3461(of)X X3553(the)X X3676(License,)X X3971(or)X X4063(\(at)X X4173(your)X X864 5162(option\))N X1115(any)X X1251(later)X X1414(version.)X X864 5296(This)N X1029(program)X X1324(is)X X1400(distributed)X X1765(in)X X1850(the)X X1971(hope)X X2150(that)X X2293(it)X X2360(will)X X2507(be)X X2606(useful,)X X2845(but)X X2970(WITHOUT)X X3369(ANY)X X3567(WARRANTY;)X X4076(without)X X864 5392(even)N X1050(the)X X1182(implied)X X1460(warranty)X X1780(of)X X1881(MERCHANTABILITY)X X2685(or)X X2786(FITNESS)X X3135(FOR)X X3324(A)X X3415(PARTICULAR)X X3950(PURPOSE.)X X864 5488(See)N X1000(the)X X1118(GNU)X X1312(General)X X1587(Public)X X1811(License)X X2081(for)X X2195(more)X X2380(details.)X X864 5622(You)N X1022(should)X X1255(have)X X1427(received)X X1721(a)X X1778(copy)X X1955(of)X X2043(the)X X2162(GNU)X X2357(General)X X2633(Public)X X2858(License)X X3129(along)X X3328(with)X X3491(this)X X3627(program;)X X3942(if)X X4012(not,)X X4155(write)X X864 5718(to)N X946(the)X X1064(Free)X X1227(Software)X X1537(Foundation,)X X1941(Inc.,)X X2104(675)X X2244(Mass)X X2433(Ave,)X X2607(Cambridge,)X X3003(MA)X X3152(02139,)X X3392(USA.)X X576 6144(7th)N X698(Edition)X X4240(13)X X X14 p X%%Page: 14 14 X10 s 10 xH 0 xS 1 f X576 384(GHOSTVIEW)N X1066(\()X X1106(1)X X1159(\))X X1975(UNIX)X X2196(Programmer's)X X2675(Manual)X X3710(GHOSTVIEW)X X4200(\()X X4240(1)X X4293(\))X X864 768(Author:)N X1440(Tim)X X1593(Theisen)X X2592(Systems)X X2878(Programmer)X X864 864(Internet:)N X1440(tim@cs.wisc.edu)X X2592(Department)X X2991(of)X X3078(Computer)X X3418(Sciences)X X864 960(UUCP:)N X1440(uwvax!tim)X X2592(University)X X2950(of)X X3037(Wisconsin)X X9 f X3375(-)X X1 f X3419(Madison)X X864 1056(Phone:)N X1440(\(608\)262)X X9 f X1734(-)X X1 f X1778(0438)X X2592(1210)X X2772(West)X X2957(Dayton)X X3213(Street)X X864 1152(FAX:)N X1440(\(608\)262)X X9 f X1734(-)X X1 f X1778(9777)X X2592(Madison,)X X2912(WI)X X3075(53706)X X3 f X9 s X576 1286(ACKNOWLEDGEMENTS)N X1 f X10 s X864 1382(The)N X1009(Select)X X1225(File)X X1369(widget)X X1607(contains)X X1894(the)X X2012(following)X X2343(copyright)X X2670(notice:)X X864 1516(Copyright)N X1208(1989)X X1388(Software)X X1698(Research)X X2013(Associates,)X X2396(Inc.,)X X2559(Tokyo,)X X2808(Japan)X X864 1650(Permission)N X1247(to)X X1337(use,)X X1492(copy,)X X1696(modify,)X X1975(and)X X2119(distribute)X X2449(this)X X2593(software)X X2899(and)X X3044(its)X X3148(documentation)X X3653(for)X X3776(any)X X3921(purpose)X X4204(and)X X864 1746(without)N X1134(fee)X X1259(is)X X1338(hereby)X X1583(granted,)X X1870(provided)X X2181(that)X X2327(the)X X2451(above)X X2669(copyright)X X3002(notice)X X3224(appear)X X3465(in)X X3553(all)X X3659(copies)X X3890(and)X X4032(that)X X4178(both)X X864 1842(that)N X1008(copyright)X X1339(notice)X X1559(and)X X1699(this)X X1838(permission)X X2213(notice)X X2433(appear)X X2672(in)X X2758(supporting)X X3124(documentation,)X X3645(and)X X3786(that)X X3931(the)X X4054(name)X X4253(of)X X864 1938(Software)N X1191(Research)X X1523(Associates)X X1903(not)X X2042(be)X X2155(used)X X2339(in)X X2438(advertising)X X2831(or)X X2935(publicity)X X3256(pertaining)X X3617(to)X X3715(distribution)X X4119(of)X X4222(the)X X864 2034(software)N X1170(without)X X1443(speci\256c,)X X1737(written)X X1993(prior)X X2178(permission.)X X2599(Software)X X2919(Research)X X3244(Associates)X X3617(makes)X X3852(no)X X3962(representa-)X X864 2130(tions)N X1040(about)X X1239(the)X X1358(suitability)X X1698(of)X X1786(this)X X1922(software)X X2220(for)X X2335(any)X X2472(purpose.)X X2787(It)X X2857(is)X X2931(provided)X X3237("as)X X3358(is")X X3464(without)X X3728(express)X X3989(or)X X4076(implied)X X864 2226(warranty.)N X864 2360(SOFTWARE)N X1315(RESEARCH)X X1753(ASSOCIATES)X X2258(DISCLAIMS)X X2710(ALL)X X2887(WARRANTIES)X X3433(WITH)X X3664(REGARD)X X4014(TO)X X4142(THIS)X X864 2456(SOFTWARE,)N X1337(INCLUDING)X X1805(ALL)X X1983(IMPLIED)X X2330(WARRANTIES)X X2876(OF)X X2999(MERCHANTABILITY)X X3790(AND)X X3985(FITNESS,)X X864 2552(IN)N X980(NO)X X1127(EVENT)X X1421(SHALL)X X1710(SOFTWARE)X X2172(RESEARCH)X X2620(ASSOCIATES)X X3135(BE)X X3268(LIABLE)X X3584(FOR)X X3770(ANY)X X3976(SPECIAL,)X X864 2648(INDIRECT)N X1267(OR)X X1407(CONSEQUENTIAL)X X2104(DAMAGES)X X2529(OR)X X2669(ANY)X X2871(DAMAGES)X X3295(WHATSOEVER)X X3875(RESULTING)X X864 2744(FROM)N X1118(LOSS)X X1341(OF)X X1471(USE,)X X1670(DATA)X X1921(OR)X X2061(PROFITS,)X X2429(WHETHER)X X2850(IN)X X2964(AN)X X3109(ACTION)X X3441(OF)X X3572(CONTRACT,)X X4052(NEGLI-)X X864 2840(GENCE)N X1152(OR)X X1284(OTHER)X X1572(TORTIOUS)X X1989(ACTION,)X X2333(ARISING)X X2679(OUT)X X2864(OF)X X2986(OR)X X3117(IN)X X3222(CONNECTION)X X3763(WITH)X X3993(THE)X X4169(USE)X X864 2936(OR)N X995(PERFORMANCE)X X1605(OF)X X1727(THIS)X X1925(SOFTWARE.)X X864 3128(Author:)N X1440(Erik)X X1598(M.)X X1709(van)X X1845(der)X X1968(Poel)X X1440 3224(Software)N X1750(Research)X X2065(Associates,)X X2448(Inc.,)X X2611(Tokyo,)X X2860(Japan)X X1440 3320(erik@sra.co.jp)N X576 6144(7th)N X698(Edition)X X4240(14)X X X14 p X%%Trailer Xxt X Xxs $ CALL UNPACK GHOSTVIEW.PS;1 309886290 $ create 'f' X/* X * GhostviewP.h -- Private header file for Ghostview widget. X * Copyright (C) 1992 Timothy O. Theisen X * X * This program is free software; you can redistribute it and/or modify X * it under the terms of the GNU General Public License as published by X * the Free Software Foundation; either version 2 of the License, or X * (at your option) any later version. X * X * This program is distributed in the hope that it will be useful, X * but WITHOUT ANY WARRANTY; without even the implied warranty of X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X * GNU General Public License for more details. X * X * You should have received a copy of the GNU General Public License X * along with this program; if not, write to the Free Software X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X * X * Author: Tim Theisen Systems Programmer X * Internet: tim@cs.wisc.edu Department of Computer Sciences X * UUCP: uwvax!tim University of Wisconsin-Madison X * Phone: (608)262-0438 1210 West Dayton Street X * FAX: (608)262-9777 Madison, WI 53706 X */ X X#ifndef _GhostviewP_h X#define _GhostviewP_h X X#include "Ghostview.h" X#include X#include X#include X Xtypedef struct `7B X AtomPtr ghostview; X AtomPtr next; X AtomPtr page; X AtomPtr done; X`7D GhostviewClassPart; X Xtypedef struct _GhostviewClassRec `7B X CoreClassPart`09core_class; X GhostviewClassPart`09ghostview_class; X`7D GhostviewClassRec; X Xextern GhostviewClassRec ghostviewClassRec; X X/* structure to describe section of file to send to ghostscript */ Xstruct record_list `7B X FILE *fp; X long begin; X unsigned int len; X Boolean seek_needed; X Boolean close; X struct record_list *next; X`7D; X Xtypedef struct `7B X /* resources */ X Cursor`09`09cursor; X Cursor`09`09busy_cursor; X XtCallbackList`09callback; X XtCallbackList`09message_callback; X XtCallbackList`09output_callback; X String`09`09interpreter; X Boolean`09`09quiet; X Boolean`09`09use_bpixmap; X String`09`09preload; X String`09`09filename; X XtPageOrientation`09orientation; X float`09`09xdpi; X float`09`09ydpi; X int`09`09`09llx; X int`09`09`09lly; X int`09`09`09urx; X int`09`09`09ury; X int`09`09`09left_margin; X int`09`09`09bottom_margin; +-+-+-+-+-+-+-+- END OF PART 7 +-+-+-+-+-+-+-+- Return-Path: mccall!tp@!mccall.com Delivery-Date: Tue, 27 Oct 92 19:39:25 -0600 Return-Path: mccall!tp@!mccall.com Received: from cs.wisc.edu by appenzell.cs.wisc.edu; Tue, 27 Oct 92 19:39:10 -0600 Received: from depot.cis.ksu.edu by cs.wisc.edu; Tue, 27 Oct 92 19:39:06 -0600 Return-Path: Received: from mccall.UUCP by depot.cis.ksu.edu UUCP (5.65a) id AA20196; Tue, 27 Oct 92 19:38:16 -0600 Received: by mccall.com (DECUS UUCP /1.3-1/2.5/); Tue, 27 Oct 92 19:20:03 CST Received: by mccall.com (MX V3.1C) id 12851; Tue, 27 Oct 1992 19:20:02 CST Date: Tue, 27 Oct 1992 19:19:59 CST From: Terry Poot To: tim Message-Id: <00962BB5.41BBCCA0.12851@mccall.com> Subject: Ghostview for VMS 08/14 -+-+-+-+-+-+-+-+ START OF PART 8 -+-+-+-+-+-+-+-+ X int`09`09`09right_margin; X int`09`09`09top_margin; X /* private state */ X GC`09`09`09gc;`09`09/* GC used to clear window */ X Window`09`09mwin;`09`09/* destination of ghostsript messages */ X Boolean`09`09disable_start;`09/* whether to fork ghostscript */ X int`09`09`09interpreter_pid;/* pid of ghostscript, -1 if none */ X struct record_list`09*ps_input;`09/* pointer it gs input queue */ X char`09`09*input_buffer;`09/* pointer to input buffer */ X unsigned int`09bytes_left;`09/* bytes left in section */ X#ifndef VMS X char`09`09*input_buffer_ptr; /* pointer into input buffer */ X unsigned int`09buffer_bytes_left; /* bytes left in buffer */ X#endif X int`09`09`09interpreter_input; /* fd gs stdin, -1 if None */ X int`09`09`09interpreter_output; /* fd gs stdout, -1 if None */ X#ifndef VMS X int`09`09`09interpreter_error; /* fd gs stderr, -1 if None */ X XtInputId`09`09interpreter_input_id; /* XtInputId for above */ X XtInputId`09`09interpreter_output_id; /* XtInputId for above */ X XtInputId`09`09interpreter_error_id; /* XtInputId for above */ X#else /* VMS */ X short`09`09interpreter_input_iosb`5B4`5D; /* I/O Status Blocks */ X short`09`09interpreter_output_iosb`5B4`5D; /* for each mailbox */ X char`09`09*output_buffer; /* pointer to output buffer */ X#endif /* VMS */ X Dimension`09`09gs_width;`09/* Width of window at last Setup() */ X Dimension`09`09gs_height;`09/* Height of window at last Setup() */ X Boolean`09`09busy;`09`09/* Is gs busy drawing? */ X Boolean`09`09changed;`09/* something changed since Setup()? */ X`7D GhostviewPart; X Xtypedef struct _GhostviewRec `7B X CorePart`09`09core; X GhostviewPart`09ghostview; X`7D GhostviewRec; X X#endif /* _GhostviewP_h */ $ CALL UNPACK GHOSTVIEWP.H;1 558108461 $ create 'f' X XGhostview interface to ghostscript X XWhen the GHOSTVIEW environment variable is set, ghostscript draws on Xan existing drawable rather than creating its own window. Ghostscript Xcan be directed to draw on either a window or a pixmap. X XDrawing on a Window X XThe GHOSTVIEW environment variable contains the window id of the target Xwindow. The window id is an integer. Ghostview will use the attributes Xof the window to obtain the width, height, colormap, screen, and visual of Xthe window. The remainder of the information is gotten from the GHOSTVIEW Xproperty on that window. X X XDrawing on a Pixmap X XThe GHOSTVIEW environment variable contains a window id and a pixmap id. XThey are integers separated by white space. Ghostview will use the attribut Ves Xof the window to obtain the colormap, screen, and visual to use. The Xremainder of the information, including the width and height of the pixmap, Xis gotten from the GHOSTVIEW property on the window. In this case, the Xproperty is deleted when read. X XThe GHOSTVIEW environment variable X Xparameters:`09window-id `5Bpixmap-id`5D X Xscanf format:`09"%d %d" X Xexplanation of parameters: X X`09window-id: tells ghostscript where to X`09`09 - read the GHOSTVIEW property X`09`09 - send events X`09`09 If pixmap-id is not present, X`09`09 ghostscript will draw on this window. X X`09pixmap-id: If present, tells ghostscript that a pixmap will be used X`09`09 as the final destination for drawing. The window will X`09`09 not be touched for drawing purposes. X XThe GHOSTVIEW property X Xtype:`09STRING X Xparameters: X X Drawing on a window: X bpixmap orient llx lly urx ury xdpi ydpi `5Bleft bottom top right`5D X X Drawing on a pixmap: X bpixmap orient llx lly urx ury xdpi ydpi left bottom top right width hei Vght X Xscanf format: "%d %d %d %d %d %d %f %f %d %d %d %d %d %d" X Xexplanation of parameters: X X`09bpixmap: pixmap id of the backing pixmap for the window. If no X`09`09pixmap is to be used, this parameter should be zero. This X`09`09parameter must be zero when drawing on a pixmap. X X`09orient:`09orientation of the page. The number represents clockwise X`09`09rotation of the paper in degrees. Permitted values are X`09`090, 90, 180, 270. X X`09llx, lly, urx, ury: Bounding box of the drawable. The bounding box X`09`09is specified in PostScript points in default user coordinates. X X`09xdpi, ydpi: Resolution of window. (This can be derived from the X`09`09other parameters, but not without roundoff error. These X`09`09values are included to avoid this error.) X X`09left, bottom, top, right: (optional when drawing on a window) X`09`09Margins around the window. The margins extend the imageable X`09`09area beyond the boundaries of the window. This is primarily X`09`09used for popup zoom windows. I have encountered several X`09`09instances of PostScript program that position themselves X`09`09with respect to the imageable area. The margins are specified X`09`09in PostScript points. If omitted, the margins are assumed to X`09`09be 0. X X`09width, height: (Only specified when drawing on Pixmap) X`09`09The width and height of the pixmap. (Too bad that we can't X`09`09just query the server.) X XEvents from ghostscript X XIf the final destination is a pixmap, the client will get a property notify Xevent when ghostscript reads the GHOSTVIEW property causing it to be deleted V. X XGhostscript sends events to the window where it read the GHOSTVIEW property. XThese events are of type ClientMessage. The message_type is set to Xeither PAGE or DONE. The first long data value gives the window to be used Xto send replies to ghostscript. The second long data value gives the primar Vy Xdrawable. If rendering to a pixmap, it is the primary drawable. If renderi Vng Xto a window, the backing pixmap is the primary drawable. If no backing pixm Vap Xis employed, then the window is the primary drawable. This field is necessa Vry Xto distinguish multiple ghostscripts rendering to separate pixmaps where the XGHOSTVIEW property was placed on the same window. X XThe PAGE message indicates that a "page" has completed. Ghostscript will Xwait until it receives a ClientMessage whose message_type is NEXT before Xcontinuing. X XThe DONE message indicates that ghostscript has finished processing. X $ CALL UNPACK GS.INTERFACE;1 1903788157 $ create 'f' X/* X * gv.h -- Main include file for ghostview. X * Copyright (C) 1992 Timothy O. Theisen X * X * This program is free software; you can redistribute it and/or modify X * it under the terms of the GNU General Public License as published by X * the Free Software Foundation; either version 2 of the License, or X * (at your option) any later version. X * X * This program is distributed in the hope that it will be useful, X * but WITHOUT ANY WARRANTY; without even the implied warranty of X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X * GNU General Public License for more details. X * X * You should have received a copy of the GNU General Public License X * along with this program; if not, write to the Free Software X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. X * X * Author: Tim Theisen Systems Programmer X * Internet: tim@cs.wisc.edu Department of Computer Sciences X * UUCP: uwvax!tim University of Wisconsin-Madison X * Phone: (608)262-0438 1210 West Dayton Street X * FAX: (608)262-9777 Madison, WI 53706 X */ X X#include X#include X#include X#include X#define XtSetFloatArg(arg, n, d) \ X if (sizeof(float) > sizeof(XtArgVal)) `7B \ X`09XtSetArg(arg, n, &(d)); \ X `7D else `7B \ X`09XtArgVal *ld = (XtArgVal *)&(d); \ X`09XtSetArg(arg, n, *ld); \ X `7D X#include "Ghostview.h" X X/* Application resources */ Xtypedef struct _AppResources `7B X Boolean show_title;`09`09/* whether to show title */ X Boolean show_date;`09`09/* whether to show date */ X Boolean show_locator;`09/* whether to show locator */ X Boolean install_std_cmap;`09/* whether to install standard colormap */ X Boolean retain_std_cmap;`09/* whether to retain standard colormap */ X Boolean private_cmap;`09/* whether to use private colormap */ X Boolean auto_center;`09/* whether to automatically center the page */ X int wm_horiz_margin;`09/* Space taken by window manager */ X int wm_vert_margin;`09`09/* Space taken by window manager */ X int minimum_magstep;`09/* smallest magstep allowed */ X int maximum_magstep;`09/* largest magstep allowed */ X int magstep;`09`09/* default magstep */ X XtPageOrientation orientation;`09/* default orientation */ X String page;`09`09/* first page to show */ X String pagemedia;`09`09/* default page media */ X Boolean force_orientation;`09/* use default to override document comment Vs */ X Boolean force_pagemedia;`09/* use default to override document comments V */ X Boolean swap_landscape;`09/* Landscape comment maps to Seascape */ X String print_command;`09/* command used to print doc, usually "lpr" */ X String printer_variable;`09/* env varaible to use, usually "PRINTER" */ X String default_printer;`09/* printer to use if no PRINTER is not set*/ X String print_prompt;`09/* string to prompt user for printer name */ X String print_fail;`09`09/* string to inform user that print failed */ X String open_prompt;`09`09/* string to prompt for file name to open */ X String open_fail;`09`09/* string to inform user that open failed */ X String save_prompt;`09`09/* string to prompt for file name to save */ X String save_fail;`09`09/* string to inform user that save failed */ X /* Work arounds for others' bugs */ X Boolean openwindows;`09/* whether to work around openwindow bug */ X Boolean ncdwm;`09`09/* whether to work around ncdwm bug */ X`7D AppResources; X Xextern float`09default_xdpi; Xextern float`09default_ydpi; X Xextern int`09num_ghosts; Xextern FILE`09*psfile; Xextern String`09filename; Xextern String`09oldfilename; Xextern int`09current_page; Xextern int`09current_magstep; Xextern XtPageOrientation`09current_orientation; Xextern int`09default_pagemedia; Xextern int`09current_pagemedia; Xextern Boolean`09force_document_media; Xextern int`09document_media; Xextern int`09current_llx; Xextern int`09current_lly; Xextern int`09current_urx; Xextern int`09current_ury; Xextern int`09base_papersize; Xextern Boolean`09info_up; Xextern int`09force_setting; Xextern Pixmap`09dot_bitmap; Xextern Pixmap`09menu16_bitmap; Xextern Pixmap`09tie_fighter_bitmap; Xextern String`09toc_text; Xextern int`09toc_length; Xextern int`09toc_entry_length; Xextern int`09info_length; Xextern time_t`09mtime; Xextern struct document *doc; Xextern struct document *olddoc; Xextern Colormap`09cmap; Xextern Boolean`09special_cmap; Xextern Pixel`09white; Xextern Pixel`09black; Xextern Atom`09wm_delete_window; Xextern int`09catch_Xerror(); Xextern XErrorHandler`09old_Xerror; Xextern Boolean`09dying; Xextern XErrorEvent`09bomb; X Xenum `7BOPEN, PRINT_WHOLE, PRINT_MARKED, SAVE`7D; Xextern int`09mode; X Xextern XtAppContext app_con; Xextern AppResources app_res; X X/* Widgets */ Xextern Widget toplevel; Xextern Widget form; Xextern Widget titlebutton; Xextern Widget titlemenu; Xextern Widget datebutton; Xextern Widget datemenu; Xextern Widget locator; Xextern Widget box; Xextern Widget filebutton; Xextern Widget filemenu; Xextern Widget openbutton; Xextern Widget reopenbutton; Xextern Widget printwholebutton; Xextern Widget printmarkedbutton; Xextern Widget savebutton; Xextern Widget copyrightbutton; Xextern Widget quitbutton; Xextern Widget pagebutton; Xextern Widget pagemenu; Xextern Widget nextbutton; Xextern Widget showbutton; Xextern Widget prevbutton; Xextern Widget centerbutton; Xextern Widget markbutton; Xextern Widget unmarkbutton; Xextern Widget magstepbutton; Xextern Widget magstepmenu; Xextern Widget *magstepentry; Xextern Widget orientationbutton; Xextern Widget orientationmenu; Xextern Widget portraitbutton; Xextern Widget landscapebutton; Xextern Widget upsidedownbutton; Xextern Widget seascapebutton; Xextern Widget swapbutton; Xextern Widget pagemediabutton; Xextern Widget pagemediamenu; Xextern Widget *pagemediaentry; Xextern Widget toc; Xextern Widget pageview; Xextern Widget page; X X/* Popup widgets */ Xextern Widget infopopup; Xextern Widget infoform; Xextern Widget infotext; Xextern Widget infobutton; Xextern Widget copyrightpopup; Xextern Widget copyrightform; Xextern Widget copyrighttext; Xextern Widget copyrightbutton; Xextern Widget dialogpopup; Xextern Widget dialog; X X/* Dialogs */ Xextern Widget CreateDialog(); Xextern String GetDialogPrompt(); Xextern void SetDialogPrompt(); Xextern String GetDialogResponse(); Xextern void SetDialogResponse(); Xextern void ClearDialogResponse(); X X/* Callbacks */ Xextern void quit_ghostview(); Xextern void popup(); Xextern void popup_dialog(); Xextern void reopen_file(); Xextern void prev_page(); Xextern void this_page(); Xextern void next_page(); Xextern void center_page(); Xextern void mark_page(); Xextern void unmark_page(); Xextern void set_magstep(); Xextern void set_orientation(); Xextern void swap_landscape(); Xextern void set_pagemedia(); Xextern void track_and_zoom(); Xextern void message(); Xextern void output(); Xextern void okay(); Xextern void dismiss(); Xextern void destroy(); Xextern void destroy_ghost(); X X/* Actions */ Xextern void gv_copyright(); Xextern void gv_quit(); Xextern void gv_open(); Xextern void gv_reopen(); Xextern void gv_save(); Xextern void gv_print_whole(); Xextern void gv_print_marked(); Xextern void gv_prev(); Xextern void gv_show(); Xextern void gv_next(); Xextern void gv_center(); Xextern void gv_mark(); Xextern void gv_unmark(); Xextern void gv_set_magstep(); Xextern void gv_increase_magstep(); Xextern void gv_decrease_magstep(); Xextern void gv_set_orientation(); Xextern void gv_swap_landscape(); Xextern void gv_set_pagemedia(); Xextern void gv_default(); Xextern void gv_force(); Xextern void gv_delete_window(); Xextern void gv_delete_zoom(); Xextern void gv_dismiss(); Xextern void gv_scroll_up(); Xextern void gv_scroll_down(); Xextern void gv_scroll_left(); Xextern void gv_scroll_right(); Xextern void gv_erase_locator(); Xextern void gv_check_file(); X X/* Misc */ Xextern void show_page(); Xextern Boolean setup_ghostview(); Xextern void layout_ghostview(); Xextern void SetStandardColormap(); Xextern void magnify(); Xextern String open_file(); Xextern String save_file(); Xextern String print_file(); Xextern void pscopydoc(); Xextern void positionpopup(); Xextern Boolean set_new_magstep(); Xextern Boolean set_new_orientation(); Xextern Boolean set_new_pagemedia(); Xextern void build_pagemedia_menu(); Xextern Widget build_label_menu(); Xextern void new_file(); $ CALL UNPACK GV.H;1 1567284586 $ create 'f' X==================== ghostview 1.4 (11 Oct 92) ===================== X X 1. Merge in VMS support from Terry Poot . X X 2. Force the Alloc error to occur immediately after trying to allocate X the backing pixmap. Deal with it as best as we can. X X 3. Withdraw unused function GhostviewGetInputFileDescriptor(). X X 4. Use XCOMM trick from X11R5 to make Imakefile more portable. X X 5. Renamed ghostview.h to gv.h and Ghostview.ad.h to app-defaults.h to X avoid limitations in VMS file names. X X 6. Correct problem where ghostscript interpreter was not being killed X when the popup zoom window was dismissed. X X 7. Propagate error messages about alloc failures and interpreter failures X in both main and zoom windows back to the information window. X X 8. Catch X errors and gracefully die if one occurs. X X 9. Relayout ghostview whenever the document requests a new orientation or X page media. X X10. Allow for multipage encapsulated PostScript figures. X X11. More upgrades to PostScript scanner. X - Comment section now terminated by %X where X is unprintable. X - Length of section is now properly computed when there is an X included document. X - Cleaned up misuse of global variables. X - Ignore comments within %%Begin(End)Feature, %%Begin(End)File, X %%Begin(End)Font, %%Begin(End)ProcSet, %%Begin(End)Resource. X - Change enum `7BLLX, LLY, URX, URY`7D to #defines to avoid confusing so Vme X compilers. X X12. Pay attention to ordinal number on %%Page comment to detect included X figures without %%Begin(End)Document guards. X X13. Added reopen button. X X14. Small POSIX change in Dir.c X X15. Make installStdCmap false by default. X X16. Fix error where wrong pages were being saved or printed when descending X page order is used. X X17. Be sure to discard old backing pixmap if new alloc fails. X X==================== ghostview 1.3-terry (30 May 92) ===================== X X 1. Rework the DSC comment scanner to return the length of the section as X well as the start and end position. X X 2. Rework sending PostScript input down the pipe to eliminate a gross X efficiency problem. I/O is done in 512 byte buffers rather than X line by line. As many buffers as possible are sent before returning X from routine. X X 3. Change Path.c to include to get and define X getuid in terms of uid_t. X X 4. Added #defines for memset() and memcpy() for use when BSD4_2 is defined. X X==================== ghostview 1.3 (12 May 92) ===================== X X 1. Fix bug where EPSF figures with a %%Page comment would cause ghostview X to use garbage for the orientation or media. X X 2. Redid waiting for form to change size before reattaching the chains the V X X way. (Previous algorithm used a subsidiary event loop. It was prone X to getting stuck with the wrong app-defaults.) The new algorithm uses X timer events with exponential backoff. X X 3. Added Prior and Next keys to page back and forward. X X 4. Added GhostviewCheckFile action and bound it to MapNotify. Ghostview wi Vll X now redraw the current page on deiconify when the file has changed. X X 5. Added application resource for the name of the PRINER environment variab Vle. X Default is LPDEST for SYSV and PRINTER for BSD. Also changed printer X command to default to lp for SYSV and lpr for BSD. X X 6. Change Print Marked Pages to mark the current selection or current page X when no pages are marked. It unmarks any page that it marked after send Ving X output to the print command. Also, change Print Marked Pages to call X print whole when there was no table of contents. This allows people to X print a EPSF figure without having to press Shift P. X X 7. Automatically center page within viewport. autoCenter app-default or X -nocenter can be used to disable this behavior. Add Center to Page menu X and GhostviewCenter action and bind it to the C key. X X 8. Reworked the way that popup zoom windows work. The notify event contain Vs X both the window size desired and resolution desired. This allows much X greater flexibility in the zoom windows. Changed the default zooms to X be all 500x500 pixels at 200, 300, and 400 dpi. Popup zoom windows can X be dismissed with the new dismiss button or pressing Q within the window V. X X 9. Added -page