source: trunk/athena/bin/delete/directories.h @ 12144

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
16typedef 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
31typedef 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     
41typedef 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
55int add_directory_to_parent();
56int add_file_to_parent();
57int add_path_to_tree();
58int find_child();
59filerec *first_in_directory();
60filerec *first_specified_in_directory();
61filerec *get_cwd_tree();
62filerec *get_root_tree();
63filerec *next_directory();
64filerec *next_in_directory();
65filerec *next_leaf();
66filerec *next_specified_directory();
67filerec *next_specified_in_directory();
68filerec *next_specified_leaf();
69
70int get_leaf_path();
71int accumulate_names();
72
73void free_leaf();
Note: See TracBrowser for help on using the repository browser.