1
0
Files
overlaydirs/sort.hh
2025-05-27 11:36:06 +03:00

27 lines
549 B
C++

/* SPDX-License-Identifier: Apache-2.0
* (c) 2025, Konstantin Demin
*/
#ifndef INCLUDE_SORT_MODE_HH
#define INCLUDE_SORT_MODE_HH 1
enum struct sort_mode : unsigned int {
// don't sort entries at all
none = 0,
// sort entries using version sort from coreutils
coreutils_version_sort,
// sort entries using version sort from glibc
glibc_version_sort,
// simpliest sort via strcmp()
simple_sort,
_default = coreutils_version_sort,
};
int custom_sort(const char * a, const char * b, sort_mode mode);
#endif /* INCLUDE_SORT_MODE_HH */