Lines Matching refs:buffer
83 char *buffer;
104 munmap (cache->buffer, cache->size);
118 char *buffer = NULL;
129 buffer = (char *) mmap (NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
131 if (buffer == MAP_FAILED)
135 if (GET_UINT16 (buffer, 0) != MAJOR_VERSION ||
136 GET_UINT16 (buffer, 2) != MINOR_VERSION)
138 munmap (buffer, st.st_size);
145 cache->buffer = buffer;
163 xdg_uint32_t range_start = GET_UINT32 (cache->buffer, offset);
164 xdg_uint32_t range_length = GET_UINT32 (cache->buffer, offset + 4);
165 xdg_uint32_t data_length = GET_UINT32 (cache->buffer, offset + 12);
166 xdg_uint32_t data_offset = GET_UINT32 (cache->buffer, offset + 16);
167 xdg_uint32_t mask_offset = GET_UINT32 (cache->buffer, offset + 20);
182 if ((((unsigned char *)cache->buffer)[data_offset + j] & ((unsigned char *)cache->buffer)[mask_offset + j]) !=
183 ((((unsigned char *) data)[j + i]) & ((unsigned char *)cache->buffer)[mask_offset + j]))
194 if (((unsigned char *)cache->buffer)[data_offset + j] != ((unsigned char *) data)[j + i])
215 xdg_uint32_t n_children = GET_UINT32 (cache->buffer, offset + 24);
216 xdg_uint32_t child_offset = GET_UINT32 (cache->buffer, offset + 28);
243 xdg_uint32_t priority = GET_UINT32 (cache->buffer, offset);
244 xdg_uint32_t mimetype_offset = GET_UINT32 (cache->buffer, offset + 4);
245 xdg_uint32_t n_matchlets = GET_UINT32 (cache->buffer, offset + 8);
246 xdg_uint32_t matchlet_offset = GET_UINT32 (cache->buffer, offset + 12);
257 return cache->buffer + mimetype_offset;
280 list_offset = GET_UINT32 (cache->buffer, 24);
281 n_entries = GET_UINT32 (cache->buffer, list_offset);
282 offset = GET_UINT32 (cache->buffer, list_offset + 8);
297 mimetype_offset = GET_UINT32 (cache->buffer, offset + 16 * j + 4);
298 non_match = cache->buffer + mimetype_offset;
321 xdg_uint32_t list_offset = GET_UINT32 (cache->buffer, 4);
322 xdg_uint32_t n_entries = GET_UINT32 (cache->buffer, list_offset);
331 offset = GET_UINT32 (cache->buffer, list_offset + 4 + 8 * mid);
332 ptr = cache->buffer + offset;
341 offset = GET_UINT32 (cache->buffer, list_offset + 4 + 8 * mid + 4);
342 return cache->buffer + offset;
366 xdg_uint32_t list_offset = GET_UINT32 (cache->buffer, 12);
367 xdg_uint32_t n_entries = GET_UINT32 (cache->buffer, list_offset);
376 offset = GET_UINT32 (cache->buffer, list_offset + 4 + 12 * mid);
377 ptr = cache->buffer + offset;
386 offset = GET_UINT32 (cache->buffer, list_offset + 4 + 12 * mid + 4);
387 mime_types[0] = (const char *)(cache->buffer + offset);
412 xdg_uint32_t list_offset = GET_UINT32 (cache->buffer, 20);
413 xdg_uint32_t n_entries = GET_UINT32 (cache->buffer, list_offset);
417 xdg_uint32_t offset = GET_UINT32 (cache->buffer, list_offset + 4 + 12 * j);
418 xdg_uint32_t mimetype_offset = GET_UINT32 (cache->buffer, list_offset + 4 + 12 * j + 4);
419 int weight = GET_UINT32 (cache->buffer, list_offset + 4 + 12 * j + 8);
420 ptr = cache->buffer + offset;
421 mime_type = cache->buffer + mimetype_offset;
469 match_char = GET_UINT32 (cache->buffer, offset + 12 * mid);
478 n_children = GET_UINT32 (cache->buffer, offset + 12 * mid + 4);
479 child_offset = GET_UINT32 (cache->buffer, offset + 12 * mid + 8);
495 match_char = GET_UINT32 (cache->buffer, child_offset + 12 * i);
499 mimetype_offset = GET_UINT32 (cache->buffer, child_offset + 12 * i + 4);
500 weight = GET_UINT32 (cache->buffer, child_offset + 12 * i + 8);
502 mime_types[n].mime = cache->buffer + mimetype_offset;
527 xdg_uint32_t list_offset = GET_UINT32 (cache->buffer, 16);
528 xdg_uint32_t n_entries = GET_UINT32 (cache->buffer, list_offset);
529 xdg_uint32_t offset = GET_UINT32 (cache->buffer, list_offset + 4);
603 offset = GET_UINT32 (cache->buffer, 24);
604 max_extent = MAX (max_extent, GET_UINT32 (cache->buffer, offset + 4));
803 xdg_uint32_t list_offset = GET_UINT32 (cache->buffer, 8);
804 xdg_uint32_t n_entries = GET_UINT32 (cache->buffer, list_offset);
813 offset = GET_UINT32 (cache->buffer, list_offset + 4 + 8 * med);
814 cmp = strcmp (cache->buffer + offset, umime);
821 offset = GET_UINT32 (cache->buffer, list_offset + 4 + 8 * med + 4);
822 n_parents = GET_UINT32 (cache->buffer, offset);
826 parent_offset = GET_UINT32 (cache->buffer, offset + 4 + 4 * j);
827 if (_xdg_mime_cache_mime_type_subclass (cache->buffer + parent_offset, ubase))
866 xdg_uint32_t list_offset = GET_UINT32 (cache->buffer, 8);
867 xdg_uint32_t n_entries = GET_UINT32 (cache->buffer, list_offset);
871 xdg_uint32_t mimetype_offset = GET_UINT32 (cache->buffer, list_offset + 4 + 8 * j);
872 xdg_uint32_t parents_offset = GET_UINT32 (cache->buffer, list_offset + 4 + 8 * j + 4);
874 if (strcmp (cache->buffer + mimetype_offset, mime) == 0)
877 xdg_uint32_t n_parents = GET_UINT32 (cache->buffer, parents_offset);
881 parent_mime_offset = GET_UINT32 (cache->buffer, parents_offset + 4 + 4 * k);
888 if (strcmp (all_parents[l], cache->buffer + parent_mime_offset) == 0)
893 all_parents[p++] = cache->buffer + parent_mime_offset;
917 xdg_uint32_t list_offset = GET_UINT32 (cache->buffer, header);
918 xdg_uint32_t n_entries = GET_UINT32 (cache->buffer, list_offset);
927 offset = GET_UINT32 (cache->buffer, list_offset + 4 + 8 * mid);
928 ptr = cache->buffer + offset;
937 offset = GET_UINT32 (cache->buffer, list_offset + 4 + 8 * mid + 4);
938 return cache->buffer + offset;
969 character = GET_UINT32 (cache->buffer, offset);
970 mime_offset = GET_UINT32 (cache->buffer, offset + 4);
971 n_children = GET_UINT32 (cache->buffer, offset + 8);
972 child_offset = GET_UINT32 (cache->buffer, offset + 12);
977 printf (" - %s", cache->buffer + mime_offset);
996 list_offset = GET_UINT32 (cache->buffer, 16);
997 n_entries = GET_UINT32 (cache->buffer, list_offset);
998 offset = GET_UINT32 (cache->buffer, list_offset + 4);