Indentation différente

master
Philippe Pittoli 2011-03-28 10:06:04 +02:00
parent 630a0f3e8d
commit a9b718a7ee
1 changed files with 14 additions and 7 deletions

View File

@ -122,7 +122,7 @@ int main( int argc, char **argv)
P(mutex_data); P(mutex_data);
vartemp = (int) memoireP->tete; vartemp = (int) memoireP->tete;
msgtemp = (MSG) memoireP->f[(vartemp -1 + MAX_BUF) % MAX_BUF ]; msgtemp = (MSG) memoireP->f[( vartemp -1 + MAX_BUF) % MAX_BUF ];
V(mutex_data); V(mutex_data);
if(numTete != vartemp) if(numTete != vartemp)
@ -136,9 +136,7 @@ int main( int argc, char **argv)
} }
P(mutex_data); P(mutex_data);
vartemp = (int) memoireP->queue; memoireP->queue = (memoireP->tete -1 + MAX_BUF) % MAX_BUF;
vartemp = (vartemp +1) % MAX_BUF;
memoireP->queue = vartemp;
V(mutex_data); V(mutex_data);
// S'il n'y a plus de producteurs, on quitte // S'il n'y a plus de producteurs, on quitte
@ -178,10 +176,19 @@ WINDOW *creation_fenetre(int n,int d,char *t)
void quitter(int signal) void quitter(int signal)
{ {
if(shmctl(shmid, IPC_RMID, 0) < 0) if(shmctl(shmid, IPC_RMID, 0) < 0)
{ perror("shmctl"); exit(EXIT_FAILURE); } {
perror("shmctl");
exit(EXIT_FAILURE);
}
if(mutex_data >= 0) { del_sem(sem_key_data); } if(mutex_data >= 0)
if(mutex_tpa >= 0) { del_sem(sem_key_tpa); } {
del_sem(sem_key_data);
}
if(mutex_tpa >= 0)
{
del_sem(sem_key_tpa);
}
endwin() ; endwin() ;
if(signal == PLUSDEPROD) if(signal == PLUSDEPROD)