3 <GDECL (BUFLEN SBUFLEN) FIX>
6 ; "ARGS TO INTERNAL TIMER CALLS"
8 <MSETG ITIMER-VIRTUAL 1>
11 <MSETG ITIMER-INTERVAL 1>
12 <MSETG ITIMER-VALUE 2>
17 ; "SPECIAL FILE DESCRIPTORS"
24 <MSETG O-RDONLY 0> ; "Read, no write"
25 <MSETG O-WRONLY 1> ; "Write, no read (never used)"
26 <MSETG O-RDWR 2> ; "Read/write"
27 <MSETG O-NDELAY 4> ; "Never block on open"
28 <MSETG O-APPEND *10*> ; "Append on each write"
30 <MSETG O-CREAT *400*> ; "Create if file doesn't exist"
31 <MSETG O-TRUNC *1000*> ; "Truncate size to 0"
32 <MSETG O-EXCL *2000*> ; "Error if create and file exists"
37 <MSETG FM-SET-UID *4000*>
38 <MSETG FM-SET-GID *2000*>
39 <MSETG FM-SAVE *1000*>
40 <MSETG FM-OWN-READ *400*>
41 <MSETG FM-OWN-WRITE *200*>
42 <MSETG FM-OWN-XCT *100*>
43 <MSETG FM-GRP-READ *40*>
44 <MSETG FM-GRP-WRITE *20*>
45 <MSETG FM-GRP-XCT *10*>
46 <MSETG FM-OTHER-READ *4*>
47 <MSETG FM-OTHER-WRITE *2*>
48 <MSETG FM-OTHER-XCT *1*>
58 ; "LSH BY THIS AMOUNT TO GET TO OWNER FIELD"
61 <MSETG FM-OTHER-OFFS 0>
71 <MSETG WHENCE-OFFSET 1>
74 ; "If STAT into a string, offsets of critical things"
77 <MSETG MAJOR-DEV-OFFS 1>
78 <MSETG MAJOR-DEV-SIZE 1>
79 <MSETG MINOR-DEV-OFFS 2>
80 <MSETG MINOR-DEV-SIZE 1>
81 <MSETG INODE-OFFS 3> ; "2 bytes"
83 <MSETG MODE-OFFS 5> ; "2 bytes"
93 <MSETG SIZE-OFFS 15> ; "4 bytes long"
95 <MSETG ATIME-OFFS 19> ; "4 bytes"
101 <MSETG CTIME-OFFS 35>
103 <MSETG STAT-LEN 58> ; "Length of needed string"
105 ; "Interpretation of mode field"
106 <MSETG FMT-MASK *170000*> ; "Andb with this to get file mode"
107 <MSETG FMT-IFDIR *40000*> ; "Directory"
108 <MSETG FMT-IFCHR *20000*> ; "Character special"
109 <MSETG FMT-IFBLK *60000*> ; "block special"
110 <MSETG FMT-IFIFO *10000*> ; "fifo (pipe)"
111 <MSETG FMT-IFREG *100000*> ; "regular"
112 <MSETG FMT-IFLNK *120000*> ; "Symbolic link"
114 ; "Rest of mode field goes by chmod bits"
116 ; "Code is computed from device type, major device, and device ID (only
118 <MSETG DEV-CONSOLE <CHTYPE <ORB ,FMT-IFCHR 7> FIX>>
119 <MSETG DEV-FLOPPY <CHTYPE <ORB ,FMT-IFCHR 5> FIX>>
120 <MSETG DEV-DISK <CHTYPE <ORB ,FMT-IFREG 24> FIX>> "???"
121 <MSETG DEV-DIR <CHTYPE <ORB ,FMT-IFDIR 24> FIX>>
122 <MSETG DEV-NFS <CHTYPE <ORB ,FMT-IFREG 255> FIX>>
123 <MSETG DEV-NFS-DIR <CHTYPE <ORB ,FMT-IFDIR 255> FIX>>
124 <MSETG DISK-MIN-ID 24>
125 <MSETG DISK-MAX-ID 30>
126 <MSETG DEV-MEM <CHTYPE <ORB ,FMT-IFCHR 2> FIX>>
127 <MSETG DEV-NULL <CHTYPE <ORB ,FMT-IFCHR 2 <LSH 2 16>> FIX>>
128 <MSETG DEV-PTY <CHTYPE <ORB ,FMT-IFCHR 20> FIX>>
129 <MSETG DEV-TTY <CHTYPE <ORB ,FMT-IFCHR 1> FIX>>
130 <MSETG DEV-TTYN <CHTYPE <ORB ,FMT-IFCHR 0> FIX>>
131 <MSETG DEV-TTYP <CHTYPE <ORB ,FMT-IFCHR 21> FIX>>
135 <MSETG STATUS-RENAME 2>
136 <MSETG STATUS-NO-FLUSH 4>
137 <MSETG STATUS-WRITE 8>
138 <MSETG STATUS-READ 16>
139 <MSETG STATUS-RACC 32>
140 ; "BYTE SIZE GOES IN LH"
145 <MSETG DIRBLKSIZ 1024>
146 <MSETG MAXNAMLEN 255>
147 ; "Offsets into DIRECT structure, as used by getdirentries call"
148 <MSETG INODE-START 1>
150 <MSETG RECLEN-START 5>
152 <MSETG NAMLEN-START 7>
156 <DEFMAC MSTAT-FIELD ('STR OFFS:FIX SIZE:FIX "AUX" MAIN ST)
157 <COND (<AND <G? .SIZE 1>
158 <OR <TYPE? .STR FORM>
159 <AND <TYPE? .STR ADECL>
160 <TYPE? <1 .STR> FORM>>>>
165 <SET ST <CHTYPE [.STR STRING] ADECL>>)>
171 <FORM LSH <FORM NTH .ST .OFFS> 24>
172 <FORM LSH <FORM NTH .ST <+ .OFFS 1>> 16>
173 <FORM LSH <FORM NTH .ST <+ .OFFS 2>> 8>
174 <FORM NTH .ST <+ .OFFS 3>>>)
178 <FORM LSH <FORM NTH .ST <+ .OFFS 1>> 8>
179 <FORM LSH <FORM NTH .ST <+ .OFFS 2>> 16>
180 <FORM LSH <FORM NTH .ST <+ .OFFS 3>> 24>>)>)
185 <FORM LSH <FORM NTH .ST .OFFS> 8>
186 <FORM NTH .ST <+ .OFFS 1>>>)
190 <FORM LSH <FORM NTH .ST <+ .OFFS 1>> 8>>)>)
192 <FORM CHTYPE <FORM NTH .ST .OFFS> FIX>)>>
193 <COND (<AND <TYPE? .STR FORM>
195 <FORM BIND ((MYSTR .STR))
196 #DECL ((MYSTR) STRING)