百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

cdsa

> DevOps
开源

一个包含通用侵入式数据结构和算法的 ANSI C 库

611 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

一个包含通用侵入式数据结构和算法的 ANSI C 库

C Data Structures and Algorithms

A library of generic intrusive data structures and algorithms in ANSI C

  • Background
  • Examples
  • Installation
  • Running Tests
  • Contributing

Background

This repository is an ongoing project of implementing generic intrusive data structures and algorithms in ANSI C. I find I often use the same constructs that require a lot of boilerplate code, so I made this repository to both organize these constructs and allow easy integration of these constructs into existing projects.

My design philosophy with this repository is to offer a minimalistic API for each data structure, containing all tools needed to easily build more complex/niche constructs. Portability is top priority, so only ANSI C is used, and no header/source pair relies on another header/source pair. Furthermore, to promote being used in embedded systems, iterative algorithms are used exclusively over recursive algorithms, and each data structure is intrusive (for better memory locality).

Feel free to use these data structures and algorithms in your own way. The code is licensed under the ISC license (a simplified version of the BSD license that is functionally identical); thus, it may legitimately be reused in any project, whether Proprietary or Open Source.

Examples

Each header is heavily documented and should hopefully answer all questions regarding functionality. An in-depth explanation on how each data structure operates is located at the top of the header file.

List

…

RBTree

…

HashTable

…

Stack

…

Queue

…

Installation

This library is written in ANSI C, so the code should work with just about every compiler. Each header/source pair is independent of the others. This makes using an individual data structure easy. Just simply drag and drop the header/source pair into your project directly, and make sure to compile the source file along with your other files.

Running Tests

You must have the GNU compiler available to run the tests. Make sure you have all the files downloaded pertaining to this library as well.

Simply run this command once in the "tests" directory to run all the tests:

make

Example:

…

Contributing

Contributions are welcome!

If you have a feature request, or have found a bug, feel free to open a new issue. If you wish to contribute code, please document thoroughly and make sure to write a test for each function/macro. I will help finalize the code and will help make sure that the conventions used are consistent.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Calgorithmsansi-ccc89

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理