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

Revision 23665, 1.8 KB checked in by broder, 15 years ago (diff)
In delete: * Apply patches from jik: - Change the "st_chtime" structure member to "st_ctim" to avoid a potential header file conflict.
RevLine 
[1706]1/*
[12350]2 * $Id: directories.h,v 1.16 1999-01-22 23:08:57 ghudson Exp $
[1706]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.
[4505]9 * For copying and distribution information, see the file "mit-copying.h."
[1706]10 */
11
[4505]12#include "mit-copying.h"
[1811]13
[1679]14typedef short Boolean;
15#define True                    (Boolean) 1
16#define False                   (Boolean) 0
17
[23661]18char *bytes_to_friendly(off_t);
[1732]19
[4630]20#define specs_to_space(x)       ((x).st_blocks)
21#define space_to_k(x)           ((x) / 2 + (((x) % 2) ? 1 : 0))
22#define specs_to_k(x)           space_to_k((x).st_blocks)
[23661]23#define space_to_friendly(x)    bytes_to_friendly((x))
24#define specs_to_friendly(x)    space_to_friendly((x).st_size)
[1732]25
26#define FOLLOW_LINKS            1
27#define DONT_FOLLOW_LINKS       0
[2180]28
29#define DIR_MATCH               1
30#define DIR_NO_MATCH            0
[4423]31
32typedef struct mystat {
33     dev_t st_dev;
34     ino_t st_ino;
35     unsigned short st_mode;
36     off_t st_size;
[23665]37     time_t st_ctim;
[4423]38     long st_blocks;
39} mystat;
40
[1732]41     
[1679]42typedef struct filrec {
43     char name[MAXNAMLEN];
44     struct filrec *previous;
45     struct filrec *parent;
46     struct filrec *dirs;
47     struct filrec *files;
48     struct filrec *next;
49     Boolean specified;
50     Boolean freed;
[4423]51     struct mystat specs;
[1679]52} filerec;
53
54
55
[2180]56int add_directory_to_parent();
57int add_file_to_parent();
58int add_path_to_tree();
59int find_child();
[23664]60int change_path();
[1684]61filerec *first_in_directory();
62filerec *first_specified_in_directory();
63filerec *get_cwd_tree();
64filerec *get_root_tree();
65filerec *next_directory();
66filerec *next_in_directory();
67filerec *next_leaf();
68filerec *next_specified_directory();
69filerec *next_specified_in_directory();
70filerec *next_specified_leaf();
71
[2180]72int get_leaf_path();
73int accumulate_names();
[2221]74
75void free_leaf();
Note: See TracBrowser for help on using the repository browser.