Lines Matching defs:st
107 static char endtype(struct stat *st)
109 mode_t mode = st->st_mode;
135 struct stat *st = &(dt->st);
140 if (endtype(st)) ++*len;
143 len[1] = (flags & FLAG_i) ? numlen(st->st_ino) : 0;
147 len[2] = numlen(st->st_nlink);
148 len[3] = fn ? numlen(st->st_uid) : strwidth(getusername(st->st_uid));
149 len[4] = fn ? numlen(st->st_gid) : strwidth(getgroupname(st->st_gid));
150 if (S_ISBLK(st->st_mode) || S_ISCHR(st->st_mode)) {
153 len[5] = numlen(dev_major(st->st_rdev))+5;
154 } else len[5] = print_with_h(tmp, st->st_size, 1);
157 len[6] = (flags & FLAG_s) ? print_with_h(tmp, st->st_blocks, 512) : 0;
168 if (dta->st.st_size > dtb->st.st_size) ret = -1;
169 else if (dta->st.st_size < dtb->st.st_size) ret = 1;
172 if (dta->st.st_mtime > dtb->st.st_mtime) ret = -1;
173 else if (dta->st.st_mtime < dtb->st.st_mtime) ret = 1;
220 if (flags & FLAG_u) new->st.st_mtime = new->st.st_atime;
221 if (flags & FLAG_c) new->st.st_mtime = new->st.st_ctime;
222 new->st.st_blocks >>= 1;
311 if (dt && S_ISDIR(dt->st.st_mode) && !dt->next && !(flags&(FLAG_d|FLAG_R)))
354 blocks += sort[ul]->st.st_blocks;
398 struct stat *st = &(sort[next]->st);
399 mode_t mode = st->st_mode;
400 char et = endtype(st), *ss;
424 if (flags & FLAG_i) printf("%*lu ", totals[1], (unsigned long)st->st_ino);
427 print_with_h(tmp, st->st_blocks, 512);
434 // (long) is to coerce the st types into something we know we can print.
436 printf("%s% *ld", tmp, totals[2]+1, (long)st->st_nlink);
442 if (flags&FLAG_n) printf("%*u", ii, (unsigned)st->st_uid);
443 else draw_trim_esc(getusername(st->st_uid), ii, abs(ii), TT.escmore,
451 if (flags&FLAG_n) printf("%*u", ii, (unsigned)st->st_gid);
452 else draw_trim_esc(getgroupname(st->st_gid), ii, abs(ii), TT.escmore,
460 if (S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode))
461 printf("% *d,% 4d", totals[5]-4, dev_major(st->st_rdev),
462 dev_minor(st->st_rdev));
464 print_with_h(tmp, st->st_size, 1);
469 tm = localtime(&(st->st_mtime));
474 s += sprintf(s, ":%02d.%09d ", tm->tm_sec, (int)st->st_mtim.tv_nsec);
482 color = color_from_mode(st->st_mode);
519 if ((flags & FLAG_d) || !S_ISDIR(sort[ul]->st.st_mode)) continue;