version 1.205, 2020/12/04 02:41:10 |
version 1.206, 2021/01/08 02:44:14 |
|
|
#define NCMP(a,b) (a == b ? 0 : (a < b ? 1 : -1)) |
#define NCMP(a,b) (a == b ? 0 : (a < b ? 1 : -1)) |
if (sort_flag & LS_NAME_SORT) |
if (sort_flag & LS_NAME_SORT) |
return (rmul * strcmp(ap, bp)); |
return (rmul * strcmp(ap, bp)); |
else if (sort_flag & LS_TIME_SORT) |
else if (sort_flag & LS_TIME_SORT) { |
return (rmul * timespeccmp(&as->st_mtim, &bs->st_mtim, <)); |
if (timespeccmp(&as->st_mtim, &bs->st_mtim, ==)) |
else if (sort_flag & LS_SIZE_SORT) |
return 0; |
|
return timespeccmp(&as->st_mtim, &bs->st_mtim, <) ? |
|
rmul : -rmul; |
|
} else if (sort_flag & LS_SIZE_SORT) |
return (rmul * NCMP(as->st_size, bs->st_size)); |
return (rmul * NCMP(as->st_size, bs->st_size)); |
|
|
fatal("Unknown ls sort type"); |
fatal("Unknown ls sort type"); |