"Fossies" - the Fresh Open Source Software Archive 
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 Release notes for VMS changes to Ghostview
2 8/18/92, Terry Poot <tp@mccall.com>
3
4 Introduction
5 ------------
6
7 I've gotten Ghostview version 1.4 working on VMS 5.5, compiled with VAX C
8 v3.2, and using Ghostscript 2.4.1 and George Carrette's
9 <gjc@mitech.com> port of the R5 Athena widgets.
10
11 Ghostscript availablility is, I believe, mentioned in the Ghostview readme
12 files.
13
14 George's kit for building the Athena widgets is available from
15 vmsnet.sources archive sites, including FTP from white.cerritos.edu
16 [130.150.200.22] and acfcluster.nyu.edu , and mailserver access from
17 MAILSERV@Cerritos.edu. (Send a message with 'help' in the body for
18 instructions.) You will also need the directories mit/lib/Xmu and
19 mit/lib/Xaw from the MIT X11r5 source kit. I think you can get them from
20 export.ai.mit.edu. I don't know of any non-FTP way other than finding a
21 friend who can send them to you (that's what I did).
22
23 There's nothing I can think of in the changes to require any of these
24 specific versions. I suspect it will work on VMS 5.0 or later, possibly
25 even 4.7. I don't have any of these systems to test on, however. Also, any
26 Ghostscript supported by Ghostview should work, as NO changes were made to
27 Ghostscript to support Ghostview on VMS.
28
29 I did this port specifically because I required a Postscript previewer for
30 my current project, to preview files created by my applications. It is
31 likely that anything I don't use hasn't been tested much, if at all.
32 However, the relatively small number of changes is encouraging, and the
33 changes themselves have all been tested.
34
35 The 2 large areas of changes are processing of print requests, and the
36 communications between Ghostview and Ghostscript. The changes to the print
37 code are in the routine print_file in misc.c, and changes to the resources
38 used by that code are in main.c. Changes to the communications code are all
39 in the ghostview widget, which is in ghostview.c, with changes to the
40 widget structure in ghostviewp.h. Most other changes were simple things
41 like dealing with different include files to get the program to compile.
42
43 Building
44 --------
45
46 There are 2 build procedures provided. If you have MMS, you can use the
47 DESCRIP.MMS description file. If not, there is a DCL procedure name
48 VMS_BUILD.COM. The command procedure builds everything, whereas MMS will
49 only build the things that have changed.
50
51 VMS POSIX is used to convert the application defaults file to a C include
52 file for use as fallback resources. The include file is provided for the
53 shipped version of the application defaults file, but if you don't have
54 POSIX installed, you won't be able to automatically update the include file
55 to match changes you make to the application defaults file. Note that the
56 data in the include file is used only if you do NOT install the application
57 defaults file on your system (see the Installation section below).
58
59 (If you have a unix system available, you can move files back and forth
60 manually and run ad2c on that machine to create an updated app-defaults.h.)
61
62 If you have MMS:
63
64 First, edit DESCRIP.MMS. Change the second line to show the proper location
65 on your system for the command procedure that defines the Athena logical
66 names (this is the LOGICALS.COM procedure that came with George Carrette's
67 Athena widget kit). Also, if you don't have VMS POSIX 1.0 installed on your
68 system, delete the line that starts:
69
70 source:app-defaults.h : source:Ghostview.ad
71
72 and the following action lines, or just add a "!" before the POSIX/RUN
73 command.
74
75 Once you've made these changes, just type "MMS" and it should build.
76
77 If you don't have MMS:
78
79 First, edit VMS_BUILD.COM. Change the first line to show the proper
80 location on your system for the command procedure that defines the Athena
81 logical names (this is the LOGICALS.COM procedure that came with George
82 Carrette's Athena widget kit). Also, if you don't have VMS POSIX 1.0
83 installed on your system, delete or comment out the line that contains the
84 command POSIX/RUN. Then simply type in "@VMS_BUILD".
85
86 You might notice that we don't use all the source files. The ones not part
87 of the VMS build procedure aren't needed for VMS. This includes setenv.c,
88 getenv.c, and all source files for the select file widget. The file
89 vms_types.h is new, and is used to define VMS data structures in
90 ghostview.c. This file was written by Jym Dyer in 1989, so I don't know if
91 the email address in the file is still good. I added a definition to it
92 (IOSB_GET_T). It was already Copyright'ed under the GPL, so there's no
93 conflict including it here.
94
95 Installation
96 ------------
97
98 To run Ghostview, you must define a foreign command for it. This can be
99 done in a user's login.com, or in the system wide sylogin.com for
100 convenience. The command to do this is:
101
102 $ gv :==$dev:[dir]gv.exe
103
104 Fill in the device and directory for your site. Note the "$" after the
105 ":==". It's important that it be there.
106
107 You can call this something other than gv, but DON'T call it ghostview!!!
108 Repeat: DON'T CALL IT GHOSTVIEW!!! If you do, Ghostscript will no longer
109 work on your system, except (maybe) when called by Ghostview. The reason,
110 for the curious, is that Ghostscript expects the environment variable
111 GHOSTVIEW, if it exists, to be the window id of the window it should draw
112 on. That's how Ghostview gets Ghostscript to use a Ghostview window for
113 output. Symbols, including foreign command symbols, will be seen as
114 environment variables, so Ghostscript will try to use your command
115 definition as a window id, and choke and die.
116
117 Speaking of Ghostscript, the default resource setup expects it to be
118 defined as a foreign command named gs. If you choose to call the
119 Ghostscript command something else, you'll need to change the interpreter
120 resource of Ghostview to the command needed to run Ghostscript (or supply
121 the -interpreter command line option). It MUST be defined as a foreign
122 command so that Ghostview can set some command line options.
123
124 The application defaults file can be installed system-wide by copying it to
125 DECW$SYSTEM_DEFAULTS:GHOSTVIEW.DAT (you have to have privileges to do
126 that). Alternately, each Ghostview user can copy it to
127 DECW$USER_DEFAULTS:GHOSTVIEW.DAT. (DECW$USER_DEFAULTS usually points to the
128 user's login directory.) If that file is not found, the compiled in values
129 will be used. Therefore, if you install the application defaults file, you
130 don't really have to worry about keeping app-defaults.h up to date, as it
131 is only used if the app defaults file isn't found. You will especially want
132 to install the file if you don't have VMS POSIX available to maintain the
133 include file that is derived from it.
134
135 Notes for application users
136 ---------------------------
137
138 There aren't too many differences to worry about.
139
140 No attempt has been made to port the select file widget. Any prompt for a
141 file name will simply pop up a dialog box into which you type the file
142 name. I'd have tried to integrate the DECwindows file selection widget, but
143 this is an Athena program, and I figured the hassle to get it all to work
144 together wouldn't be worth the trouble. Besides, in my application, I
145 didn't need it. :-)
146
147 Also the print related resources have been changed a bit.
148
149 The printCommand resource must be a command that takes a filename argument.
150 The default for printCommand is "Print_dcl/Delete". The "_dcl" suffix is to
151 avoid any symbol redefinitions of the print command.
152
153 The printerVariable resource is the name of a logical name that may contain
154 qualifiers to the print command. The logical name has been changed from
155 PRINTER to GV_PRINT_QUAL to make it a little bit safer to set system wide,
156 for instance with a /QUEUE=xxx qualifier to point to the queue serving your
157 postscript printer. The printPrompt resource has been changed to "Print
158 Qualifiers: " to reflect this usage.
159
160 defaultPrinter defaults to NULL, but it will be set the the equivalence
161 string for GV_PRINT_QUAL at application startup if that logical is set (or
162 whatever logical might be named in printerVariable if you change it). Thus
163 you can default the print queue either with a logical name or by putting it
164 in Ghostview's application defaults file.
165
166 Any print command can be used, but bear in mind that it must take one
167 argument, which is a temporary file name. The print command must delete
168 this file or it will be left lying around. printerVariable may be used to
169 pass any qualifiers to the command. It can be used to select a print queue,
170 form, etc. This is the item that is prompted for when you tell it to print.
171 (printPrompt has been changed from "Printer Name:" to "Print Qualifiers:").
172 If you define a logical name or symbol named GV_PRINT_QUAL (or some other
173 name if you change printerVariable) it will be used as the
174 default response for this prompt.
175
176 The command executed in any print request is the value of printComand,
177 followed by a space and then by the print qualifiers specified by the user
178 (which default to defaultPrinter, see above) followed by another space and
179 then the temp file name. You can fill in these 2 resources to suit
180 your needs. Just remember the user can over-ride the second one at run
181 time. (That's why the /DELETE is part of the print command as distributed,
182 rather than included as a default in defaultPrinter.)
183
184 This would make a bit more sense if I'd renamed the resources, but that
185 would have created a lot of VMS specific code for little actual gain. If it
186 helps you keep track of them, here's a brief summary table:
187
188 resource VMS Value What it is
189 -------- --------- ----------
190 printCommand PRINT_DCL/DELETE The print command
191 printerVariable GV_PRINT_QUAL logical name to hold default qualifiers
192 defaultPrinter <empty> Default qualifiers, over-ridden by
193 GV_PRINT_QUAL if set
194 printPrompt "Print Qualifiers:" Just a prompt string
195
196 Notes for widget users
197 ----------------------
198
199 See the notes for application users for differences in resources.
200
201 The widget uses VMS Event Flag number 23. You can change the event flag
202 number by changing the define for XtEFN in ghostview.c. Ghostview can
203 tolerate other modules in the program setting the flag, as it always checks
204 for actual I/O completion using IOSB's. However, if you clear the flag, Xt
205 may miss an I/O completion and your program could hang. Best to simply
206 avoid it.
207
208 I've made changes to the definitions of the widget data in ghostviewp.h.
209 I've ifdef'ed out data items not used in the VMS version and added a few
210 that I needed under VMS. I might have missed a few of the former kind, but
211 if so, they should just sit around unused and not bother anyone.
212 --
213 Terry Poot <tp@mccall.com> The McCall Pattern Company
214 (uucp: ...!rutgers!depot!mccall!tp) 615 McCall Road
215 (800)255-2762, in KS (913)776-4041 Manhattan, KS 66502, USA