home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / emacs-19.28-src.tgz / tar.out / fsf / emacs / unixlib / src / link.c < prev    next >
C/C++ Source or Header  |  1996-09-28  |  245b  |  17 lines

  1. #include "amiga.h"
  2.  
  3. int link(char *from, char *to)
  4. {
  5.   BPTR from_lock = Lock(from, ACCESS_READ);
  6.  
  7.   chkabort();
  8.   if (from_lock)
  9.     {
  10.       int ok = MakeLink(to, from_lock, 0);
  11.  
  12.       UnLock(from_lock);
  13.       if (ok) return 0;
  14.     }
  15.   ERROR;
  16. }
  17.