Logical device for openVMS implemented

[email protected] (Jacob (=Jouk) Jansen)
Newsgroups gmane.comp.printing.ghostscript.patches
Message-ID <[email protected]>
Hi All,

I would like to commit a patch to gp_vms.c (see below). This patch allows
the access of files in subdirectories i.e. /Decoding/Unicode.

To understand the patch one need to know a little on OpenVMS file syntax
There are 3 possibilties:
    1 : <device>:[<dir>.<subdir>.<subdir>]<filename>
    2 : <logicaldevice>:[<dir>.<subdir>.<subdir>]<filename>
    3 : <logicaldirectory>:<filename>

case 1 is not implemented and I never saw this in gs.
case 3 is the case that was implented up to now and is unaffected by the
       patch. this is nesscesarry because sometimes sys$scratch a logical
       defined by the system as logical directory is used. No subdirectories
       can be accessed in this mode.


case 2 : the logical device (an environment variable) contains a search list
  of directories all ending on '.]' (this is checked). Note that to get this
  feature the logical GS_LIB should be addapted in the users definition.
  I will put add remark on hoe to do this in doc/gp-vms.hlp



                   Jouk




************
File $DISK4:[JOUKJ.PUBLIC.GHOST.gs_2003_09_05.gs.src]gp_vms.c;32
  574   	char* logical;
  575   	int tmp_plen , llen , log_dev = 0;
  576   	
******
File $DISK5:[JOUKJ.CVS.GS.gs.src]gp_vms.c;16
  574   	int tmp_plen;
  575   	
************
************
File $DISK4:[JOUKJ.PUBLIC.GHOST.gs_2003_09_05.gs.src]gp_vms.c;32
  590           buffer[ tmp_plen ] = 0;
  591   	logical = getenv( buffer );
  592   	llen = strlen( logical );
  593   	if ( llen > 1 )
  594   	  {
  595   	     if ( logical[ llen - 2 ] == '.' && logical[ llen - 1 ] == ']' )
  596   	       log_dev = 1;
  597   	  }
  598   	if ( log_dev == 0 )
  599   	  {
  600   	     memcpy(buffer + tmp_plen , ":" , 1 );
  601   	     llen = 1;
  602   	  }
******
File $DISK5:[JOUKJ.CVS.GS.gs.src]gp_vms.c;16
  589   	memcpy(buffer + tmp_plen , ":" , 1 );
  590   	memcpy(buffer + tmp_plen + 1, fname, flen);
  591   	if ( memchr( fname , '.' , flen ) != 0 )
  592   	  {
  593   	     buffer[ tmp_plen + flen + 1] = 0;
  594   	     *blen = tmp_plen + flen + 1;
  595   	  }
************
************
File $DISK4:[JOUKJ.PUBLIC.GHOST.gs_2003_09_05.gs.src]gp_vms.c;32
  605   	     if ( memchr( fname , ']' , flen ) == 0 )
  606   	       {
  607   		  memcpy(buffer + tmp_plen , ":[000000]" , 9 );
  608   		  llen = 9;
  609   	       }
  610   	     else
  611   	       {
  612   		  memcpy(buffer + tmp_plen , ":[" , 2 );
  613   		  llen = 2;
  614   	       }
  615   	  }
  616   	memcpy(buffer + tmp_plen + llen , fname, flen);
  617   	if ( memchr( fname , '.' , flen ) != 0 )
  618   	  {
  619   	     buffer[ tmp_plen + flen + llen ] = 0;
  620   	     *blen = tmp_plen + flen + llen ;
  621   	  }
  622   	else
  623   	  {
  624   	     memcpy(buffer + tmp_plen + flen + llen , "." , 1 );
  625   	     buffer[ tmp_plen + flen + llen + 1 ] = 0;
  626   	     *blen = tmp_plen + flen + llen + 1;
  627   	  }
******
File $DISK5:[JOUKJ.CVS.GS.gs.src]gp_vms.c;16
  598   	     memcpy(buffer + tmp_plen + flen + 1 , "." , 1 );
  599   	     buffer[ tmp_plen + flen + 2] = 0;
  600   	     *blen = tmp_plen + flen + 2;
  601   	  }
************

Number of difference sections found: 3
Number of difference records found: 36

DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=$DISK4:[JOUKJ.PUBLIC.GHOST.gs_2003_09_05.gs.src]mail.txt;1-
    $DISK4:[JOUKJ.PUBLIC.GHOST.gs_2003_09_05.gs.src]gp_vms.c;32-
    $DISK5:[JOUKJ.CVS.GS.gs.src]gp_vms.c;16


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

>------------------------------------------------------------------------------<
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.