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

Revision 4505, 1.2 KB checked in by jik, 34 years ago (diff)
Shorten mit-copyright.h to mit-copying.h so it'll work on systems with 14-char filenames.
Line 
1/*
2 * $Source: /afs/dev.mit.edu/source/repository/athena/bin/delete/util.h,v $
3 * $Author: jik $
4 * $Header: /afs/dev.mit.edu/source/repository/athena/bin/delete/util.h,v 1.12 1991-02-28 18:44:15 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-copying.h."
12 */
13#include "mit-copying.h"
14
15#include <sys/stat.h>
16#ifndef S_IFLNK
17#define lstat stat
18#endif
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)
30extern char *malloc();
31#endif
32
33int is_mountpoint(), is_link();
34
35#define is_dotfile(A) ((*A == '.') && \
36                       ((*(A + 1) == '\0') || \
37                        ((*(A + 1) == '.') && \
38                         (*(A + 2) == '\0'))))
39
40#define is_deleted(A) ((*A == '.') && (*(A + 1) == '#'))
41
42 /* It would be BAD to pass something with a ++ anywhere near it into */
43 /* this macro!                                                       */
44#define Opendir(dir) opendir(*(dir) ? (dir) : ".")
Note: See TracBrowser for help on using the repository browser.