MCPcopy Create free account
hub / github.com/coreutils/coreutils / dirfirst_check

Function dirfirst_check

src/ls.c:3755–3761  ·  view source on GitHub ↗

Used below in DEFINE_SORT_FUNCTIONS for _df_ sort function variants. */

Source from the content-addressed store, hash-verified

3753
3754/* Used below in DEFINE_SORT_FUNCTIONS for _df_ sort function variants. */
3755static int
3756dirfirst_check (struct fileinfo const *a, struct fileinfo const *b,
3757 int (*cmp) (V, V))
3758{
3759 int diff = is_linked_directory (b) - is_linked_directory (a);
3760 return diff ? diff : cmp (a, b);
3761}
3762
3763/* Define the 8 different sort function variants required for each sortkey.
3764 KEY_NAME is a token describing the sort key, e.g., ctime, atime, size.

Callers 2

xstrcoll_df_versionFunction · 0.85
rev_xstrcoll_df_versionFunction · 0.85

Calls 2

is_linked_directoryFunction · 0.85
cmpFunction · 0.85

Tested by

no test coverage detected