aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-19 21:22:14 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-19 21:22:14 +0200
commit30114ac62a2411e0a0722e33ec64610179509d15 (patch)
treecf8b6f7c7a3255a14025c4fada2aa6321cccf665 /src
parentBug fix (diff)
downloadlowbat-bsd-30114ac62a2411e0a0722e33ec64610179509d15.tar.gz
lowbat-bsd-30114ac62a2411e0a0722e33ec64610179509d15.tar.bz2
lowbat-bsd-30114ac62a2411e0a0722e33ec64610179509d15.tar.xz
lowbat-bsd-30114ac62a2411e0a0722e33ec64610179509d15.tar.zst
lowbat-bsd-30114ac62a2411e0a0722e33ec64610179509d15.zip
Removed C main, new main is now in asm
Diffstat (limited to 'src')
-rw-r--r--src/jo_lowbat.c22
-rw-r--r--src/jo_lowbat.h38
-rw-r--r--src/jo_n_notify.c2
-rw-r--r--src/jo_n_notify.h2
-rw-r--r--src/jo_n_speak.h8
5 files changed, 10 insertions, 62 deletions
diff --git a/src/jo_lowbat.c b/src/jo_lowbat.c
deleted file mode 100644
index bcfd3c8..0000000
--- a/src/jo_lowbat.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/****************************************************************************************/
-/* */
-/* File : jo_lowbat.c /_________/ */
-/* Author : Joe | */
-/* Date : 04/2020 | */
-/* Info : The main | */
-/* / | */
-/* \ / */
-/* \_____/ */
-/* */
-/****************************************************************************************/
-
-#include <jo_lowbat.h>
-#include <libnotify/notify.h>
-
-int
-main
-(int argc,
- const char *argv[])
-{
- return (jo_r_lowbat(argc, argv));
-}
diff --git a/src/jo_lowbat.h b/src/jo_lowbat.h
deleted file mode 100644
index 2a664db..0000000
--- a/src/jo_lowbat.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************************/
-/* */
-/* File : jo_lowbat.h /_________/ */
-/* Author : Joe | */
-/* Date : 04/2020 | */
-/* Info : The general header | */
-/* / | */
-/* \ / */
-/* \_____/ */
-/* */
-/****************************************************************************************/
-
-#ifndef JO_LOWBAT_H
-#define JO_LOWBAT_H
-
-#include <jo_lowbat.h>
-#include <jo_n_speak.h>
-#include <jo_n_notify.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <stdio.h>
-
-enum
-{
- JO_RET_FINE,
- JO_RET_RD_FAILED,
- JO_RET_ESPEAK_FAILED
-};
-
-int8_t jo_r_lowbat(
- int,
- const char**
- );
-int8_t jo_f_status(void);
-int8_t jo_f_percent(void);
-
-#endif
diff --git a/src/jo_n_notify.c b/src/jo_n_notify.c
index a92f2b2..f98ea1d 100644
--- a/src/jo_n_notify.c
+++ b/src/jo_n_notify.c
@@ -21,7 +21,7 @@ jo_n_notify
{
NotifyNotification *n;
- notify_init("lowbat");
+ notify_init(JO_LOWBAT);
n = notify_notification_new(head, body, NULL);
notify_notification_set_urgency(n, u);
notify_notification_set_timeout(n, t);
diff --git a/src/jo_n_notify.h b/src/jo_n_notify.h
index 0bf7ca1..a72395a 100644
--- a/src/jo_n_notify.h
+++ b/src/jo_n_notify.h
@@ -17,6 +17,8 @@
#include <stddef.h>
#include <stdint.h>
+#define JO_LOWBAT "lowbat"
+
void jo_n_notify(
const char[],
const char[],
diff --git a/src/jo_n_speak.h b/src/jo_n_speak.h
index aedd837..79ca683 100644
--- a/src/jo_n_speak.h
+++ b/src/jo_n_speak.h
@@ -13,7 +13,6 @@
#ifndef JO_N_SPEAK_H
#define JO_N_SPEAK_H
-#include <jo_lowbat.h>
#include <espeak/speak_lib.h>
#include <string.h>
#include <stdlib.h>
@@ -21,6 +20,13 @@
#include <stdio.h>
#include <unistd.h>
+enum
+{
+ JO_RET_FINE,
+ JO_RET_RD_FAILED,
+ JO_RET_ESPEAK_FAILED
+};
+
#define JO_ESPEAK_VOICE "English"
void jo_n_speak(const char *);