Home | History | Annotate | Download | only in xdgmime

Lines Matching full:magic_file

162 _xdg_mime_magic_read_to_newline (FILE *magic_file,
176 c = getc_unlocked (magic_file);
199 _xdg_mime_magic_read_a_number (FILE *magic_file,
211 c = getc_unlocked (magic_file);
220 ungetc (c, magic_file);
245 _xdg_mime_magic_parse_header (FILE *magic_file, XdgMimeMagicMatch *match)
252 assert (magic_file != NULL);
255 c = getc_unlocked (magic_file);
261 match->priority = _xdg_mime_magic_read_a_number (magic_file, &end_of_file);
267 c = getc_unlocked (magic_file);
273 buffer = (char *)_xdg_mime_magic_read_to_newline (magic_file, &end_of_file);
294 _xdg_mime_magic_parse_error (FILE *magic_file)
300 c = getc_unlocked (magic_file);
313 _xdg_mime_magic_parse_magic_line (FILE *magic_file,
322 assert (magic_file != NULL);
325 c = getc_unlocked (magic_file);
330 ungetc (c, magic_file);
340 ungetc (c, magic_file);
341 indent = _xdg_mime_magic_read_a_number (magic_file, &end_of_file);
346 c = getc_unlocked (magic_file);
356 matchlet->offset = _xdg_mime_magic_read_a_number (magic_file, &end_of_file);
367 c = getc_unlocked (magic_file);
381 c = getc_unlocked (magic_file);
390 c = getc_unlocked (magic_file);
406 bytes_read = fread (matchlet->value, 1, matchlet->value_length, magic_file);
410 if (feof (magic_file))
416 c = getc_unlocked (magic_file);
426 bytes_read = fread (matchlet->mask, 1, matchlet->value_length, magic_file);
430 if (feof (magic_file))
435 c = getc_unlocked (magic_file);
440 matchlet->word_size = _xdg_mime_magic_read_a_number (magic_file, &end_of_file);
454 c = getc_unlocked (magic_file);
459 matchlet->range_length = _xdg_mime_magic_read_a_number (magic_file, &end_of_file);
470 c = getc_unlocked (magic_file);
754 FILE *magic_file)
767 state = _xdg_mime_magic_parse_header (magic_file, match);
772 state = _xdg_mime_magic_parse_magic_line (magic_file, match);
783 state = _xdg_mime_magic_parse_error (magic_file);
798 FILE *magic_file;
801 magic_file = fopen (file_name, "r");
803 if (magic_file == NULL)
806 if (fread (header, 1, 12, magic_file) == 12)
809 _xdg_mime_magic_read_magic_file (mime_magic, magic_file);
812 fclose (magic_file);