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

Revision 24908, 1.2 KB checked in by ghudson, 14 years ago (diff)
In delete: * Patches from Jonathan Kamens: - The "-f" flag to delete should suppress nonexistent file errors but not other errors. - When the "-v" flag is specified to expunge, the correct totals should be reported. Previously, the totals were incorrect. - Code cleanup.
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 "directories.h"
19#include <stdlib.h>
20
21char *append();
22char *convert_to_user_name();
23char *firstpart();
24char *lastpart();
25int get_home(char *buf);
26int timed_out(filerec *file_ent, time_t current_time, time_t min_days);
27char *strindex();
28char *strrindex();
29#ifdef MALLOC_DEBUG
30char *Malloc();
31#else
32#define Malloc(a) malloc(a)
33#endif
34
35int is_mountpoint(), is_link(char *name, struct stat *oldbuf), yes(void);
36int directory_exists(char *dirname);
37
38
39#define is_dotfile(A) ((*A == '.') && \
40                       ((*(A + 1) == '\0') || \
41                        ((*(A + 1) == '.') && \
42                         (*(A + 2) == '\0'))))
43
44#define is_deleted(A) ((*A == '.') && (*(A + 1) == '#'))
45
46 /* It would be BAD to pass something with a ++ anywhere near it into */
47 /* this macro!                                                       */
48#define Opendir(dir) opendir(*(dir) ? (dir) : ".")
Note: See TracBrowser for help on using the repository browser.