home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume22 / undel2 / part01 / util.h < prev   
C/C++ Source or Header  |  1990-06-07  |  1KB  |  40 lines

  1. /*
  2.  * $Source: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/util.h,v $
  3.  * $Author: jik $
  4.  * $Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/util.h,v 1.10 90/01/11 03:44:53 jik Exp $
  5.  * 
  6.  * This file is part of a package including delete, undelete,
  7.  * lsdel, expunge and purge.  The software suite is meant as a
  8.  * replacement for rm which allows for file recovery.
  9.  * 
  10.  * Copyright (c) 1989 by the Massachusetts Institute of Technology.
  11.  * For copying and distribution information, see the file "mit-copyright.h."
  12.  */
  13. #include "mit-copyright.h"
  14.  
  15. char *append();
  16. char *convert_to_user_name();
  17. char *firstpart();
  18. char *lastpart();
  19. char *strindex();
  20. char *strrindex();
  21. #ifdef MALLOC_DEBUG
  22. char *Malloc();
  23. #else
  24. #define Malloc(a) malloc(a)
  25. extern char *malloc();
  26. #endif
  27.  
  28. int is_mountpoint(), is_link();
  29.  
  30. #define is_dotfile(A) ((*A == '.') && \
  31.                ((*(A + 1) == '\0') || \
  32.             ((*(A + 1) == '.') && \
  33.              (*(A + 2) == '\0'))))
  34.  
  35. #define is_deleted(A) ((*A == '.') && (*(A + 1) == '#'))
  36.  
  37.  /* It would be BAD to pass something with a ++ anywhere near it into */
  38.  /* this macro!                               */
  39. #define Opendir(dir) opendir(*(dir) ? (dir) : ".")
  40.