Initial code for tomd, contained in src/main.c
authorTom Balzer <niebieskitrociny@gmail.com>
Fri, 15 Jun 2018 03:07:32 +0000 (22:07 -0500)
committerTom Balzer <niebieskitrociny@gmail.com>
Fri, 15 Jun 2018 03:07:32 +0000 (22:07 -0500)
.gitignore
Makefile [new file with mode: 0644]
README
src/main.c [new file with mode: 0644]

index b25c15b..17637ae 100644 (file)
@@ -1 +1,2 @@
 *~
+/tomd
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..bf84ead
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+# TODO > Use GNU automake tools
+
+tomd:
+       gcc -o tomd ./src/main.c
diff --git a/README b/README
index 1b34f15..35b30dc 100644 (file)
--- a/README
+++ b/README
@@ -14,7 +14,11 @@ to do them.
 
 Also, I don't CARE if anything in this repository offends, including
 language and jokes. If you complain, don't expect sympathy or action
-on my part. 
+on my part.
+
+CONTACT
+
+If you wish to contact me, niebieskitrociny@gmail.com is sufficient.
 
 PURPOSE
 
diff --git a/src/main.c b/src/main.c
new file mode 100644 (file)
index 0000000..8d819d1
--- /dev/null
@@ -0,0 +1,50 @@
+/* Copyright (C) 2018 Thomas Balzer */
+
+/* This file is part of tomd. */
+
+/* tomd is free software: you can redistribute it and/or modify */
+/* it under the terms of the GNU General Public License as published by */
+/* the Free Software Foundation, either version 3 of the License, or */
+/* (at your option) any later version. */
+
+/* tomd is distributed in the hope that it will be useful, */
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the */
+/* GNU General Public License for more details. */
+
+/* You should have received a copy of the GNU General Public License */
+/* along with tomd.  If not, see <http://www.gnu.org/licenses/>. */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+static void header(void)
+{
+  printf("Tom's Daemon, Copyright (C) 2018 Thomas Balzer\n");
+  printf("GPL v3 or later license.\n");
+}
+
+static void init(void)
+{
+  /* TODO */
+}
+
+static void run(void)
+{
+  /* TODO */
+}
+
+static void daemonize(void)
+{
+  /* TODO */
+}
+
+int main(int argc, char **argv)
+{
+  header();
+  init();
+  run();
+  daemonize();
+  
+  return EXIT_SUCCESS;
+}