source: trunk/athena/bin/delete/util.h @ 12350

Revision 12350, 1.1 KB checked in by ghudson, 25 years ago (diff)
Some RCS ID cleanup: delete $Log$ and replace other RCS keywords with $Id$.
Line 
1/*
2 * $Id: util.h,v 1.14 1999-01-22 23:09:09 ghudson Exp $
3 *
4 * This file is part of a package including delete, undelete,
5 * lsdel, expunge and purge.  The software suite is meant as a
6 * replacement for rm which allows for file recovery.
7 *
8 * Copyright (c) 1989 by the Massachusetts Institute of Technology.
9 * For copying and distribution information, see the file "mit-copying.h."
10 */
11#include "mit-copying.h"
12
13#include <sys/stat.h>
14#ifndef S_IFLNK
15#define lstat stat
16#endif
17
18#include <stdlib.h>
19
20char *append();
21char *convert_to_user_name();
22char *firstpart();
23char *lastpart();
24char *strindex();
25char *strrindex();
26#ifdef MALLOC_DEBUG
27char *Malloc();
28#else
29#define Malloc(a) malloc(a)
30#endif
31
32int is_mountpoint(), is_link();
33
34#define is_dotfile(A) ((*A == '.') && \
35                       ((*(A + 1) == '\0') || \
36                        ((*(A + 1) == '.') && \
37                         (*(A + 2) == '\0'))))
38
39#define is_deleted(A) ((*A == '.') && (*(A + 1) == '#'))
40
41 /* It would be BAD to pass something with a ++ anywhere near it into */
42 /* this macro!                                                       */
43#define Opendir(dir) opendir(*(dir) ? (dir) : ".")
Note: See TracBrowser for help on using the repository browser.