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

Revision 12350, 1.6 KB checked in by ghudson, 26 years ago (diff)
Some RCS ID cleanup: delete $Log$ and replace other RCS keywords with $Id$.
Line 
1/*
2 * $Id: directories.h,v 1.16 1999-01-22 23:08:57 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
12#include "mit-copying.h"
13
14typedef short Boolean;
15#define True                    (Boolean) 1
16#define False                   (Boolean) 0
17
18
19#define specs_to_space(x)       ((x).st_blocks)
20#define space_to_k(x)           ((x) / 2 + (((x) % 2) ? 1 : 0))
21#define specs_to_k(x)           space_to_k((x).st_blocks)
22
23#define FOLLOW_LINKS            1
24#define DONT_FOLLOW_LINKS       0
25
26#define DIR_MATCH               1
27#define DIR_NO_MATCH            0
28
29typedef struct mystat {
30     dev_t st_dev;
31     ino_t st_ino;
32     unsigned short st_mode;
33     off_t st_size;
34     time_t st_chtime;
35     long st_blocks;
36} mystat;
37
38     
39typedef struct filrec {
40     char name[MAXNAMLEN];
41     struct filrec *previous;
42     struct filrec *parent;
43     struct filrec *dirs;
44     struct filrec *files;
45     struct filrec *next;
46     Boolean specified;
47     Boolean freed;
48     struct mystat specs;
49} filerec;
50
51
52
53int add_directory_to_parent();
54int add_file_to_parent();
55int add_path_to_tree();
56int find_child();
57filerec *first_in_directory();
58filerec *first_specified_in_directory();
59filerec *get_cwd_tree();
60filerec *get_root_tree();
61filerec *next_directory();
62filerec *next_in_directory();
63filerec *next_leaf();
64filerec *next_specified_directory();
65filerec *next_specified_in_directory();
66filerec *next_specified_leaf();
67
68int get_leaf_path();
69int accumulate_names();
70
71void free_leaf();
Note: See TracBrowser for help on using the repository browser.