-
Notifications
You must be signed in to change notification settings - Fork 0
/
dir.h
67 lines (62 loc) · 2.54 KB
/
dir.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include <sys/param.h>
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024 /* max length of directory name */
#endif
#define PATSZ 20 /* max length of pattern */
#define SORTNAME 1 /* sort by name */
#define SORTEXT 2 /* sort by extension */
#define SORTTIME 3 /* sort by time */
#define SORTSIZE 4 /* sort by size */
#define SORTSKIP 5 /* unsorted */
#ifdef SHORTNAMES
# define NAMESZ 15
#else
# define NAMESZ 512
#endif
struct file {
char name [NAMESZ]; /* file name */
char *info; /* file info */
char *rinfo; /* file info in russian */
unsigned execable:1; /* file is executable for me */
unsigned tag:1; /* file tagged */
unsigned link:1; /* symbolic link */
unsigned infoflag:1; /* info is read */
unsigned dateflag:1; /* date is read from info file */
unsigned long size; /* file size */
unsigned short mode; /* access mode */
unsigned short uid; /* user ident */
unsigned short gid; /* group ident */
unsigned short nlink; /* number of file links */
short dev; /* device */
short rdev; /* special file parameters */
unsigned long ino; /* i-node */
unsigned long mtime; /* modification time */
unsigned long atime; /* access time */
unsigned long ctime; /* status change time */
unsigned long infodate; /* date from info file */
};
struct dir {
char cwd [MAXPATHLEN]; /* directory full name */
char *shortcwd; /* short printable directory name */
short dev; /* device */
unsigned long ino; /* i-node */
struct file *cat; /* catalog */
int catsz; /* length of catalog */
int num; /* number of files in cat */
int topfile; /* top file in the window */
int curfile; /* current file */
char view; /* view format */
char status; /* is it status window */
char sort; /* sort kind */
char typesort; /* sort by file types */
char revsort; /* reverse sorting */
char alignext; /* align extensions */
int basecol; /* base of window */
int nfiles; /* number of regular files */
long nbytes; /* number of bytes used */
int mfiles; /* number of matched files */
long mbytes; /* number of bytes matched */
int tfiles; /* number of tagged files */
long tbytes; /* number of bytes tagged */
char pattern [PATSZ]; /* pattern for file names */
};