home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 4 / CDPD_IV.bin / networking / tcpip / amitcp-support / wustl-ftpdaemon / support / readlink.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-29  |  258 b   |  15 lines

  1. #include <proto/dos.h>
  2. #include <string.h>
  3.  
  4. int readlink(char *path, char *buf, int bufsiz)
  5. {
  6.   struct MsgPort *port;
  7.   int ret = 0;
  8.  
  9.   if (port = DeviceProc (path))
  10.     if (ReadLink(port, NULL, path, buf, bufsiz))
  11.       ret = strlen (buf);
  12.  
  13.   return ret;
  14. }
  15.