Registry / utility / swenson-sort

swenson-sort

JSON →
library2021-05-22vcpkgunverified

sort.h is an implementation of a ton of sorting algorithms in C with a user-defined type that is provided at include time.

vcpkg install swenson-sort
INSTALL
IMPORT
SIG · SWENSON-SORT
S
swenson-sort
utilitycppv2021-05-22
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sort.h
#include <sort.h>

Sort an integer array using SORT_INT macro

#include <sort.h> #include <stdio.h> int main() { int arr[] = {3, 1, 4, 1, 5, 9}; size_t n = sizeof(arr) / sizeof(arr[0]); SORT_INT(arr, n); for (size_t i = 0; i < n; i++) { printf("%d ", arr[i]); } return 0; }
Debug
Known issues
gotchaHeader-only C library, requires defining SORT_TYPE before including sort.h
fix
Define SORT_TYPE macro to the type you want to sort (e.g., #define SORT_TYPE int) before including sort.h
affects: *
Upgrade
Version history
2021-05-22latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources

No resource links recorded.

swenson-sort — pip install swenson-sort · libregistry