don't comment empty lines
[unix-history] / usr / src / usr.sbin / mtree / mtree.h
CommitLineData
cbe4b98c
KB
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
9dedc618
KB
3 * All rights reserved.
4 *
cbe4b98c 5 * %sccs.include.redist.c%
9dedc618 6 *
6e4c29b1 7 * @(#)mtree.h 5.5 (Berkeley) %G%
9dedc618
KB
8 */
9
cbe4b98c
KB
10#include <string.h>
11#include <stdlib.h>
12
6e4c29b1
KB
13typedef struct _node {
14 struct _node *parent, *child; /* up, down */
15 struct _node *prev, *next; /* left, right */
16 off_t st_size; /* size */
17 u_long cksum; /* check sum */
18 char *slink; /* symbolic link reference */
19 uid_t st_uid; /* owner */
20 gid_t st_gid; /* group */
21#define MBITS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO)
22 mode_t st_mode; /* mode */
23 nlink_t st_nlink; /* link count */
24
9dedc618
KB
25#define F_BLOCK 0x001 /* block special */
26#define F_CHAR 0x002 /* char special */
27#define F_DIR 0x004 /* directory */
28#define F_FILE 0x008 /* regular file */
29#define F_LINK 0x010 /* symbolic link */
30#define F_SOCK 0x020 /* socket */
bff504a2
KB
31 u_short type; /* file type */
32
33#define F_CKSUM 0x001 /* check sum */
6e4c29b1
KB
34#define F_DONE 0x002 /* directory done */
35#define F_GROUP 0x004 /* group */
36#define F_IGN 0x008 /* ignore */
37#define F_MAGIC 0x010 /* name has magic chars */
38#define F_MODE 0x020 /* mode */
39#define F_NLINK 0x040 /* number of links */
40#define F_OWNER 0x080 /* owner */
41#define F_SIZE 0x100 /* size */
42#define F_SLINK 0x200 /* link count */
43#define F_TYPE 0x400 /* file type */
44#define F_VISIT 0x800 /* file visited */
bff504a2 45 u_short flags; /* items set */
9dedc618 46
7e5e86d9 47 char name[1]; /* file name (must be last) */
6e4c29b1 48} NODE;
bff504a2
KB
49
50#define RP(p) (p->fts_path + 2)