Revision 12144,
1.8 KB
checked in by ghudson, 26 years ago
(diff) |
Source changes for autoconfiscation: AFS_MOUNTPOINTS -> HAVE_AFS,
assume USE_BLOCKS, and fix qsort arguments.
|
Line | |
---|
1 | /* |
---|
2 | * $Source: /afs/dev.mit.edu/source/repository/athena/bin/delete/directories.h,v $ |
---|
3 | * $Author: ghudson $ |
---|
4 | * $Header: /afs/dev.mit.edu/source/repository/athena/bin/delete/directories.h,v 1.15 1998-11-16 16:42:16 ghudson 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 | |
---|
14 | #include "mit-copying.h" |
---|
15 | |
---|
16 | typedef short Boolean; |
---|
17 | #define True (Boolean) 1 |
---|
18 | #define False (Boolean) 0 |
---|
19 | |
---|
20 | |
---|
21 | #define specs_to_space(x) ((x).st_blocks) |
---|
22 | #define space_to_k(x) ((x) / 2 + (((x) % 2) ? 1 : 0)) |
---|
23 | #define specs_to_k(x) space_to_k((x).st_blocks) |
---|
24 | |
---|
25 | #define FOLLOW_LINKS 1 |
---|
26 | #define DONT_FOLLOW_LINKS 0 |
---|
27 | |
---|
28 | #define DIR_MATCH 1 |
---|
29 | #define DIR_NO_MATCH 0 |
---|
30 | |
---|
31 | typedef struct mystat { |
---|
32 | dev_t st_dev; |
---|
33 | ino_t st_ino; |
---|
34 | unsigned short st_mode; |
---|
35 | off_t st_size; |
---|
36 | time_t st_chtime; |
---|
37 | long st_blocks; |
---|
38 | } mystat; |
---|
39 | |
---|
40 | |
---|
41 | typedef struct filrec { |
---|
42 | char name[MAXNAMLEN]; |
---|
43 | struct filrec *previous; |
---|
44 | struct filrec *parent; |
---|
45 | struct filrec *dirs; |
---|
46 | struct filrec *files; |
---|
47 | struct filrec *next; |
---|
48 | Boolean specified; |
---|
49 | Boolean freed; |
---|
50 | struct mystat specs; |
---|
51 | } filerec; |
---|
52 | |
---|
53 | |
---|
54 | |
---|
55 | int add_directory_to_parent(); |
---|
56 | int add_file_to_parent(); |
---|
57 | int add_path_to_tree(); |
---|
58 | int find_child(); |
---|
59 | filerec *first_in_directory(); |
---|
60 | filerec *first_specified_in_directory(); |
---|
61 | filerec *get_cwd_tree(); |
---|
62 | filerec *get_root_tree(); |
---|
63 | filerec *next_directory(); |
---|
64 | filerec *next_in_directory(); |
---|
65 | filerec *next_leaf(); |
---|
66 | filerec *next_specified_directory(); |
---|
67 | filerec *next_specified_in_directory(); |
---|
68 | filerec *next_specified_leaf(); |
---|
69 | |
---|
70 | int get_leaf_path(); |
---|
71 | int accumulate_names(); |
---|
72 | |
---|
73 | void free_leaf(); |
---|
Note: See
TracBrowser
for help on using the repository browser.