This is my own implementation of various Data Structures in C language.
- Download .zip from this repository
- Go to your project directory
cd your-project/
- Unzip the files into your project directory
unzip ~/Downloads/datastrlib-main.zip
- Create main.c and add these header files:
#include <stdbool.h>
#include "datastrlib-main/include/queues.h"
#include "datastrlib-main/include/stacks.h"
- Compile with gcc
gcc -o user-project main.c -I datastrlib-main/include -L datastrlib-main/build -l:datastrlib.a
If you want to contribute to a project and make it better, your help is very welcome. Here is few guidelines to follow:
- Create a personal fork of the project on Github.
- Clone the fork on your local machine.
- Add the original repository as a remote called
upstream
. - Create a new branch to work on!
git checkout -b feature origin/feature
- 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
- Create test cases
- Inside of tests/unit directory, create test cases for your work and run:
make test
- 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
- Create pull request
- Before submitting the pull request, ensure your fork is in sync with the upstream
- Code rewiew
- Wait for code review and happy codding!
This project is licensed under the MIT License. See the LICENSE file for details.