lelanthran/libds
View on GitHub ↗ ★ 19 C
A collection of data structures for C
7 mentions on Hacker News by 1 person: 0 stories, 7 comments · first 2022-01-19 · latest 2025-11-29
20082026
-
…sprintf function that allocates the destination buffer, so that the caller cannot overrun it: https://github.com/lelanthran/libds/blob/56d6e18c8970b84c9fa...
comment by lelanthran · 2025-11-29 · in Generalizing Printf in C -
I prefer to have both single return and early return, like this: https://github.com/lelanthran/libds/blob/b5289f6437b30139d42...
comment by lelanthran · 2025-08-31 · in Cognitive load is what matters -
…time you realise `sprintf` on the platform doesn't exist. Here is a sample from more recently: https://github.com/lelanthran/libds/blob/b5289f6437b30139d42...
comment by lelanthran · 2025-08-19 · in How to Use Snprintf -
…to use c string library. I dunno about novel, I have used (some of) these functions extensively: https://github.com/lelanthran/libds/blob/master/src/ds_str.h
comment by lelanthran · 2025-04-21 · in Show HN: I rewrote few of the common core string.h functions -
I may as well throw my hat into the ring: https://github.com/lelanthran/libds I decided that I wanted to be able to simply drop a single .h file and a single .c file into any project without have to build a `libBlah.so` and link it to…
comment by lelanthran · 2022-05-17 · in Common libraries and data structures for C -
…have to use non-standard stuff. I made my own easy-to-incorporate-into-any-project library - https://github.com/lelanthran/libds - just copy the ds_*.h and ds_*.c into a project and you're good to go. I'm not saying it will work for you,…
comment by lelanthran · 2022-03-08 · in Buffet – An All-inclusive Buffer for C -
…the caller. Others will say that this is not good, because it still uses and exposes `char *`. [1] https://github.com/lelanthran/libds/blob/master/src/ds_str.h [2] Currently the only bug I know of is the quadratic runtime in many of the…
comment by lelanthran · 2022-01-19 · in BCHS: OpenBSD, C, httpd and SQLite web stack