Lines Matching refs:st
476 ckmagic(register Magic_t* mp, const char* file, char* buf, struct stat* st, unsigned long off)
564 num = st->st_atime;
568 num = iblocks(st);
572 num = st->st_ctime;
576 p = fmtfs(st);
582 p = fmtgid(st->st_gid);
587 num = st->st_gid;
594 p = fmtmode(st->st_mode, 0);
599 num = modex(st->st_mode);
604 num = st->st_ctime;
619 num = st->st_nlink;
623 num = st->st_size;
629 p = fmtuid(st->st_uid);
634 num = st->st_uid;
819 t = ckmagic(mp, file, b + (b > buf), st, num);
1000 cklang(register Magic_t* mp, const char* file, char* buf, struct stat* st)
1061 if ((st->st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) || match(s, "/*bin*/*") || !access(s, F_OK))
1246 if ((st->st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) && (!suff || suff != strchr(suff, '.')))
1517 * return the basic magic string for file,st in buf,size
1521 type(register Magic_t* mp, const char* file, struct stat* st, char* buf, int size)
1527 if (!S_ISREG(st->st_mode))
1529 if (S_ISDIR(st->st_mode))
1534 if (S_ISLNK(st->st_mode))
1543 if (S_ISBLK(st->st_mode))
1546 sfsprintf(buf, PATH_MAX, T("block special (%s)"), fmtdev(st));
1549 if (S_ISCHR(st->st_mode))
1552 sfsprintf(buf, PATH_MAX, T("character special (%s)"), fmtdev(st));
1555 if (S_ISFIFO(st->st_mode))
1561 if (S_ISSOCK(st->st_mode))
1568 if (!(mp->fbmx = st->st_size))
1584 if (!(s = ckmagic(mp, file, buf, st, 0)))
1585 s = cklang(mp, file, buf, st);
2354 * return the magic string for file with optional stat info st
2358 magictype(register Magic_t* mp, Sfio_t* fp, const char* file, register struct stat* st)
2365 if (!st)
2371 s = type(mp, file, st, mp->tbuf, sizeof(mp->tbuf));
2376 if (S_ISREG(st->st_mode) && (st->st_size > 0) && (st->st_size < 128))
2379 if (!mp->fp && (st->st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)))
2380 sfprintf(mp->tmp, ", %s", S_ISDIR(st->st_mode) ? T("searchable") : T("executable"));
2381 if (st->st_mode & S_ISUID)
2382 sfprintf(mp->tmp, ", setuid=%s", fmtuid(st->st_uid));
2383 if (st->st_mode & S_ISGID)
2384 sfprintf(mp->tmp, ", setgid=%s", fmtgid(st->st_gid));
2385 if (st->st_mode & S_ISVTX)