devel/tllist 1.1.0p0 OpenBSD
Typed Linked List C header file only
- System
- OpenBSD
- Repository
- OpenBSD ports
- Maintainer
- The OpenBSD ports mailing-list <[email protected]>
- Last update
- Commit
a64375757d- Categories
- devel
Description
tllis is a **T**yped **L**inked **L**ist C header file only library implemented using pre-processor macros.
## Description
Most C implementations of linked list are untyped. That is, their data carriers are typically `void *`. This is error prone since your compiler will not be able to help you correct your mistakes (_oh, was it a pointer-to-a-pointer... I thought it was just a pointer..._).
**tllist** addresses this by using pre-processor macros to implement dynamic types, where the data carrier is typed to whatever you want; both **primitive** data types are supported as well as aggregated ones such as **structs**, **enums** and **unions**.
Being a double-linked list, most operations are constant in time (including pushing and popping both to/from front and back).
In the other systems
| System | Port | Version |
|---|---|---|
| OpenBSD | devel/tllist | 1.1.0p0 |
| FreeBSD | devel/tllist | 1.1.0 |
| NetBSD | devel/tllist | 1.1.0 |
| DragonFly | devel/tllist | 1.1.0 |
| MidnightBSD | devel/tllist | 1.1.0 |
| HardenedBSD | devel/tllist | 1.1.0 |
| GhostBSD | devel/tllist | 1.1.0 |
Install
Binary package:
pkg_add tllist
From the ports tree:
cd /usr/ports/devel/tllist && make install