Blame view

build2/epsilon-master/ion/src/shared/tools/event_printer.cpp 484 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  #include <iostream>
  #include <cassert>
  #include <ion/events.h>
  
  int main(int argc, char * argv[]) {
    unsigned char c = 0;
    while (std::cin >> c) {
      Ion::Events::Event event(c);
      if (event.isDefined()) {
        if (event.name() == nullptr) {
          std::cerr << "*** UNNAMED(" << (int)c << ") ***" << std::endl;
        } else {
          std::cout << event.name() << std::endl;
        }
      } else {
        std::cerr << "*** INVALID(" << (int)c << ") ***" << std::endl;
      }
    }
  }