Generic quicksort library that can be used to sort an array having any data type (int, char *, struct key_value *, etc.).
Amit
amitchoudhary0523@gmail.com
Fri Sep 26 13:37:57 GMT 2025
On Fri, 26 Sept 2025 at 18:19, Samuel Thibault <samuel.thibault@aquilenet.fr>
wrote:
> Amit, le ven. 26 sept. 2025 18:11:52 +0530, a ecrit:
> > Generic quicksort library that can be used to sort an array having any
> data
> > type (int, char *, struct key_value *, etc.)
>
> You mean https://www.man7.org/linux/man-pages/man3/qsort.3.html
> ?
>
It is similar (swap function is missing, so the qsort() function is itself
swapping bytes).
But what about generic linked list, generic hash, generic binary search
tree, generic binary balanced tree, generic B+ trees, generic dynamic
array, bits library, etc. These all also should have been there.
This is interesting: ("generic_doubly_linked_list_library.c" can be used as
a C++ STL list, map, set, stack, queue, deque, multimap, multiset,
unordered_map, unordered_set, unordered_multimap, and unordered_multiset
(basically as all C++ STL data structures except vector)):
https://marc.info/?l=linux-kernel&m=174980160830856&w=2
Not related to the original topic but interesting article:
https://blog.qualys.com/vulnerabilities-threat-research/2024/01/30/qualys-tru-discovers-important-vulnerabilities-in-gnu-c-librarys-syslog
But I am not blaming anyone.
My idea is that all these can be done now also.
C++ has many of these and that's why C++ has overtaken C.
I don't like C++. I like C and that's why I sent the mail.
I can only suggest. If I were the controlling authority of the C standard,
then I would have done these even now (in 2025).
----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20250926/4b7d6aa2/attachment.htm>
More information about the Libc-alpha
mailing list