From c652dabd5f4e7fe944d5cdb00bfc4a820ba6d333 Mon Sep 17 00:00:00 2001 From: Brandon Rodriguez <brodriguez8774@gmail.com> Date: Tue, 12 Nov 2019 00:14:16 -0500 Subject: [PATCH] Add initial C files and directory --- .gitignore | 5 +++++ C/main.c | 30 ++++++++++++++++++++++++++++++ C/makefile | 3 +++ 3 files changed, 38 insertions(+) create mode 100644 C/main.c create mode 100644 C/makefile diff --git a/.gitignore b/.gitignore index 2edd3e1..c1e6774 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,8 @@ Python/venv/ # Do not track local environment logs. *.log *.log.* + + +# Do not track compiled C files. +*.o +C/main diff --git a/C/main.c b/C/main.c new file mode 100644 index 0000000..f080abc --- /dev/null +++ b/C/main.c @@ -0,0 +1,30 @@ +/** + * Date: 11-12-19 + * Class: CS5310 + * Assignment: Peterson's Algorithm + * Author: Brandon Rodriguez + * + * + * <File Description Here> +*/ + + +// Import headers. +#include <ctype.h> +#include <pthread.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + + +/** + * Program's main. Initialized and runs program. + */ +int main(int argc, char* argv[]) { + printf("Initializing program.\n"); + + // Program logic here. + + printf("Terminating program.\n"); + return 0; +} diff --git a/C/makefile b/C/makefile new file mode 100644 index 0000000..565b48e --- /dev/null +++ b/C/makefile @@ -0,0 +1,3 @@ + +all: + gcc -Wall -Wpedantic -std=c99 main.c -g -o main -pthread -- GitLab