|
|
1.1 root 1: /*-
2: * Copyright (c) 1990 The Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution and use in source and binary forms are permitted provided
6: * that: (1) source distributions retain this entire copyright notice and
7: * comment, and (2) distributions including binaries display the following
8: * acknowledgement: ``This product includes software developed by the
9: * University of California, Berkeley and its contributors'' in the
10: * documentation or other materials provided with the distribution and in
11: * all advertising materials mentioning features or use of this software.
12: * Neither the name of the University nor the names of its contributors may
13: * be used to endorse or promote products derived from this software without
14: * specific prior written permission.
15: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
16: * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
17: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18: *
19: * @(#)mtree.h 5.7 (Berkeley) 5/25/90
20: */
21:
22: #include <string.h>
23: #include <stdlib.h>
24:
25: typedef struct _node {
26: struct _node *parent, *child; /* up, down */
27: struct _node *prev, *next; /* left, right */
28: off_t st_size; /* size */
29: time_t st_mtime; /* last modification time */
30: u_long cksum; /* check sum */
31: char *slink; /* symbolic link reference */
32: uid_t st_uid; /* owner */
33: gid_t st_gid; /* group */
34: #define MBITS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO)
35: mode_t st_mode; /* mode */
36: nlink_t st_nlink; /* link count */
37:
38: #define F_BLOCK 0x001 /* block special */
39: #define F_CHAR 0x002 /* char special */
40: #define F_DIR 0x004 /* directory */
41: #define F_FIFO 0x008 /* fifo */
42: #define F_FILE 0x010 /* regular file */
43: #define F_LINK 0x020 /* symbolic link */
44: #define F_SOCK 0x040 /* socket */
45: u_short type; /* file type */
46:
47: #define F_CKSUM 0x0001 /* check sum */
48: #define F_DONE 0x0002 /* directory done */
49: #define F_GROUP 0x0004 /* group */
50: #define F_IGN 0x0008 /* ignore */
51: #define F_MAGIC 0x0010 /* name has magic chars */
52: #define F_MODE 0x0020 /* mode */
53: #define F_NLINK 0x0040 /* number of links */
54: #define F_OWNER 0x0080 /* owner */
55: #define F_SIZE 0x0100 /* size */
56: #define F_SLINK 0x0200 /* link count */
57: #define F_TIME 0x0400 /* modification time */
58: #define F_TYPE 0x0800 /* file type */
59: #define F_VISIT 0x1000 /* file visited */
60: u_short flags; /* items set */
61:
62: char name[1]; /* file name (must be last) */
63: } NODE;
64:
65: #define RP(p) (p->fts_path + 2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.