Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * ------------------------------------------------------------------------------------------------------------------------------------------------------
- * --------------------------------------------------|| C Libraries ||--------------------------------------------------
- * ------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <sys/stat.h>
- #include <sys/timeb.h>
- #include <time.h>
- #include <unistd.h>
- /*
- * ------------------------------------------------------------------------------------------------------------------------------------------------------
- * --------------------------------------------------|| Headers ||--------------------------------------------------
- * ------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- #include "config.h"
- /*
- * ------------------------------------------------------------------------------------------------------------------------------------------------------
- * --------------------------------------------------|| Structures ||--------------------------------------------------
- * ------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- typedef struct card{
- char info[100];
- int id;
- int priority;
- int local; /* 0 - To Do, 1 - Doing; 2 - Done */
- struct timeb created;
- struct timeb deadline;
- struct timeb concluded;
- int responsible;
- } Card;
- typedef struct to_do *ToDoList;
- typedef struct to_do{
- Card *todo_card;
- struct to_do *next;
- }To_do;
- typedef struct to_do *DoingList;
- typedef struct doing{
- Card *doing_card;
- struct doing *next;
- }Doing;
- typedef struct to_do *DoneList;
- typedef struct done{
- Card *done_card;
- struct done *next;
- }Done;
- typedef struct people{
- char name[50];
- char email[50];
- int id;
- int max_tasks;
- int current_tasks;
- /* Lista ligada de n�s para os cart�es da pessoa */
- To_do *people_to_do_cards;
- Doing *people_doing_cards;
- Done *people_done_cards;
- } People;
- typedef struct people_node *PeopleList;
- typedef struct people_node {
- People person;
- PeopleList next;
- } People_node;
- /*
- * ------------------------------------------------------------------------------------------------------------------------------------------------------
- * --------------------------------------------------|| Variables ||--------------------------------------------------
- * ------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- /* FILES */
- FILE *flog;
- FILE *fpeople;
- FILE *fcards;
- FILE *fconfig;
- /* MISC */
- char timenow[50];
- /* TIME */
- time_t t;
- struct tm Time;
- /* POINTERS */
- /*
- * ------------------------------------------------------------------------------------------------------------------------------------------------------
- * --------------------------------------------------|| Functions ||--------------------------------------------------
- * ------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- /* FILES */
- int initFile(char *fname);
- int checkFile(char *fname);
- /* MISC */
- void print(int n);
- char *timelog();
- PeopleList make_list();
- void insert_people (PeopleList lista, People pessoa);
- void change_current_task (PeopleList lista, int num);
- void procura_lista (PeopleList lista, int chave, PeopleList *ant, PeopleList *actual);
- void printPeoplesList(PeopleList lista);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement