aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraxtloss <axtlos@getcryst.al>2024-05-28 19:43:28 +0200
committeraxtloss <axtlos@getcryst.al>2024-05-28 19:43:28 +0200
commit85e5469362db3c3fb89f7dc3fbe1eb1431fb2fcc (patch)
tree3cf032b70d13885da40f73210abd7ef2fcb3a5e2
parente2d8b96945423c14adbf7a54693f5064d5b157c1 (diff)
downloadautodarkmode-85e5469362db3c3fb89f7dc3fbe1eb1431fb2fcc.tar.gz
autodarkmode-85e5469362db3c3fb89f7dc3fbe1eb1431fb2fcc.tar.bz2
add license header
-rw-r--r--meson.build1
-rw-r--r--src/configuration.c19
-rw-r--r--src/extString.c19
-rw-r--r--src/main.c31
-rw-r--r--src/sun.c19
5 files changed, 60 insertions, 29 deletions
diff --git a/meson.build b/meson.build
index 0af50b3..e78804d 100644
--- a/meson.build
+++ b/meson.build
@@ -43,7 +43,6 @@ test_c_args = [
'-Wignored-qualifiers',
'-Wimplicit-function-declaration',
'-Wlogical-op',
- '-Wmissing-declarations',
'-Wmissing-format-attribute',
'-Wmissing-include-dirs',
'-Wmissing-noreturn',
diff --git a/src/configuration.c b/src/configuration.c
index 81a5bbb..6196e26 100644
--- a/src/configuration.c
+++ b/src/configuration.c
@@ -1,3 +1,22 @@
+/* configuration.c
+ *
+ * Copyright 2024 axtlos <axtlos@disroot.org>
+ *
+ * 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, version 3 of the License only.
+ *
+ * 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 <https://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
#include "configuration.h"
#include "iniparser/src/iniparser.h"
diff --git a/src/extString.c b/src/extString.c
index 6538dac..b32b380 100644
--- a/src/extString.c
+++ b/src/extString.c
@@ -1,3 +1,22 @@
+/* extString.c
+ *
+ * Copyright 2024 axtlos <axtlos@disroot.org>
+ *
+ * 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, version 3 of the License only.
+ *
+ * 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 <https://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
diff --git a/src/main.c b/src/main.c
index b4b5330..2aa6e4b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,20 +22,17 @@
#include "sun.h"
#include <string.h>
-#include <unistd.h>
#include <math.h>
#include <signal.h>
#include <glib.h>
#include <stdlib.h>
-#include <locale.h>
-#include <glib/gi18n.h>
#include <geoclue.h>
static GClueAccuracyLevel accuracy_level = GCLUE_ACCURACY_LEVEL_EXACT;
- GClueSimple *simple = NULL;
- GClueClient *client = NULL;
- GMainLoop *main_loop;
+GClueSimple *simple = NULL;
+GClueClient *client = NULL;
+GMainLoop *main_loop;
enum LocationType loctype = 0;
dictionary *dict = NULL;
@@ -145,28 +142,6 @@ gint
main (gint argc,
gchar *argv[])
{
- g_autoptr(GOptionContext) context = NULL;
- g_autoptr(GError) error = NULL;
- gboolean version = FALSE;
- GOptionEntry main_entries[] = {
- { "version", 0, 0, G_OPTION_ARG_NONE, &version, "Show program version" },
- { NULL }
- };
-
- context = g_option_context_new ("- my command line tool");
- g_option_context_add_main_entries (context, main_entries, NULL);
-
- if (!g_option_context_parse (context, &argc, &argv, &error))
- {
- g_printerr ("%s\n", error->message);
- return EXIT_FAILURE;
- }
-
- if (version)
- {
- g_printerr ("%s\n", PACKAGE_VERSION);
- return EXIT_SUCCESS;
- }
dict = load_config ();
loctype = config_get_location_type (dict);
diff --git a/src/sun.c b/src/sun.c
index 1f32be6..5d9e13c 100644
--- a/src/sun.c
+++ b/src/sun.c
@@ -1,3 +1,22 @@
+/* sun.c
+ *
+ * Copyright 2024 axtlos <axtlos@disroot.org>
+ *
+ * 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, version 3 of the License only.
+ *
+ * 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 <https://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-only
+ */
+
#include <math.h>
#include <glib.h>
#include <stdbool.h>