Skip to content

Repository files navigation

Lib O2S

Reliable datastructure library for C.

The include folder contains the public interface, while the src folder contains the implementation.

Data structures

classDiagram
  class A["Array"] {
    memory
    push_back()
    pop_back()
  }
  class S["String"] {
  }
  class D["Deque"] {
    memory
    push_back()
    push_front()
    pop_back()
    pop_front()
  }
  class Q["Queue"] {
    push()
    pop()
  }
  class T["Stack"] {
    push()
    pop()
  }
  A <|-- S
  D <|-- T
  D <|-- Q
Loading

Primary

Secondary

Input/Output

classDiagram
  class I["input stream"] {
    buffer
    accumulate(count)
  }
  class S["string input stream"] {
  }
  class F["file input stream"] {
    file descriptor
  }
  I <|-- S
  I <|-- F
Loading

Utilities

Usage

Use in your project

Add the dependency in your build.zig.zon by running the following command:

zig fetch --save git+https://github.com/Orolia2s/libo2s#master

Then, in your build.zig:

const libo2s = b.dependency("libo2s", .{ .target = target, .optimize = optimize }).artifact("o2s");

// wherever needed:
exe.linkLibrary(libo2s);

Build

requires zig >= 0.14.0

zig build

Test

zig build test

Generate documentation

requires doxygen

zig build doc
open doc/html/index.html

Releases

Used by

Contributors

Languages