new file: Makefile

new file:   src/config.h
	new file:   src/db.c
	new file:   src/db.h
	new file:   src/planner.c
	new file:   src/planner.h
	new file:   src/ui.c
	new file:   src/ui.h
sql
ketrptr 2024-12-09 19:27:50 +01:00
parent cbeb4186aa
commit bdabc372b7
8 changed files with 56 additions and 0 deletions

14
Makefile Normal file
View File

@ -0,0 +1,14 @@
CFLAGS=-Wall -Wetra -g
UIF=src/ui.c src/ui.h #UI files
PLF=src/planner.c src/planner.h #planner files
DBF=src/db.c src/db.h #db files
CONFIG=src/config.h #config file
ui: $(UIF)
gcc -c $(CFLAGS) $(UIF)
planner: $(PLF)
gcc -c $(CFLAGS) $(PLF)
db: $(DBF)
gcc -c $(CFLAGS) $(DBF)

15
src/config.h Normal file
View File

@ -0,0 +1,15 @@
/* Global config file should be importet by all
*/
#ifndef CONFIG
#define CONFIG
#include <time.h>
#define seconds(n) (n * CLOCKS_PER_SEC)
#define minutes(n) (n * 60 * seconds(n))
#define hours(n) (n * 60 *(minutes(n))
const time_t pauseLenght = minutes(15);
const time_t minIntervalLen = minutes(30);
#endif

4
src/db.c Normal file
View File

@ -0,0 +1,4 @@
/*
* databse
* stores current state and reads previous
*/

4
src/db.h Normal file
View File

@ -0,0 +1,4 @@
#ifndef DB
#define DB
#endif

7
src/planner.c Normal file
View File

@ -0,0 +1,7 @@
/*
* Main Plannder
* gets data from user or db
* generates timetable
* modify data for next day and send to db
*
*/

4
src/planner.h Normal file
View File

@ -0,0 +1,4 @@
#ifndef PLANNER
#define PLANNER
#endif // !PLANNER

4
src/ui.c Normal file
View File

@ -0,0 +1,4 @@
/*
* command line interface for user input
*
*/

4
src/ui.h Normal file
View File

@ -0,0 +1,4 @@
#ifndef UI
#define UI
#endif // !UI