#ifndef STRUCTURE_H_INCLUDED #define STRUCTURE_H_INCLUDED #include /* Feuilles mortes : extern int* stats; extern int* n_colles; */ typedef enum topic {NOTHING, MATH, PHYSICS, ENGLISH, FRENCH, INFO} topic; // colles subjects typedef struct date {int hour; int day; int month; int year;} date; /* format is {hour, day, month, year} */ // nothing to say here typedef struct room {char building; int id;} room; // rooms // building can be C, M, R or V typedef struct creneau {int length; date date; int group; char* name; int namelen; topic mat; room salle;} creneau; // one créneau de colle // /!\ creneau has to be sorted by ascending dates // with edt being a creneau*, it is required to have edt[0] be a Monday and edt[len(edt)-1] has to be a Friday typedef struct colleur {char* name; int namelen; topic mat; date* disp; int n_disp;} colleur; // available creneaux for the colleurs typedef struct array {int* a; int len; int memlen;} array; // yes int date_dist(date d1, date d2); bool is_sorted(creneau *edt, int len); creneau *import_creneaux(char *filename, int size); bool str_equal(char *s1, char *s2); void str_copy(char *src, int l1, char *dest); colleur *import_colleurs(char *filename, int n_colleurs, int max_available); date increment_date(date d, int inc); creneau *import_creneaux_oneweek(char *filename, int len_file, int n_weeks); void expand(colleur *guy, int id, int n_weeks); colleur *import_colleurs_oneweek(char *filename, int n_colleurs, int n_weeks, int len_oneweek); int str_to_int(char *s); #endif