Lines Matching defs:header
130 struct header header;
150 read(fd, &header, sizeof (header));
153 header.magic = swap(header.magic);
154 header.name_size = swap(header.name_size);
155 header.bool_count = swap(header.bool_count);
156 header.num_count = swap(header.num_count);
157 header.str_count = swap(header.str_count);
158 header.str_size = swap(header.str_size);
161 if (header.magic != MAGIC) {
166 read(fd, TermNames, min(127, header.name_size));
168 if (header.name_size > 127)
169 lseek(fd, (long)(header.name_size - 127), 1);
174 read(fd, UB, min(BoolCount, header.bool_count));
175 if (header.bool_count > BoolCount)
176 lseek(fd, (long)(header.bool_count - BoolCount), 1);
178 for (i = header.bool_count; i < BoolCount; i++)
181 if ((header.name_size + header.bool_count) % 2 != 0)
185 read(fd, (char *)UN, min(NumCount, header.num_count) * 2);
187 for (i = 0; i < min(header.num_count, NumCount); i++) {
202 if (header.num_count > NumCount)
203 lseek(fd, (long)(2 * (header.num_count - NumCount)), 1);
205 for (i = header.num_count; i < NumCount; i++)
210 pst = malloc((unsigned)header.str_size);
220 num_strings = min(StrCount, header.str_count);
265 if (header.str_count > StrCount)
266 lseek(fd, (long)(2 * (header.str_count - StrCount)), 1);
267 else for (i = header.str_count; i < StrCount; i++)
270 numread = read(fd, pst, header.str_size);
272 if (numread != header.str_size)