Lines Matching defs:ms
182 file_zmagic(struct magic_set *ms, int fd, const char *name,
190 int mime = ms->flags & MAGIC_MIME;
195 if ((ms->flags & MAGIC_COMPRESS) == 0)
216 urv = uncompressbuf(fd, ms->bytes_max, i, buf, &newbuf, &nsz);
223 ms->flags &= ~MAGIC_COMPRESS;
225 prv = file_printf(ms, "%s ERROR: %s",
228 prv = file_buffer(ms, -1, name, newbuf, nsz);
232 if ((ms->flags & MAGIC_COMPRESS_TRANSP) != 0)
236 if ((file_printf(ms,
239 if ((pb = file_push_buffer(ms)) == NULL)
245 if (file_buffer(ms, -1, NULL, buf, nbytes) == -1)
247 if ((rbuf = file_pop_buffer(ms, pb)) != NULL) {
248 if (file_printf(ms, "%s", rbuf) == -1) {
254 if (!mime && file_printf(ms, ")") == -1)
274 ms->flags |= MAGIC_COMPRESS;
373 file_pipe2file(struct magic_set *ms, int fd, const void *startbuf,
399 file_error(ms, errno,
414 file_error(ms, errno, "error copying from pipe to temp file");
419 file_error(ms, errno, "error while writing to temp file");
429 file_error(ms, errno, "could not dup descriptor for temp file");
434 file_badseek(ms);