Skip to content
Snippets Groups Projects
Commit 96796f92 authored by dario.genga's avatar dario.genga
Browse files

Add the project's base

This include :
- .gitignore
- README
- makefile
- Files (main, test, .c, .h)
parent 3fd3ecbf
Branches
No related tags found
No related merge requests found
# Created by https://www.toptal.com/developers/gitignore/api/c,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=c,visualstudiocode
### C ###
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
# Support for Project snippet scope
!.vscode/*.code-snippets
# End of https://www.toptal.com/developers/gitignore/api/c,visualstudiocode
# Custom gitignore for project
stack
test
\ No newline at end of file
# progseq- # Pile et tri à deux piles
8e travail pratique du cours de programmation séquentielle, 1er année (2021-2022). - **Class** : Programmation séquentielle en C
\ No newline at end of file - **Creation date** : 23 novembre 2021
- **Description** : 8e travail pratique
## Makefile configuration
### Compile the project
> `make`
Use this command to compile the project.
### Clean the project
> `make clean`
Use this command to clean the project.
### Run the tests
> `make run_tests`
Use this command to start the tests.
\ No newline at end of file
main.c 0 → 100644
/* Author : Dario GENGA
* Date : 16.11.2021
* Description : Library to manipulate the pile
*/
#include <stdio.h>
#include <stdlib.h>
#include "stack.h"
int main() {
return EXIT_SUCCESS;
}
makefile 0 → 100644
LIB=-lm
CC=gcc -Wall -Wextra -g
stack: stack.o main.o
$(CC) $^ -fsanitize=address -fsanitize=leak -o $@ $(LIB)
test: test.o stack.o
$(CC) $^ -fsanitize=address -fsanitize=leak -o $@ $(LIB)
stack.o: stack.c stack.h
$(CC) -c $< $(LIB)
main.o: main.c
$(CC) -c $< $(LIB)
clean:
rm -f *.o stack test
\ No newline at end of file
/* Author : Dario GENGA
* Date : 16.11.2021
* Description : Library to manipulate the stack
*/
#include "stack.h"
#include <stdio.h>
stack.h 0 → 100644
/* Author : Dario GENGA
* Date : 16.11.2021
* Description : Library to manipulate the stack
*/
#ifndef _PILE_H
#define _PILE_H
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#endif
\ No newline at end of file
test.c 0 → 100644
/* Author : Dario GENGA
* Date : 16.11.2021
* Description : Manipulate matrix
*/
#include "stack.h"
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
int main() {
printf("The tests are completed and were successful !\n");
return EXIT_SUCCESS;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment