Skip to content

vidojesevic/datastrlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DATA STRUCTURE LIBRARY

This is my own implementation of various Data Structures in C language.

Usage

  1. Download .zip from this repository
  2. Go to your project directory
cd your-project/
  1. Unzip the files into your project directory
unzip ~/Downloads/datastrlib-main.zip
  1. Create main.c and add these header files:
#include <stdbool.h>
#include "datastrlib-main/include/queues.h"
#include "datastrlib-main/include/stacks.h"
  1. Compile with gcc
gcc -o user-project main.c -I datastrlib-main/include -L datastrlib-main/build -l:datastrlib.a

Contributing

If you want to contribute to a project and make it better, your help is very welcome. Here is few guidelines to follow:

How to make a clean pull request

  1. Create a personal fork of the project on Github.
  2. Clone the fork on your local machine.
  3. Add the original repository as a remote called upstream.
  4. Create a new branch to work on!
git checkout -b feature origin/feature
  1. Develop new data structure
  • If you are developing new data structure, create src/data_structure_name.c and include/data_strucrute_name.h. Those 2 files must be clean and containing only code related to that data structure.
  • You can use custom main.c for testing your feature and don't forget to add that file inside .gitignore.
  • Compile your changes:
make clean
make
  • Compile test program
gcc -o user-project main.c -I include -L build -l:datastrlib.a
  1. Create test cases
  • Inside of tests/unit directory, create test cases for your work and run:
make test
  1. Make changes
  • If your tests passed, you can make changes:
git add .
git commit -m "Feature/Bugfix" -m "- Your meaningful commit message"
git push origin feature-or-fix-name
  1. Create pull request
  • Before submitting the pull request, ensure your fork is in sync with the upstream
  1. Code rewiew
  • Wait for code review and happy codding!

License

This project is licensed under the MIT License. See the LICENSE file for details.