GithubHelp home page GithubHelp logo

chol's Introduction

chol - my C Header-Only Libraries

C header-only libraries I've created, used, and which might be useful to others.

See each subdirectory for more information, usage, etc.

Nota Bene

Most should be in working condition, but might lack tests or examples or might just be of a bad quality.

Use at your peril, and/or submit issues and pull requests.

What is included?

dyn_dllist

A C "dynamic" doubly-linked list header-only library.

You choose the type of the member item and the new struct name. You get a bunch of functions you can use to interact with that new struct type: create one, free one, prepend or append an item, iterate the list, or even grep it returning a new one.

See dyn_dllist/README.md for more information.

dyn_kvp

A C "dynamic" key/value pair (aka "hash" or "dict") library.

You choose the type of the "value" of the pair (the "key" defaults to "unsigned int") and the new struct name. Optionally you can also choose the type of the "key" of the pair and provide a hashing function. You get a bunch of functions you can use to interact with that new struct type: create one, free one, set or get or delete an item from the hash, but also perform intersection or merging into new structures.

See dyn_kvp/README.md for more information.

dyn_arr

A C "dynamic" array-like (vector-like, as the structure has "slack" at either end) header-only library.

You choose the type of "items" contained in the array and the new struct name. You get a bunch of functions you can use to interact with that new struct type: create one, free one, push or pop an item, iterate the array, pre-fill it with values, or remove duplicate items.

See dyn_arr/README.md for more information.

sagoma

A somewhat simple, but powerful, C block profiler which doesn't waste too many resources.

You choose which overall blocks to profile and print stats for, even down to how many clock cycles those took, or how many min/max time they took if they were called multiple times. There's hooks to make it very easy to use, or more verbose but more tweakable.

See sagoma/README.md for more information.

tap

This is mostly for internal use by this repository, but might be useful to others.

A minimalistic Test Anything Protocol for C.

You include the header, and gain the ability to call functions like test_is_int(a, b, "test name") and ultimately tap_done_testing() once done.

You gain the ability to prove ./a.out :: some parameters and have a nice output for your tests' failures.

See tap/README.md for more information.

LICENSE

The MIT License (MIT)

Copyright (c) 2024 Marco Fontani, [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

chol's People

Contributors

mfontani avatar

Stargazers

 avatar Luka avatar Kiran Kanchi avatar  avatar SatyrDiamond avatar kiddlu avatar Sebastian Freundt avatar Ned Loynd avatar ArnauNau avatar

Watchers

 avatar  avatar

Forkers

kiddlu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.