From c24cd6b99e564a81add9b00a1c7827212c9bf77a Mon Sep 17 00:00:00 2001 From: xolatile Date: Mon, 13 Nov 2023 21:05:10 -0500 Subject: [PATCH] Adding main file... --- compile.sh | 29 ++++++++++++++++------------- xhartae.c | 20 +++++++++++--------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/compile.sh b/compile.sh index 67d5c8c..0e0e999 100644 --- a/compile.sh +++ b/compile.sh @@ -4,23 +4,26 @@ set -xe clang -DSTATIC_SOURCE -g -Weverything -O0 -o xhartae xhartae.c -gcc -g -Wall -Wextra -Wpedantic -O0 -c -o chapters/chapter_0.o chapters/chapter_0.c -gcc -g -Wall -Wextra -Wpedantic -O0 -c -o chapters/chapter_1.o chapters/chapter_1.c -gcc -g -Wall -Wextra -Wpedantic -O0 -c -o chapters/chapter_2.o chapters/chapter_2.c -gcc -g -Wall -Wextra -Wpedantic -O0 -c -o chapters/chapter_3.o chapters/chapter_3.c +gcc -g -Wall -Wextra -Wpedantic -O0 -c -o chapter/chapter_0.o chapter/chapter_0.c +gcc -g -Wall -Wextra -Wpedantic -O0 -c -o chapter/chapter_1.o chapter/chapter_1.c +gcc -g -Wall -Wextra -Wpedantic -O0 -c -o chapter/chapter_2.o chapter/chapter_2.c +gcc -g -Wall -Wextra -Wpedantic -O0 -c -o chapter/chapter_3.o chapter/chapter_3.c +gcc -g -Wall -Wextra -Wpedantic -O0 -c -o chapter/chapter_4.o chapter/chapter_4.c gcc -g -Wall -Wextra -Wpedantic -O0 -c -o xhartae.o xhartae.c -gcc -o xhartae xhartae.o chapters/chapter_0.o chapters/chapter_1.o chapters/chapter_2.o chapters/chapter_3.o +gcc -o xhartae xhartae.o chapter/chapter_0.o chapter/chapter_1.o chapter/chapter_2.o chapter/chapter_3.o chapter/chapter_4.o -splint -weak -warnposix -retvalother -syntax -type chapters/chapter_0.h -splint -weak -warnposix -retvalother -syntax -type chapters/chapter_0.c -splint -weak -warnposix -retvalother -syntax -type chapters/chapter_1.h -splint -weak -warnposix -retvalother -syntax -type chapters/chapter_1.c -splint -weak -warnposix -retvalother -syntax -type chapters/chapter_2.h -splint -weak -warnposix -retvalother -syntax -type chapters/chapter_2.c -splint -weak -warnposix -retvalother -syntax -type chapters/chapter_3.h -splint -weak -warnposix -retvalother -syntax -type chapters/chapter_3.c +splint -weak -warnposix -retvalother -syntax -type chapter/chapter_0.h +splint -weak -warnposix -retvalother -syntax -type chapter/chapter_0.c +splint -weak -warnposix -retvalother -syntax -type chapter/chapter_1.h +splint -weak -warnposix -retvalother -syntax -type chapter/chapter_1.c +splint -weak -warnposix -retvalother -syntax -type chapter/chapter_2.h +splint -weak -warnposix -retvalother -syntax -type chapter/chapter_2.c +splint -weak -warnposix -retvalother -syntax -type chapter/chapter_3.h +splint -weak -warnposix -retvalother -syntax -type chapter/chapter_3.c +splint -weak -warnposix -retvalother -syntax -type chapter/chapter_4.h +splint -weak -warnposix -retvalother -syntax -type chapter/chapter_4.c splint -weak -warnposix -retvalother -syntax -type xhartae.c valgrind --show-leak-kinds=all --leak-check=full ./xhartae diff --git a/xhartae.c b/xhartae.c index 8d553bb..500a991 100644 --- a/xhartae.c +++ b/xhartae.c @@ -7,15 +7,17 @@ It is distributed in the hope that it will be useful or harmful, it really depen */ #ifdef STATIC_SOURCE - #include "chapters/chapter_0.c" - #include "chapters/chapter_1.c" - #include "chapters/chapter_2.c" - #include "chapters/chapter_3.c" + #include "chapter/chapter_0.c" + #include "chapter/chapter_1.c" + #include "chapter/chapter_2.c" + #include "chapter/chapter_3.c" + #include "chapter/chapter_4.c" #else - #include "chapters/chapter_0.h" - #include "chapters/chapter_1.h" - #include "chapters/chapter_2.h" - #include "chapters/chapter_3.h" + #include "chapter/chapter_0.h" + #include "chapter/chapter_1.h" + #include "chapter/chapter_2.h" + #include "chapter/chapter_3.h" + #include "chapter/chapter_4.h" #endif /* @@ -137,7 +139,7 @@ int main (int argc, char * * argv) { curses_synchronize (); } - print ("/1%f/-\n/2// %s/-\n%i\n", 69.1, "Heyo", 420); + program_view_c_file ("program/hello_world.c", curses_screen_width, curses_screen_height, 0, 0); return (EXIT_SUCCESS); }