diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..ca2eaff8c0b33048198e954627ef207df9d28ee9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,82 @@ + +# 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 diff --git a/README.md b/README.md index df5f3837683b8f865aa30eba586f30a915592aa6..0a99331b17358f8485d7dbab08bdd03a83e31804 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,22 @@ -# progseq- +# Pile et tri à deux piles -8e travail pratique du cours de programmation séquentielle, 1er année (2021-2022). \ No newline at end of file +- **Class** : Programmation séquentielle en C +- **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 diff --git a/main.c b/main.c new file mode 100644 index 0000000000000000000000000000000000000000..736e7ff838d7be9a6dae00e2ed0eec868011d1e9 --- /dev/null +++ b/main.c @@ -0,0 +1,13 @@ +/* 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; +} diff --git a/makefile b/makefile new file mode 100644 index 0000000000000000000000000000000000000000..ca885516149bbea75aa6814b430fff4a9c2e5712 --- /dev/null +++ b/makefile @@ -0,0 +1,15 @@ +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 diff --git a/stack.c b/stack.c new file mode 100644 index 0000000000000000000000000000000000000000..4f024e2154cfac448128432229864a4ded465c8e --- /dev/null +++ b/stack.c @@ -0,0 +1,8 @@ +/* Author : Dario GENGA + * Date : 16.11.2021 + * Description : Library to manipulate the stack + */ + +#include "stack.h" +#include <stdio.h> + diff --git a/stack.h b/stack.h new file mode 100644 index 0000000000000000000000000000000000000000..207ee6e6d117bef6fceac79054f3df878abd150e --- /dev/null +++ b/stack.h @@ -0,0 +1,12 @@ +/* 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 diff --git a/test.c b/test.c new file mode 100644 index 0000000000000000000000000000000000000000..1648701add9fde2ef97e30afdeeb940e5d490b4f --- /dev/null +++ b/test.c @@ -0,0 +1,13 @@ +/* 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; +}