1
0
mirror of https://gitlab.com/klmp200/LO41.git synced 2024-11-25 02:24:23 +00:00

GCC YOU FAGGOT !

This commit is contained in:
Antoine Bartuccio 2018-06-11 02:01:56 +02:00
parent fd2463904a
commit ab0e742cd4
Signed by: klmp200
GPG Key ID: E7245548C53F904B
3 changed files with 7 additions and 7 deletions

View File

@ -150,18 +150,18 @@ void go_to_floor_Building(THIS(Building), int origin, int destination, Passenger
pthread_cond_wait(this->condition_floors[origin], this->mutex_get_inside_elevator);
elevator_number = this->get_inside_elevator(this, origin, passenger, type);
if (type == resident)
if (type == RESIDENT)
printf("Le résident %s rentre dans l'ascenseur %s depuis l'étage %d\n", passenger.resident->name,
this->elevators[elevator_number]->name, origin);
else if (type == visitor)
else if (type == VISITOR)
printf("Le visiteur %s rentre dans l'ascenseur %s depuis l'étage %d\n", passenger.visitor->name,
this->elevators[elevator_number]->name, origin);
pthread_cond_wait(this->condition_floors[destination], this->mutex_get_outside_elevator);
if (type == resident)
if (type == RESIDENT)
printf("Le résident %s sors de l'ascenseur %s à l'étage %d\n", passenger.resident->name,
this->elevators[elevator_number]->name, destination);
else if (type == visitor)
else if (type == VISITOR)
printf("Le visiteur %s sors de l'ascenseur %s à l'étage %d\n", passenger.visitor->name,
this->elevators[elevator_number]->name, destination);
}

View File

@ -15,7 +15,7 @@
#include "../Resident/Resident.h"
#include "../Visitor/Visitor.h"
typedef enum {resident, visitor} PASSENGER_TYPE;
typedef enum {RESIDENT, VISITOR} PASSENGER_TYPE;
typedef union u_Passenger {
Resident * resident;

View File

@ -11,7 +11,7 @@ GETTER(Resident, int, apartment_floor);
void * runnable_Resident(void * void_this){
Resident * this = (Resident*) void_this;
printf("Je suis le resident %s et je suis a l'etage %d en direction de l'etage %d\n",
printf("Je suis le RESIDENT %s et je suis a l'etage %d en direction de l'etage %d\n",
this->name, this->apartment_floor, this->destination);
return NULL;
}
@ -23,7 +23,7 @@ void _free__Resident(THIS(Resident)){
}
Resident *_init_Resident(int id, char* name, int apartment_floor, int destination){
/* If the destination is the same as the apartment_floor or negative, the resident will not move */
/* If the destination is the same as the apartment_floor or negative, the RESIDENT will not move */
Resident * new_resident = malloc_or_die(sizeof(Resident));
new_resident->name = strdup(name);
new_resident->id = id;