From 41bb452de63240a4c7b4b5bb629c1abff85ae8c2 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Sun, 27 Mar 2011 23:54:28 +0200 Subject: [PATCH] =?UTF-8?q?Fen=C3=AAtres=20stables,=20it=20works?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- C_Language/TP_SYS/tp_sema/consommateur.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/C_Language/TP_SYS/tp_sema/consommateur.c b/C_Language/TP_SYS/tp_sema/consommateur.c index 69e1328..19fdf48 100644 --- a/C_Language/TP_SYS/tp_sema/consommateur.c +++ b/C_Language/TP_SYS/tp_sema/consommateur.c @@ -40,7 +40,7 @@ int main( int argc, char **argv) MSG msgtemp; PROD tprod[MAX_PROD]; - int NB_FENETRES = 1; + int NB_FENETRES = 4; WINDOW *f_haut, *f_bas, *f_milieu1, *f_milieu2; //WINDOW **tWindow; WINDOW *w ; @@ -116,8 +116,21 @@ int main( int argc, char **argv) { numTete = vartemp; c = msgtemp.c; - w = f_haut; + switch(msgtemp.idp) + { + case 0 : + w = f_haut; + break; + case 1 : + w = f_milieu1; + break; + case 2 : + w = f_milieu2; + break; + default : + w = f_bas; + } waddch(w,c) ; wrefresh(w) ; }