1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
case '7' :
memset(LCDText, ' ', 32);
memset(mess, ' ', sizeof(mess));
Verlan(bfr,bfr,1);
bfr[strlen(bfr)-1]=' ';
//test pour voir qu'est ce qu il y a dans le buffer
strcpypgm2ram((char*)LCDText,"buffer");
LCDUpdate();
DelayMs(1000);
strcpy((char*)LCDText,(char*)bfr);
LCDUpdate();
DelayMs(1000);
//test pour voir qu'est ce que me renvoie strcmp
strcpypgm2ram((char*)LCDText,"strcmp");
LCDUpdate();
DelayMs(1000);
strcpy((char*)mess,(char*)inter);
strcmp(bfr,"admin");
strcpy((char*)mess,(char*)inter);
strcpy((char*)LCDText,(char*)mess);
LCDUpdate();
DelayMs(1000);
if (strcmp(bfr,"admin")==0)
{
memset(LCDText, ' ', 32);
strcpypgm2ram((char*)mess,"bonjour chef");
strcpy((char*)LCDText,(char*)mess);
LCDUpdate();
send(ClientSock[i], mess, sizeof(mess),0);
}
else
{
memset(LCDText, ' ', 32);
//test pour voir si strcmp est toujours identique
strcpypgm2ram((char*)LCDText,"strcmp");
LCDUpdate();
DelayMs(1000);
strcpy((char*)LCDText,strcmp(bfr,"admin"));
LCDUpdate();
DelayMs(1000);
//test pour voir le buffer
strcpypgm2ram((char*)LCDText,"buffer");
LCDUpdate();
DelayMs(1000);
strcpy((char*)LCDText,(char*)bfr);
LCDUpdate();
send(ClientSock[i], bfr, sizeof(bfr),0);
}
break; |
Partager