+ switch (st.st_mode & S_IFMT) {
+ case S_IFLNK:
+ case S_IFREG:
+ printf("-");
+ break;
+ case S_IFDIR:
+ printf("d");
+ break;
+ case S_IFCHR:
+ printf("c");
+ break;
+ case S_IFBLK:
+ printf("b");
+ break;
+ }
+ printf("%c%c%c",
+ "-r"[!!(st.st_mode & S_IRUSR)],
+ "-w"[!!(st.st_mode & S_IWUSR)],
+ "-x"[!!(st.st_mode & S_IXUSR)]
+ );
+ printf("%c%c%c",
+ "-r"[!!(st.st_mode & S_IRGRP)],
+ "-w"[!!(st.st_mode & S_IWGRP)],
+ "-x"[!!(st.st_mode & S_IXGRP)]
+ );
+ printf("%c%c%c",
+ "-r"[!!(st.st_mode & S_IROTH)],
+ "-w"[!!(st.st_mode & S_IWOTH)],
+ "-x"[!!(st.st_mode & S_IXOTH)]
+ );
+ printf(" %2d", st.st_nlink);
+ printf(" %5d", st.st_uid);
+ printf(" %5d", st.st_gid);
+ printf(" %12" PRId64, st.st_size);