mapu2d(PCI) 6 January 1993 mapu2d(PCI) Name mapu2d - map UNIX operating system pathname to a DOS pathname Syntax #include <pcilib.h> #include <memmdl.h> int mapu2d( dpath, upath ) char *dpath, *upath; Description mapu2d is a DOS function that returns, in DOS path name conventions, the translation of UNIX operating system path name. dpath is the DOS name returned by the function. It is a fully qualified (including driveletter), null-terminated string that exactly corresponds to the UNIX operating system path. upath is the UNIX operating system path name. It must be provided as a null-terminated string. The path name may include a drive designation to indicate which host the translation is performed on. If no drive is specified, the current drive is used. The upath parameter uses normal UNIX operating system conventions (for example, forward slashes as sepa- rators). Return value On successful completion, a value of 0 returns. If the translation fails, a value of -1 returns. Possible causes for failure are: the UNIX operating system file name does not exist; access is denied; or the path contains an invalid component. Example : : char uPath[128] = "D:/UNIX/pathname"; char dPath[128]; int retVal; : : /* Find the DOS name for the UNIX path on virtual drive D: */ if ( (retVal = mapu2d(dPath, uPath)) == -1 ) errorHandler(); else printf("Mapped DOS name is: %s", dPath); : : Bugs No error is returned if a path component does not exist. The nonexistent component and remainder of the path is simply forced to uppercase. The calling program must ensure that the path exists before calling this function. See also isvirtual(PCI), mapd2u(PCI)