lsnes rr2-β24
[lsnes.git] / src / emulation / make-ports.cpp
blobec9ba4aadd62612a4df2e9b68f11cd124b07cf56
1 #include "portctrl-data.hpp"
2 #include "portctrl-parse.hpp"
3 #include "json.hpp"
4 #include <string>
6 int main()
8 std::string in_json;
9 std::string tmp;
10 while(std::cin) {
11 std::getline(std::cin, tmp);
12 in_json = in_json + tmp + "\n";
14 JSON::node n(in_json);
15 auto x = portctrl::pcs_from_json_array(n, "ports");
16 unsigned t = 0;
17 std::string out = portctrl::pcs_write_classes(x, t);
18 std::cout << out;
19 return 0;