-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmusteri.c
55 lines (46 loc) · 1.29 KB
/
musteri.c
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
#include "database.h"
#include "helper.h"
#include <stdio.h>
#include <locale.h>
#include <unistd.h>
void show_menu_data(int desk_id){
show_menu(desk_id);
setvbuf(stdout, NULL, _IOLBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
//end();
while(1){
sleep(9);
clear_screen();
init();
int desk_status = get_desk_status(desk_id);
end();
switch (desk_status) {
case -1:
printf("Sipariş Daha Onaylanmadı...\n");
continue;
case 1:
printf("Sipariş Onaylandı, hazırlanıyor..\n");
continue;
case 2:
printf("Sipariş Hazırlandı, Getiriliyor..\n");
continue;
case 3:
printf("Sipariş Getirildi, Afiyet olsun.\n");
return;
}
}
}
void show_menu_data(int desk_id);
int main(){
setlocale(LC_ALL, "");
init();
int masa;
printf("Restoranımıza Hoş Geldiniz \n \n");
//printf("Şuanda 1,4 ve 7 numaralı masalarımız boştadır. \n \n");
printf("Lütfen Oturmak Istediginiz Masa Numarasini Giriniz: ");
scanf("%d", &masa);
printf("\n%d numaralı masaya oturuyorsunuz.\n", masa);
sleep(1);
show_menu_data(masa);
return 0;
}