decc$translate_vms

Translates OpenVMS file specifications to UNIX style file specifications.

Format

#include  <unixlib.h>

char *decc$translate_vms  (const char *vms_filespec);

Argument

vms_filespec
The address of a null-terminated string containing a name in OpenVMS file specification format.

Description

This routine translates the given OpenVMS file specification into the equivalent UNIX style file specification, whether or not the file exists. This routine differs from the decc$from_vms routine, which does the conversion for existing files only.

Return Values
The address of a null-terminated string containing a name in UNIX style file specification format. 
Indicates that the file name is null or syntactically incorrect. 
-1  Indicates that the file specification contains an ellipsis (for example, [ . . . ]a.dat), but is otherwise correct. You cannot translate the OpenVMS ellipsis syntax into a valid UNIX style file specification. 

Example

    #include <unixlib.h>
    #include <stdio.h>
    
    int main(int argc, char *argv[])
            {
            char *ptr;                      /* translation result */
    
            ptr = decc$translate_vms( argv[1] );
            if (ptr == 0 || ptr == -1)
               printf( "could not translate %s\n", argv[1]);
            else
               printf( "%s is translated to %s\n", argv[1], ptr );
            }
    


Previous Page | Next Page | Table of Contents | Index