|
|
1.1 root 1: /*
2: * definitions for the server half of the face server
3: */
4:
5: /*
6: * internal file
7: * for a regular file,
8: * data is the name of the external file containing the image
9: * for a directory,
10: * data is the stuff to return on a read
11: * dir is the real (internal) directory:
12: * there are nfiles entries;
13: * room for nalloc entries.
14: */
15:
16: typedef struct {
17: int ino; /* i-number for stat */
18: long ta, tm, tc; /* times, for stat */
19: long size; /* file size, for stat and read */
20: int nlinks; /* internal reference count */
21: char *data;
22: short nalloc; /* how much space in dir */
23: short nfiles; /* how much used in dir */
24: struct Dirent *dir; /* directory contents */
25: } File;
26:
27: #define isdir(f) ((f)->dir != 0)
28:
29: /*
30: * internal directory entry
31: */
32:
33: #define DIRNSIZE 20
34:
35: typedef struct Dirent {
36: char name[DIRNSIZE];
37: File *file;
38: } Dirent;
39:
40: File *newfile(), *lookfile(), *lookent(), *enterfile();
41: char *emalloc(), *erealloc();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.