home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 28
/
amigaformatcd28.iso
/
-seriously_amiga-
/
archivers
/
arcppc
/
srcpup
/
getwd.c
next >
Wrap
C/C++ Source or Header
|
1998-04-23
|
424b
|
31 lines
/* by Andreas R. Kleinert in 1998 */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dos/dosextens.h>
#include <proto/dos.h>
char *getwd(char *dirname)
{
BPTR lock;
char *name;
name = malloc(256);
if(name)
{
if(!stricmp(".", dirname)) dirname = "";
lock = Lock(dirname, ACCESS_READ);
if(lock)
{
NameFromLock(lock, name, 255);
UnLock(lock);
}
}
return(name);
}