Project

General

Profile

Statistics
| Revision:

root / lab3 / lab3.c @ 8

History | View | Annotate | Download (1.21 KB)

1
#include <lcom/lcf.h>
2

    
3
#include <lcom/lab3.h>
4

    
5
#include <stdbool.h>
6
#include <stdint.h>
7

    
8
int main(int argc, char *argv[]) {
9
  // sets the language of LCF messages (can be either EN-US or PT-PT)
10
  lcf_set_language("EN-US");
11

    
12
  // enables to log function invocations that are being "wrapped" by LCF
13
  // [comment this out if you don't want/need it]
14
  lcf_trace_calls("/home/lcom/labs/lab3/trace.txt");
15

    
16
  // enables to save the output of printf function calls on a file
17
  // [comment this out if you don't want/need it]
18
  lcf_log_output("/home/lcom/labs/lab3/output.txt");
19

    
20
  // handles control over to LCF
21
  // [LCF handles command line arguments and invokes the right function]
22
  if (lcf_start(argc, argv))
23
    return 1;
24

    
25
  // LCF clean up tasks
26
  // [must be the last statement before return]
27
  lcf_cleanup();
28

    
29
  return 0;
30
}
31

    
32
int(kbd_test_scan)() {
33
  /* To be completed by the students */
34
  printf("%s is not yet implemented!\n", __func__);
35

    
36
  return 1;
37
}
38

    
39
int(kbd_test_poll)() {
40
  /* To be completed by the students */
41
  printf("%s is not yet implemented!\n", __func__);
42

    
43
  return 1;
44
}
45

    
46
int(kbd_test_timed_scan)(uint8_t n) {
47
  /* To be completed by the students */
48
  printf("%s is not yet implemented!\n", __func__);
49

    
50
  return 1;
51
}