Changeset View
Changeset View
Standalone View
Standalone View
bin/ls/print.c
Show First 20 Lines • Show All 228 Lines • ▼ Show 20 Lines | if (f_inode) | ||||
(void)printf("%*ju ", | (void)printf("%*ju ", | ||||
dp->s_inode, (uintmax_t)sp->st_ino); | dp->s_inode, (uintmax_t)sp->st_ino); | ||||
if (f_size) | if (f_size) | ||||
(void)printf("%*jd ", | (void)printf("%*jd ", | ||||
dp->s_block, howmany(sp->st_blocks, blocksize)); | dp->s_block, howmany(sp->st_blocks, blocksize)); | ||||
strmode(sp->st_mode, buf); | strmode(sp->st_mode, buf); | ||||
aclmode(buf, p); | aclmode(buf, p); | ||||
np = p->fts_pointer; | np = p->fts_pointer; | ||||
(void)printf("%s %*ju %-*s %-*s ", buf, dp->s_nlink, | (void)printf("%s %*ju ", buf, dp->s_nlink, (uintmax_t)sp->st_nlink); | ||||
(uintmax_t)sp->st_nlink, dp->s_user, np->user, dp->s_group, | if (!f_sowner) | ||||
jrtc27: Adhere to the code style (repeated below) | |||||
Done Inline ActionsYou're missing a space after the comma jrtc27: You're missing a space after the comma | |||||
np->group); | (void)printf("%-*s ", dp->s_user, np->user); | ||||
if (!f_sgroup) | |||||
(void)printf("%-*s ", dp->s_group, np->group); | |||||
Done Inline ActionsThis is nonsense; keep the %*ju with both s_nlink and st_nlink as arguments jrtc27: This is nonsense; keep the `%*ju` with both s_nlink and st_nlink as arguments | |||||
Done Inline ActionsNothing in the new patch ever sets f_sgroup now, so I think you can remove that variable and make this printf unconditional? jhb: Nothing in the new patch ever sets f_sgroup now, so I think you can remove that variable and… | |||||
if (f_flags) | if (f_flags) | ||||
Done Inline ActionsI may be missing something (my C is very rusty), but I don't see where in the changed code f_flags is set to a true value. pauamma_gundo.com: I may be missing something (my C is very rusty), but I don't see where in the changed code… | |||||
Done Inline ActionsSolved by adding -O option minsoochoo0122_proton.me: Solved by adding -O option | |||||
(void)printf("%-*s ", dp->s_flags, np->flags); | (void)printf("%-*s ", dp->s_flags, np->flags); | ||||
if (f_label) | if (f_label) | ||||
(void)printf("%-*s ", dp->s_label, np->label); | (void)printf("%-*s ", dp->s_label, np->label); | ||||
if (S_ISCHR(sp->st_mode) || S_ISBLK(sp->st_mode)) | if (S_ISCHR(sp->st_mode) || S_ISBLK(sp->st_mode)) | ||||
printdev(dp->s_size, sp->st_rdev); | printdev(dp->s_size, sp->st_rdev); | ||||
else | else | ||||
printsize(dp->s_size, sp->st_size); | printsize(dp->s_size, sp->st_size); | ||||
if (f_accesstime) | if (f_accesstime) | ||||
▲ Show 20 Lines • Show All 590 Lines • Show Last 20 Lines |
Adhere to the code style (repeated below)