initial commit
This commit is contained in:
26
sort.hh
Normal file
26
sort.hh
Normal file
@@ -0,0 +1,26 @@
|
||||
/* 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 */
|
Reference in New Issue
Block a user