aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-04-22 03:14:35 +0300
committergramanas <anastasis.gramm2@gmail.com>2018-04-22 03:14:35 +0300
commit3560d8be4b833e888e8386a3dc641fa164b4b808 (patch)
tree252de8e5a09a4efa0f3a55284bf77d081c318779 /src
parenteb43b94476e1ed11eb7f7c181f8e0046e3f91ba4 (diff)
downloadck-3560d8be4b833e888e8386a3dc641fa164b4b808.tar.gz
ck-3560d8be4b833e888e8386a3dc641fa164b4b808.tar.bz2
ck-3560d8be4b833e888e8386a3dc641fa164b4b808.zip
Add licence and copyright notice
Diffstat (limited to 'src')
-rw-r--r--src/actionparser.c20
-rw-r--r--src/actionparser.h11
-rw-r--r--src/actions.c9
-rw-r--r--src/actions.h12
-rw-r--r--src/ck.c30
-rw-r--r--src/confparser.c10
-rw-r--r--src/confparser.h13
-rw-r--r--src/dblayer.c13
-rw-r--r--src/dblayer.h12
9 files changed, 109 insertions, 21 deletions
diff --git a/src/actionparser.c b/src/actionparser.c
index cba732e..bfa4f5b 100644
--- a/src/actionparser.c
+++ b/src/actionparser.c
@@ -1,3 +1,18 @@
+/* actionparser.c - Action parser for ck -------------------------------*- C -*-
+ *
+ * This file is part of ck, the config keeper
+ *
+ * -----------------------------------------------------------------------------
+ *
+ * Copyright (C) 2018 Anastasis Grammenos
+ * GPLv3 (see LICENCE for the full notice)
+ *
+ * -----------------------------------------------------------------------------
+ *
+ * The following code is resposinble for parsing the command line arguments
+ * and report any errors that might come up.
+ *
+ * -------------------------------------------------------------------------- */
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
@@ -8,11 +23,6 @@
#include "actionparser.h"
-/* --------------------------------------------------------------------------
- * The following code is resposinble for parsing the command line arguments
- * and report any errors that might come up.
- * -------------------------------------------------------------------------- */
-
/* accepted commands */
/* [0] is the count */
const char* const strINIT[] = {"2", "init", "-i"};
diff --git a/src/actionparser.h b/src/actionparser.h
index 854624b..be2416a 100644
--- a/src/actionparser.h
+++ b/src/actionparser.h
@@ -1,8 +1,13 @@
-/* actionparser.h - Action parser for ck------------------------*- C -*-
+/* actionparser.h - Action parser for ck -------------------------------*- C -*-
*
* This file is part of ck, the config keeper
*
- * ---------------------------------------------------------------------
+ * -----------------------------------------------------------------------------
+ *
+ * Copyright (C) 2018 Anastasis Grammenos
+ * GPLv3 (see LICENCE for the full notice)
+ *
+ * -----------------------------------------------------------------------------
*
* The code here and in actionparser.c is responsible for parsing
* the user's input from the command line and return a struct
@@ -13,7 +18,7 @@
* printParserHelp() and printParserError() functions
* to notify the user
*
- * ------------------------------------------------------------------ */
+ * -------------------------------------------------------------------------- */
#ifndef ACTIONPARSER_H
#define ACTIONPARSER_H
diff --git a/src/actions.c b/src/actions.c
index 98e161c..8941495 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1,8 +1,13 @@
-/* actions.c - ck actions --------------------------------------*- C -*-
+/* actions.c - ck actions ----------------------------------------------*- C -*-
*
* This file is part of ck, the config keeper
*
- * ------------------------------------------------------------------ */
+ * -----------------------------------------------------------------------------
+ *
+ * Copyright (C) 2018 Anastasis Grammenos
+ * GPLv3 (see LICENCE for the full notice)
+ *
+ * -------------------------------------------------------------------------- */
#include <stdio.h>
#include "actions.h"
diff --git a/src/actions.h b/src/actions.h
index f75dd80..b9d2192 100644
--- a/src/actions.h
+++ b/src/actions.h
@@ -1,11 +1,17 @@
-/* actions.h - Action parser for ck ----------------------------*- C -*-
+/* actions.h - ck actions ----------------------------------------------*- C -*-
*
* This file is part of ck, the config keeper
*
- * ---------------------------------------------------------------------
+ * -----------------------------------------------------------------------------
*
+ * Copyright (C) 2018 Anastasis Grammenos
+ * GPLv3 (see LICENCE for the full notice)
*
- * ------------------------------------------------------------------ */
+ * -----------------------------------------------------------------------------
+ *
+ *
+ *
+ * -------------------------------------------------------------------------- */
#ifndef ACTIONS_H
#define ACTIONS_H
diff --git a/src/ck.c b/src/ck.c
index d0fc135..01bc137 100644
--- a/src/ck.c
+++ b/src/ck.c
@@ -1,3 +1,33 @@
+/* ck.c - Main ck file -------------------------------------------------*- C -*-
+ *
+ * This file is part of ck, the config keeper
+ *
+ * -----------------------------------------------------------------------------
+ *
+ * Copyright (C) 2018 Anastasis Grammenos
+ * GPLv3 (see LICENCE for the full notice)
+ *
+ * This program 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.
+ *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * -----------------------------------------------------------------------------
+ *
+ * This is the file where the main function lies.
+ * It first parses the user options and then runs the
+ * handles the list of user arguments to the run_ACTION functions.
+ *
+ * -------------------------------------------------------------------------- */
+
#include <stdio.h>
#include <string.h>
#include <sqlite3.h>
diff --git a/src/confparser.c b/src/confparser.c
index 2ffe701..62cfb8f 100644
--- a/src/confparser.c
+++ b/src/confparser.c
@@ -1,3 +1,13 @@
+/* confparser.h - Configuration file parser for ck ---------------------*- C -*-
+ *
+ * This file is part of ck, the config keeper
+ *
+ * -----------------------------------------------------------------------------
+ *
+ * Copyright (C) 2018 Anastasis Grammenos
+ * GPLv3 (see LICENCE for the full notice)
+ *
+ * -------------------------------------------------------------------------- */
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
diff --git a/src/confparser.h b/src/confparser.h
index 197ff3a..fad65d1 100644
--- a/src/confparser.h
+++ b/src/confparser.h
@@ -1,11 +1,18 @@
-/* confparser.h - Configuration file parser for ck -------------*- C -*-
+/* confparser.h - Configuration file parser for ck ---------------------*- C -*-
*
* This file is part of ck, the config keeper
*
- * ---------------------------------------------------------------------
+ * -----------------------------------------------------------------------------
+ *
+ * Copyright (C) 2018 Anastasis Grammenos
+ * GPLv3 (see LICENCE for the full notice)
+ *
+ * -----------------------------------------------------------------------------
+ *
* The code here and in confparser.c is responsible parsing
* the configuration and get the values set there
- * ------------------------------------------------------------------ */
+ *
+ * -------------------------------------------------------------------------- */
#ifndef CONFPARSER_H
#define CONFPARSER_H
diff --git a/src/dblayer.c b/src/dblayer.c
index b781f47..5ece9c0 100644
--- a/src/dblayer.c
+++ b/src/dblayer.c
@@ -1,8 +1,17 @@
-/* dblayer.c - Database layer for ck ---------------------------*- C -*-
+/* dblayer.c - Database layer for ck -----------------------------------*- C -*-
*
* This file is part of ck, the config keeper
+ *
+ * -----------------------------------------------------------------------------
*
- * ------------------------------------------------------------------ */
+ * Copyright (C) 2018 Anastasis Grammenos
+ * GPLv3 (see LICENCE for the full notice)
+ *
+ * -----------------------------------------------------------------------------
+ *
+ * Give access to the database.
+ *
+ * -------------------------------------------------------------------------- */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/dblayer.h b/src/dblayer.h
index d12118d..24fdc2b 100644
--- a/src/dblayer.h
+++ b/src/dblayer.h
@@ -1,11 +1,17 @@
-/* dblayer.h - Database layer for ck ---------------------------*- C -*-
+/* dblayer.h - Database layer for ck -----------------------------------*- C -*-
*
* This file is part of ck, the config keeper
+ *
+ * -----------------------------------------------------------------------------
*
- * ---------------------------------------------------------------------
+ * Copyright (C) 2018 Anastasis Grammenos
+ * GPLv3 (see LICENCE for the full notice)
*
+ * -----------------------------------------------------------------------------
*
- * ------------------------------------------------------------------ */
+ * Give access to the database.
+ *
+ * -------------------------------------------------------------------------- */
#ifndef DBLAYER_H
#define DBLAYER_H