Revision 10977,
1.2 KB
checked in by danw, 27 years ago
(diff) |
assume POSIX. (from svalente)
|
Line | |
---|
1 | /* |
---|
2 | * $Source: /afs/dev.mit.edu/source/repository/athena/bin/delete/util.h,v $ |
---|
3 | * $Author: danw $ |
---|
4 | * $Header: /afs/dev.mit.edu/source/repository/athena/bin/delete/util.h,v 1.13 1997-12-31 22:36:02 danw 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 | |
---|
20 | #include <stdlib.h> |
---|
21 | |
---|
22 | char *append(); |
---|
23 | char *convert_to_user_name(); |
---|
24 | char *firstpart(); |
---|
25 | char *lastpart(); |
---|
26 | char *strindex(); |
---|
27 | char *strrindex(); |
---|
28 | #ifdef MALLOC_DEBUG |
---|
29 | char *Malloc(); |
---|
30 | #else |
---|
31 | #define Malloc(a) malloc(a) |
---|
32 | #endif |
---|
33 | |
---|
34 | int is_mountpoint(), is_link(); |
---|
35 | |
---|
36 | #define is_dotfile(A) ((*A == '.') && \ |
---|
37 | ((*(A + 1) == '\0') || \ |
---|
38 | ((*(A + 1) == '.') && \ |
---|
39 | (*(A + 2) == '\0')))) |
---|
40 | |
---|
41 | #define is_deleted(A) ((*A == '.') && (*(A + 1) == '#')) |
---|
42 | |
---|
43 | /* It would be BAD to pass something with a ++ anywhere near it into */ |
---|
44 | /* this macro! */ |
---|
45 | #define Opendir(dir) opendir(*(dir) ? (dir) : ".") |
---|
Note: See
TracBrowser
for help on using the repository browser.