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.
RevLine 
[1706]1/*
2 * $Source: /afs/dev.mit.edu/source/repository/athena/bin/delete/util.h,v $
3 * $Author: jik $
[4505]4 * $Header: /afs/dev.mit.edu/source/repository/athena/bin/delete/util.h,v 1.12 1991-02-28 18:44:15 jik 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
[1691]20char *append();
21char *convert_to_user_name();
22char *firstpart();
23char *lastpart();
24char *strindex();
25char *strrindex();
[2581]26#ifdef MALLOC_DEBUG
[2362]27char *Malloc();
28#else
29#define Malloc(a) malloc(a)
30extern char *malloc();
31#endif
[1854]32
[2221]33int is_mountpoint(), is_link();
34
[1854]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) == '#'))
[2481]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.