home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / mntlib25.zoo / rmdir.c < prev    next >
C/C++ Source or Header  |  1991-10-19  |  366b  |  23 lines

  1. /* rmdir -- remove a directory */
  2. /* written by Eric R. Smith and placed in the public domain */
  3.  
  4. #include <limits.h>
  5. #include <osbind.h>
  6. #include <errno.h>
  7. #include "lib.h"
  8.  
  9. int rmdir(_path)
  10.     const char *_path;
  11. {
  12.     char path[PATH_MAX];
  13.     int  r;
  14.  
  15.     _unx2dos(_path, path);
  16.     r = Ddelete(path);
  17.     if (r < 0) {
  18.         errno = -r;
  19.         r = -1;
  20.     }
  21.     return r;
  22. }
  23.