From c58bbd7a51a574d4c74b58040e2a4628dbc125f5 Mon Sep 17 00:00:00 2001 From: "Haoran S. Diao" <0@hairydiode.xyz> Date: Sat, 13 Oct 2018 13:24:34 -0400 Subject: initial commit --- makefile | 6 ++++++ sched.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 makefile create mode 100644 sched.c diff --git a/makefile b/makefile new file mode 100644 index 0000000..31bbcd4 --- /dev/null +++ b/makefile @@ -0,0 +1,6 @@ +sched : sched.o + gcc sched.o -o sched -lncurses +sched.o : sched.c + gcc -c sched.c -Incurses +clean : + rm sched.c diff --git a/sched.c b/sched.c new file mode 100644 index 0000000..d5f110e --- /dev/null +++ b/sched.c @@ -0,0 +1,48 @@ +#include +#include +#include + +/* report of working on a task, records start time in time_t, and elapsed time + * also in time_t. % of work done in float. + */ +struct report { + time_t start; //start date + time_t interval; //interval of work + float completed; // percent of task completed +}; +/* Task to be scheduled + */ +struct task { + const char * name; //name of task + int lvl; + time_t start; //Date at which you can work on this task + time_t end; //due date + time_t workable; //workable interval + time_t deJureCost;// De Jure estimate of total cost + float completed; // percent of the task completed + float cost; // time per percent completed, current bayesian analysis + float saturation; //saturation + struct report * reports; //list of reports + time_t lastupdated; // last date the task was edited/created, for syncing +}; +/*global array of all tasks*/ +struct task * tasks; + +int main (int argc,char * argv[]) { + initscr(); + raw(); //Characters immediately available + noecho(); //Typed Characters not printed + keypad(stdscr, true); // enables Keyoad and Function keys + mvprintw(LINES/2, COLS/2, "%s\n", argv[0]); + refresh(); //refreshes the screen + getch(); //Stalls the thread + endwin(); + return 0; +} +/* creates a tab transversable menu list of input boxes + * Arguments: names of the inputs and the defaults in the text field + * if def + */ +int inputmenu(char * names[], char * in) { + +} -- cgit v1.1