diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-16 18:44:48 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-16 18:44:48 +0200 |
commit | 7e831a1495736e3997502de43962d617b7218179 (patch) | |
tree | b61da68e5e24f54523fecf68be0cce789a3c2a8c /src | |
parent | Create LICENSE (diff) | |
download | lowbat-bsd-7e831a1495736e3997502de43962d617b7218179.tar.gz lowbat-bsd-7e831a1495736e3997502de43962d617b7218179.tar.bz2 lowbat-bsd-7e831a1495736e3997502de43962d617b7218179.tar.xz lowbat-bsd-7e831a1495736e3997502de43962d617b7218179.tar.zst lowbat-bsd-7e831a1495736e3997502de43962d617b7218179.zip |
Read function is good
Diffstat (limited to 'src')
-rw-r--r-- | src/jo_lowbat.h | 23 | ||||
-rw-r--r-- | src/jo_main.c | 29 | ||||
-rw-r--r-- | src/jo_main.h | 17 | ||||
-rw-r--r-- | src/jo_printf.c | 9 | ||||
-rw-r--r-- | src/jo_printf.h | 6 |
5 files changed, 66 insertions, 18 deletions
diff --git a/src/jo_lowbat.h b/src/jo_lowbat.h new file mode 100644 index 0000000..ddc6679 --- /dev/null +++ b/src/jo_lowbat.h @@ -0,0 +1,23 @@ +/****************************************************************************************/ +/* */ +/* File : jo_lowbat.h /_________/ */ +/* Author : Joe | */ +/* Date : 04/2020 | */ +/* Info : The general header | */ +/* / | */ +/* \ / */ +/* \_____/ */ +/* */ +/****************************************************************************************/ + +#ifndef JO_LOWBAT_H +#define JO_LOWBAT_H + +enum +{ + JO_RET_FINE, + JO_RET_RD_FAILED +}; +char *jo_f_status(void); + +#endif diff --git a/src/jo_main.c b/src/jo_main.c index ee3c400..2d19ab8 100644 --- a/src/jo_main.c +++ b/src/jo_main.c @@ -1,8 +1,33 @@ +/****************************************************************************************/ +/* */ +/* File : jo_main.c /_________/ */ +/* Author : Joe | */ +/* Date : 04/2020 | */ +/* Info : The main | */ +/* / | */ +/* \ / */ +/* \_____/ */ +/* */ +/****************************************************************************************/ + #include <jo_main.h> +/* +** Files prefixes +** -------------- +** f: fetch +*/ + int main(void) { - jo_printf(); - return (0); + char *status; + + if (!(status = jo_f_status())) { + return (JO_RET_RD_FAILED); + } + printf("status: %s\n", status); + free(status); + status = NULL; + return (JO_RET_FINE); } diff --git a/src/jo_main.h b/src/jo_main.h index 3a3359c..8feabe9 100644 --- a/src/jo_main.h +++ b/src/jo_main.h @@ -1,6 +1,21 @@ +/****************************************************************************************/ +/* */ +/* File : jo_main.h /_________/ */ +/* Author : Joe | */ +/* Date : 04/2020 | */ +/* | */ +/* / | */ +/* \ / */ +/* \_____/ */ +/* */ +/****************************************************************************************/ + #ifndef JO_MAIN_H #define JO_MAIN_H -#include <jo_printf.h> +#include <jo_lowbat.h> +#include <stdio.h> +#include <stdlib.h> +#include <stddef.h> #endif diff --git a/src/jo_printf.c b/src/jo_printf.c deleted file mode 100644 index 066712b..0000000 --- a/src/jo_printf.c +++ /dev/null @@ -1,9 +0,0 @@ -#include <stdio.h> -#include <jo_printf.h> - -void -jo_printf(void) -{ - - printf("Hey!\n"); -} diff --git a/src/jo_printf.h b/src/jo_printf.h deleted file mode 100644 index 60fdc99..0000000 --- a/src/jo_printf.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef JO_PRINTF_H -#define JO_PRINTF_H - -void jo_printf(void); - -#endif |