aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid <dbphillipsnz@gmail.com>2014-05-10 11:32:45 +1200
committerDavid <dbphillipsnz@gmail.com>2014-06-06 20:28:47 +1200
commitbf04ee460a3221f8d4b6caa628a5820375642545 (patch)
treedfd9d8d00e51b392582ec5038718411ccd877fdc
parentbe9227dfcfdba5362cf1acba1033c11b7c33f346 (diff)
downloadparamano-bf04ee460a3221f8d4b6caa628a5820375642545.tar.xz
First preparations for config reloading on-the-fly
-rw-r--r--Makefile3
-rw-r--r--reload.c22
-rw-r--r--reload.h21
3 files changed, 45 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8c86ef2..3f7d098 100644
--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,8 @@ trayfreq_SOURCES = freq_tray/getcore.c \
config_file.c \
defaults.c \
bat_tray/bat_tray.c \
- common.c
+ common.c \
+ reload.c
trayfreq_set_CFLAGS = $(GLIB_CFLAGS) -Wall -D_=gettext
trayfreq_set_LDFLAGS = $(GLIB_LIBS) -lm
diff --git a/reload.c b/reload.c
new file mode 100644
index 0000000..fcc5ca9
--- /dev/null
+++ b/reload.c
@@ -0,0 +1,22 @@
+/************************************************************************
+ * This file is part of trayfreq-archlinux. *
+ * *
+ * trayfreq-archlinux 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. *
+ * *
+ * trayfreq-archlinux 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 trayfreq-archlinux. If not, see *
+ * <http://www.gnu.org/licenses/>. *
+ ************************************************************************/
+
+void reload_config()
+{
+ printf("USR1\n");
+}
diff --git a/reload.h b/reload.h
new file mode 100644
index 0000000..6ca7cf4
--- /dev/null
+++ b/reload.h
@@ -0,0 +1,21 @@
+/************************************************************************
+ * This file is part of trayfreq-archlinux. *
+ * *
+ * trayfreq-archlinux 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. *
+ * *
+ * trayfreq-archlinux 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 trayfreq-archlinux. If not, see *
+ * <http://www.gnu.org/licenses/>. *
+ ************************************************************************/
+
+#ifndef RELOAD_H
+void reload_config();
+#endif