Z267: Convert File-name to and from UNIX Syntax

Author(s): J. Zoll Library: KERNLIB, VAX only
Submitter: Submitted: 01.09.1990
Language: Fortran Revised: 01.11.1994

These routines convert a file name from UNIX form to VAX VMS form, and vice versa. The correspondance is as follows:

   VAX:    node::disk:[a.b.c]file.ext;cy
   UNIX:   //node/disk/a/b/c/file.ext;cy
 
   VAX:     [a.b.c]file.ext;cy   and   [.a.b.c]file.ext;cy
   UNIX:   /(a/b/c/file.ext;cy           a/b/c/file.ext;cy
Forms like ../file.ext;cy and  /dir/file.ext;cy are also handled.
For back-compatibility /=disk is handled as /disk.

Structure:

SUBROUTINE subprograms
User Entry Names: FTOVAX, FFRVAX
Common Blocks: COMMON /SLATE/ ISTAT,DUMMY(39)

Usage:

Convert to VAX form

    CALL FTOVAX(CHNAME,NCH)
 
       *CHNAME*  file-name to be converted in situ
          *NCH*  significant length of the name

No conversion is done if the file-name does not contain a character "/" on input.
Convert to UNIX form

    CALL FFRVAX(CHNAME,NCH)
 
       *CHNAME*  file-name to be converted in situ
          *NCH*  significant length of the name
No conversion is done if the file-name does already contain a character "/" on input.

This routine does some tidying up if necessary, thus for example the troublesome

disk:[a][b.c]fn.ext becomes the correct /disk/a/b/c/fn.ext

Both routines return ISTAT=0 if no conversion was needed, ISTAT=1 for successful conversion,
and ISTAT=-1 if a syntax error was detected.

Note that both routines update both the file-name and its useful length NCH in situ.

Examples:

   tex/z267.tex                   [.tex]z267.tex
   ../wyl/kernfor.car             [-.wyl]kernfor.car
   /(julia/kern/wyl/kernvax.car   [julia.kern.wyl]kernvax.car
   /cern_root/pam/kernfor.car     cern_root:[pam]kernfor.car
tex2html_wrap_inline67

Michel Goossens Wed Jun 5 10:08:43 METDST 1996