ajout des commentaires.
This commit is contained in:
parent
b4f25a50b0
commit
83066e1704
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"files.associations": {
|
|
||||||
"unistd.h": "c"
|
|
||||||
}
|
|
||||||
}
|
|
4
pendu.c
4
pendu.c
@ -37,9 +37,13 @@ void display_hangman(int tries) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* this function display time out when user does nothing during 30s and verify signal*/
|
||||||
void sig_handler(int signum){
|
void sig_handler(int signum){
|
||||||
|
if (signum == SIGALRM){
|
||||||
|
|
||||||
printf("\ntime out\n");
|
printf("\ntime out\n");
|
||||||
exit (1);
|
exit (1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user