All Projects → LprogrammersLm9awdin → Lib9wada

LprogrammersLm9awdin / Lib9wada

Licence: mit
Wonderful library with lots of useful functions, algorithms and data structures in C, link it with -l9wada

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Lib9wada

Towel
Throw in the towel.
Stars: ✭ 333 (+851.43%)
Mutual labels:  algorithms, data-structures, library
Collections C
A library of generic data structures.
Stars: ✭ 2,297 (+6462.86%)
Mutual labels:  algorithms, data-structures, library
Sc
Common libraries and data structures for C.
Stars: ✭ 161 (+360%)
Mutual labels:  algorithms, data-structures, library
Competitiveprogramming
A collection of algorithms, data structures and other useful information for competitive programming.
Stars: ✭ 475 (+1257.14%)
Mutual labels:  algorithms, data-structures, library
Arabiccompetitiveprogramming
The repository contains the ENGLISH description files attached to the video series in my ARABIC algorithms channel.
Stars: ✭ 675 (+1828.57%)
Mutual labels:  data-structures, library
Dsa.js Data Structures Algorithms Javascript
🥞Data Structures and Algorithms explained and implemented in JavaScript + eBook
Stars: ✭ 6,251 (+17760%)
Mutual labels:  algorithms, data-structures
Advanced Algorithms
100+ algorithms & data structures generically implemented in C#.
Stars: ✭ 752 (+2048.57%)
Mutual labels:  algorithms, data-structures
Hackerrank
HackerRank solutions in Java/JS/Python/C++/C#
Stars: ✭ 829 (+2268.57%)
Mutual labels:  algorithms, data-structures
Algorithms
A repository of different Algorithms and Data Structures implemented in many programming languages.
Stars: ✭ 578 (+1551.43%)
Mutual labels:  algorithms, data-structures
Etl
Embedded Template Library
Stars: ✭ 783 (+2137.14%)
Mutual labels:  algorithms, library
The Uplift Project Dsa
Stars: ✭ 20 (-42.86%)
Mutual labels:  algorithms, data-structures
Get better at cp in 2 months
This contains the curriculum that I will follow to get better at Competitive Programming in 2 months.
Stars: ✭ 627 (+1691.43%)
Mutual labels:  algorithms, data-structures
Python For Coding Test
[한빛미디어] "이것이 취업을 위한 코딩 테스트다 with 파이썬" 전체 소스코드 저장소입니다.
Stars: ✭ 596 (+1602.86%)
Mutual labels:  algorithms, data-structures
Swift Algorithm Club
Algorithms and data structures in Swift, with explanations!
Stars: ✭ 25,731 (+73417.14%)
Mutual labels:  algorithms, data-structures
Ascii art
Real-Time ASCII Art Rendering Library
Stars: ✭ 599 (+1611.43%)
Mutual labels:  algorithms, library
Algorithm
Algorithm is a library of tools that is used to create intelligent applications.
Stars: ✭ 787 (+2148.57%)
Mutual labels:  algorithms, data-structures
Coding Challenges
solutions to coding challenges and algorithm and data structure building blocks
Stars: ✭ 28 (-20%)
Mutual labels:  algorithms, data-structures
Huprog
A repo which includes the HUPROG'17(Hacettepe University Programming Contest)'s questions and the solutions of that questions.
Stars: ✭ 11 (-68.57%)
Mutual labels:  algorithms, data-structures
Ds Algo Point
This repository contains codes for various data structures and algorithms in C, C++, Java, Python, C#, Go, JavaScript, PHP, Kotlin and Scala
Stars: ✭ 949 (+2611.43%)
Mutual labels:  algorithms, data-structures
Algorithm study
algorithms and data structures for coding contest (designed for 'copy & paste')
Stars: ✭ 33 (-5.71%)
Mutual labels:  algorithms, data-structures

Lib9wada

Wonderful library with lots of useful functions, algorithms and data structures in C, link it with -l9wada

Usage

Compile the library with

make

To link it with your project use flag -l9wada with GCC

gcc main.c -l9wada

Include files depending on functions and modules you will use all header files are available in includes directory

Library Structure And How To Contribute

the root of the repo contains

Makefile
make_config.mk
sources 
includes
author
LICENSE
README.md

Makefile

This makefile does not have rules for every source file, in fact it is static and includes other makefiles. the make_config.mk makefile contains config variables, like what compiler to use, and what modules to compile (we'll get to that later) the sources directory contains multiple subdirectories

base
get_next_line
ttslist
ft_printf

Each subdirectory of sources is called a module Every module contains source files and a make_module.mk file Here's a preview of a make_module.mk file

# MANUALLY GENERATED PART

LOCAL_SRC_DIR = ttslist
MODULE_NAME = ttslist

INCLUDES = ttslist.h

SRC_FILES = ttslist_constructors.c\
	    ttslist_delete.c\
	    ttslist_iterator.c\
	    ttslist_operations.c\
	    ttslist_purge.c\
	    ttslist_tools.c

# AUTO GENERATED PART

include make_config.mk

OBJ_FILES = $(SRC_FILES:.c=.o)
OBJ_FILES := $(addprefix $(OBJ_DIR)/, $(OBJ_FILES))
INCLUDES := $(addprefix $(INC_DIR)/, $(INCLUDES))
...
...
...

We will just pay attention to the MANUALLY GENERATED PART in it you specify a unique module name, and the module directory name, header files to include, and source files the makefile takes care of the rest After adding a new module, we need to load it, so the makefile will compile it and link it to the library. We do that in the make_config.mk

# makefile config specifying locations, compiler and compilation flags

NAME = lib9wada.a
CC = gcc
FLAGS = -Wall -Werror -Wextra
SRC_DIR = sources
INC_DIR = includes
OBJ_DIR = objects
DELETE_COMMAND = rm
DELETE_COMMAND_FLAGS = -rf
LINKER = ar
LINKER_FLAGS = rc
RANLIB = ranlib
RANLIB_FLAGS =

# IN HERE ADD OR REMOVE MODULES

MODULES = base\
	  ttslist\
	  get_next_line

This make_config.mk also contains other config variables, so you can change the compiler you use or the library name.

The documentations

Every module should contain a README.md file, containing the documentation and explaining what each function does, with its prototype and usage. An example documentation is needed finally, the author file contains names or logins of people who contributed to this library.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].