From 7e03a49d9876b4b6caf749533f29fbeebba47265 Mon Sep 17 00:00:00 2001 From: Rafael Marçalo Date: Mon, 24 Oct 2022 14:39:37 +0100 Subject: Updated god words --- Makefile | 8 ++++---- README.md | 12 ++++++------ godwords.c | 38 ++++++++++++++++++++++++++++++++++++++ session.h | 2 +- tongues.c | 38 -------------------------------------- 5 files changed, 49 insertions(+), 49 deletions(-) create mode 100644 godwords.c delete mode 100644 tongues.c diff --git a/Makefile b/Makefile index 4cf502d..43100f2 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,13 @@ build: clean - cc -o trt tongues.c session.c utils.c + cc -o gw godwords.c session.c utils.c clean: - rm -rf trt + rm -rf gw install: build mkdir -p /usr/local/bin - cp -f trt /usr/local/bin + cp -f gw /usr/local/bin chmod 755 /usr/local/bin uninstall: - rm -rf /usr/local/bin/trt + rm -rf /usr/local/bin/gw diff --git a/README.md b/README.md index da3d632..cb13cbe 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Timer Random Tongues -Tongues based on time and question randomness +# God Words +God words based on time and question randomness ## Inspiration -Inspired by Terry Davis TempleOS Timer Random Tongues which he used to communicate with God. +Inspired by Terry Davis TempleOS "God Words" which he used to communicate with God. -![TempleOS Timer Random Tongues](images/image.png) +![TempleOS God Words](images/image.png) ## How to Use @@ -18,8 +18,8 @@ Inspired by Terry Davis TempleOS Timer Random Tongues which he used to communica ### Run If you already have a `dictionary.dict` file in your path, just run: -`trt` +`gw` If you have the file saved in another folder, just type: -`trt /path/to/dictionary` +`gw /path/to/dictionary` diff --git a/godwords.c b/godwords.c new file mode 100644 index 0000000..5b90cdf --- /dev/null +++ b/godwords.c @@ -0,0 +1,38 @@ +#include "session.h" +#include "utils.h" +#include +#include + +int +main (int argc, char **argv) +{ + + FILE *dictionary = NULL; + + switch (argc) + { + case 1: + if (checkIfFileExists ("dictionary.dict") == 0) + { + dictionary = fopen ("dictionary.dict", "r"); + } + break; + case 2: + if (checkIfFileExists (argv[1]) == 0) + { + dictionary = fopen (argv[1], "r"); + } + } + + if (dictionary != NULL) + { + startSession (dictionary); + fclose (dictionary); + } + else + { + printf ("No Dictionary Found\n"); + } + + return 0; +} diff --git a/session.h b/session.h index 283e429..48a6257 100644 --- a/session.h +++ b/session.h @@ -1,4 +1,4 @@ #include -/* Starts a oujia session using a inputted dictionary file */ +/* Starts a god words session using a inputted dictionary file */ void startSession (FILE *dictionary); diff --git a/tongues.c b/tongues.c deleted file mode 100644 index 5b90cdf..0000000 --- a/tongues.c +++ /dev/null @@ -1,38 +0,0 @@ -#include "session.h" -#include "utils.h" -#include -#include - -int -main (int argc, char **argv) -{ - - FILE *dictionary = NULL; - - switch (argc) - { - case 1: - if (checkIfFileExists ("dictionary.dict") == 0) - { - dictionary = fopen ("dictionary.dict", "r"); - } - break; - case 2: - if (checkIfFileExists (argv[1]) == 0) - { - dictionary = fopen (argv[1], "r"); - } - } - - if (dictionary != NULL) - { - startSession (dictionary); - fclose (dictionary); - } - else - { - printf ("No Dictionary Found\n"); - } - - return 0; -} -- cgit v1.2.3