1
0

initial commit

This commit is contained in:
2025-05-27 11:36:06 +03:00
commit 4ba42acfea
14 changed files with 1584 additions and 0 deletions

26
sort.hh Normal file
View 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 */