Converts OpenVMS file specifications to UNIX style file specifications.
#include <unixlib.h> int decc$from_vms (const char *vms_filespec, int action_routine, int wild_flag);
If the action_routine returns a nonzero value (TRUE), file translation continues. If it returns a zero value (FALSE), no further file translation takes place.
x | The number of file names that result from the specified OpenVMS file specification. |
#include <unixlib.h> #include <stdio.h> int main(int argc, char *argv[]) { int number_found; /* number of files found */ int print_name(); /* name printer */ printf( "Translating: %s\n", argv[1]); number_found = decc$from_vms( argv[1], print_name, 1); printf( "\n%d files found", number_found ); } /* print the name on each line */ print_name(char *name) { printf( "\n%s", name ); /* will continue as long as success status is returned */ return(1); }
This example shows how to use the decc$from_vms routine in DEC C. It produces a simple form of the ls command that lists existing files that match an OpenVMS file specification supplied on the command line. The matching files are displayed in UNIX style file specification format.