34#include <google/protobuf/io/zero_copy_stream.h>
35#include <google/protobuf/io/zero_copy_stream_impl.h>
39using namespace google;
45int main(
int argc,
char* argv[])
47 GOOGLE_PROTOBUF_VERIFY_VERSION;
50 cerr <<
"Usage: " << argv[0] <<
" SCHEMA" << endl;
57 int fd= open(argv[1], O_RDONLY);
61 perror(
"Failed to open table definition file");
65 protobuf::io::ZeroCopyInputStream* input=
66 new protobuf::io::FileInputStream(fd);
68 if (!table.ParseFromZeroCopyStream(input))
70 cerr <<
"Failed to parse table." << endl;
81 cout << output << endl;
TODO: Rename this file - func.h is stupid.