Revision 10977,
1.2 KB
checked in by danw, 27 years ago
(diff) |
assume POSIX. (from svalente)
|
Rev | Line | |
---|
[1706] | 1 | /* |
---|
| 2 | * $Source: /afs/dev.mit.edu/source/repository/athena/bin/delete/util.h,v $ |
---|
[10977] | 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 $ |
---|
[1706] | 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. |
---|
[4505] | 11 | * For copying and distribution information, see the file "mit-copying.h." |
---|
[1706] | 12 | */ |
---|
[4505] | 13 | #include "mit-copying.h" |
---|
[1706] | 14 | |
---|
[4417] | 15 | #include <sys/stat.h> |
---|
| 16 | #ifndef S_IFLNK |
---|
| 17 | #define lstat stat |
---|
| 18 | #endif |
---|
| 19 | |
---|
[10977] | 20 | #include <stdlib.h> |
---|
| 21 | |
---|
[1691] | 22 | char *append(); |
---|
| 23 | char *convert_to_user_name(); |
---|
| 24 | char *firstpart(); |
---|
| 25 | char *lastpart(); |
---|
| 26 | char *strindex(); |
---|
| 27 | char *strrindex(); |
---|
[2581] | 28 | #ifdef MALLOC_DEBUG |
---|
[2362] | 29 | char *Malloc(); |
---|
| 30 | #else |
---|
| 31 | #define Malloc(a) malloc(a) |
---|
| 32 | #endif |
---|
[1854] | 33 | |
---|
[2221] | 34 | int is_mountpoint(), is_link(); |
---|
| 35 | |
---|
[1854] | 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) == '#')) |
---|
[2481] | 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.