Re: Logical device for openVMS implemented
[email protected] (Jacob (=Jouk) Jansen)
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote on 10-SEP-2003 09:37:54.75 >I've tried to understand your change, and found it (the understanding) isn't >simple. >IMO the explanation to be improved. > >1. You wrote : "the logical device (an environment variable) contains a >search list >of directories all ending on '.]'". What is "logical device" in this >sentence ? >Is it same as <logicaldevice> above ? From the code I guess it is not. >So what is it exactly ? On OpenVMS each file has a file name with the syntax: <device>:[<dir>.<dir>.<dir>]<filename> (c.f. unix: /device/dir/dir/dir/filename ) <device> is the physical device (hard-disk,CD, Tape etc..) [<dir>.<dir>.<dir>] is the directory on the hard disk <filename> is the file-name This is not always convenient so one can define logicals for the locations of the files containing search pathes (like the path's on Unix) i.e. For ghostscript files used to be searched as GS_LIB:<filename> where GS_LIB is defined on my machine as "GS_LIB" = "$disk4:[joukj.public.ghost.lib]" (LNM$JOB_815D4580) = "$disk4:[joukj.public.ghost.gs.gs.lib]" = "$disk4:[joukj.public.ghost.fonts]" meaning that a private lib, the gs-library directory and the fonts directory are "searched" when openning GS_LIB:<filename> gs also uses sometimes SYS$SCRATCH:<filename> where SYS$SCRATCH is a logical pointing to a directory. The definition of SYS$SCRATCH is standard on all VMS machines. However gs also tries to open files in subdirectories of the library i.e. Decode/Unicode. in a subdirectory of $disk4:[joukj.public.ghost.gs.gs.Resources] To find files like GS_LIB[Decode]Unicode. The logical GS_LIB has to be defined as "GS_LIB" = "$disk4:[joukj.public.ghost.lib.]" (LNM$JOB_8186CD00) = "$disk4:[joukj.public.ghost.gs.gs.lib.]" = "$disk4:[joukj.public.ghost.fonts.]" = "$disk4:[joukj.public.ghost.gs.gs.Resource.]" (Note the . before the ]) In this case files in the directory $disk4:[joukj.public.ghost.gs.gs.lib] should be opened as GS_LIB:[000000]<filename> >2. You coded : > > logical = getenv( buffer ); > >At this moment the buffer contains a file name prefix. >You consider it as a name for environment variable, >which (I guess) you assume to substitute the prefix. >This behavior is too different from one on other platforms. >Can you explain a reason why the GS behavior must be so different ? The reason is that on OpenVMS one can open a file GS_LIB:[directory]file.name where GS_LIB is a logical (cf. unix environment) while the program opening this file does not know at all that it is a logical. It just thinks it is the physical address. It is like symbolic links on Unix with the extention that it may point to a search list. However there may be 2 different syntaxes and the above statement on logical = getenv( buffer ) is to determine which syntax should be used. >3. (2) requires a clear explanation and change to GS documentation. >Actually I strongly against such change. Nope. since this GS_LIB was always used on VMS. It can be defined as previously, but then the Resource/subdirs cannot be accessed. >4. Where the magic constant ":[000000]" comes from ? that is VMS. It is the root of the device (cf. / on Unix) >5. You wrote : "ending on '.]'". I recall it is a kind of wildcard on VMS, >which correspond to "/*" on Unix. Meanwhile gp_file_name_combine was not >intended Nope that is ...] so it is not a wild card. >to process wildcards, and malfunctions if you pass a Postscript wildcard to >it on Windows. >I strongly against a processing of wildcards in gp_file_name_combine. >Instead that gp_file_name_combine is assumed to take a truncated path and >concatenate it with a relative path. >If you want to process wildcards, you should find a different place of code >for doing this. >Possibly the place is outside Ghostscript. In any case please first define >(in English) what must happen. For example, what is the result of combining >"\a\b*" and "\bc" : is it "\a\b*\bc" or "\a\bc" or else ? > >Generally, I strongly against this patch. Do you have a better idea how to reach the Decode/Unicode. file from the installation directory GS_LIB as it use to be? >Al least it requires a clarification and documentation. Jouk Bush : All votes are equal but some votes are more equal than others. >------------------------------------------------------------------------------< Jouk Jansen [email protected] Technische Universiteit Delft tttttttttt uu uu ddddddd Nationaal centrum voor HREM tttttttttt uu uu dd dd Rotterdamseweg 137 tt uu uu dd dd 2628 AL Delft tt uu uu dd dd Nederland tt uu uu dd dd tel. 31-15-2782272 tt uuuuuuu ddddddd >------------------------------------------------------------------------------<