blob: 6b3446c9d56f46ca07760ac932c5d2de61dafcae (
plain)
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
|
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#define UNUSED(x) (void)(x)
volatile sig_atomic_t g_int_ctrl_c = 0;
int g_score = 0;
void interrupt_handler(int sig) {
UNUSED(sig);
g_int_ctrl_c = 1;
}
int main (int argc, char **argv) {
int width;
int height;
/* handle SIGINT interrupts */
signal(SIGINT, interrupt_handler);
/* Game Loop */
while (1) {
}
return 0;
}
|