+ column += 5;
+ break;
+ case LIST_MODEBITS:
+ printf("%-10s ", (char *)mode_string(dn->dstat.st_mode));
+ column += 10;
+ break;
+ case LIST_NLINKS:
+ printf("%4ld ", (long)dn->dstat.st_nlink);
+ column += 10;
+ break;
+ case LIST_ID_NAME:
+#ifdef BB_FEATURE_LS_USERNAME
+ my_getpwuid(scratch, dn->dstat.st_uid);
+ printf("%-8.8s ", scratch);
+ my_getgrgid(scratch, dn->dstat.st_gid);
+ printf("%-8.8s", scratch);
+ column += 17;
+ break;
+#endif
+ case LIST_ID_NUMERIC:
+ printf("%-8d %-8d", dn->dstat.st_uid, dn->dstat.st_gid);
+ column += 17;
+ break;
+ case LIST_SIZE:
+ case LIST_DEV:
+ if (S_ISBLK(dn->dstat.st_mode) || S_ISCHR(dn->dstat.st_mode)) {
+ printf("%4d, %3d ", (int)MAJOR(dn->dstat.st_rdev), (int)MINOR(dn->dstat.st_rdev));
+ } else {
+#ifdef BB_FEATURE_HUMAN_READABLE
+ if (ls_disp_hr==TRUE) {
+ fprintf(stdout, "%8s ", make_human_readable_str(dn->dstat.st_size, 1, 0));
+ } else
+#endif
+ {
+#if _FILE_OFFSET_BITS == 64
+ printf("%9lld ", (long long)dn->dstat.st_size);
+#else
+ printf("%9ld ", dn->dstat.st_size);
+#endif
+ }
+ }
+ column += 10;
+ break;
+#ifdef BB_FEATURE_LS_TIMESTAMPS
+ case LIST_FULLTIME:
+ case LIST_DATE_TIME:
+ if (list_fmt & LIST_FULLTIME) {
+ printf("%24.24s ", filetime);
+ column += 25;
+ break;
+ }
+ age = time(NULL) - ttime;
+ printf("%6.6s ", filetime+4);
+ if (age < 3600L * 24 * 365 / 2 && age > -15 * 60) {
+ /* hh:mm if less than 6 months old */
+ printf("%5.5s ", filetime+11);
+ } else {
+ printf(" %4.4s ", filetime+20);
+ }
+ column += 13;
+ break;
+#endif
+ case LIST_FILENAME:
+ printf("%s", dn->name);
+ column += strlen(dn->name);
+ break;
+ case LIST_SYMLINK:
+ if (S_ISLNK(dn->dstat.st_mode)) {
+ char *lpath = xreadlink(dn->fullname);
+ if (lpath) {
+ printf(" -> %s", lpath);
+#ifdef BB_FEATURE_LS_FILETYPES
+ if (!stat(dn->fullname, &info)) {
+ append = append_char(info.st_mode);
+ }
+#endif
+ column += strlen(lpath) + 4;
+ free(lpath);
+ }
+ }
+ break;
+#ifdef BB_FEATURE_LS_FILETYPES
+ case LIST_FILETYPE:
+ if (append != '\0') {
+ printf("%1c", append);
+ column++;
+ }
+ break;
+#endif
+ }
+ }