Skip to content

bla-k/c-nostalgia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

c-nostalgia

Personal journey through classic computer science concepts, implemented from scratch in C.

This repository is a collection of fundamental data structures and algorithms.

Prerequisites

You'll need a C compiler, eg. gcc or clang, and make to build and run the project.

Building the project

By its nature, the main target of the project builds the shared library libc-nostalgia.so.

make

Some data structures can be customized. For example, you can make the List to be either sigly or doubly linked by changing LIST_IMPL variable.

make LIST_IMPL=double

Once the library is compiled, the headers in include/c-nostalgia and libc-nostalgia.so can be used as follows in your own programs. In the following example I moved everything in the same directory for simplicity.

$ eza -T
.
├── libc-nostalgia.so
├── list.h
└── main.c

$ gcc -I. -L. -lc-nostalgia main.c -o main

Running tests

Each implementation includes some tests that you can run with.

make test

About

This is me nostalgic about C programming language :')

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published