home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 316 / libsrc / rename.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-20  |  431 b   |  24 lines

  1.  
  2. #include "file.h"
  3. #include "osbind.h"
  4.  
  5. #ifdef DEBUG
  6. extern int stderr;
  7. #endif
  8.  
  9. int rename(old, new)
  10. char * old, * new;
  11. {
  12.   int result;
  13. #ifdef DEBUG
  14.   fprintf(stderr, "  rename('%s', '%s')", old, new);
  15. #endif
  16.   Fdelete(new);            /* necessary? */
  17.   result = Frename(0, old, new);
  18. #ifdef DEBUG
  19.   fprintf(stderr, " -> %d\n");
  20. #endif
  21.   if (result > 0) result = 0;    /* what does this mean??? */
  22.   return (result);
  23. }
  24.