dospwd
Purpose
Gives the full path name of the current directory.
Library
DOS Services Library (libdos.a)
Syntax
#include <dos.h>
char *dospwd (drive)
char *drive;
Description
The dospwd subroutine returns a pointer to the area of
memory that contains the null-terminated name of the
current directory for the drive specified by the drive
parameter. If the drive parameter is a valid drive name
(such as ""A:"" or ""B:""), then the current directory
for that drive is returned. If the drive parameter is
NULL, then the current directory for the current drive is
returned.
Return Value
Upon successful completion, a pointer to a string speci-
fying the full path name of the current directory is
returned. The memory for the name is allocated with the
malloc subroutine and should be deallocated with the free
subroutine. If the dospwd subroutine fails, a NULL
pointer is returned and doserrno is set to indicate the
error.
Related Information
In this book: "DOS services library," "dosassign," and
"doschdir."