OILS / _gen / bin / oils_for_unix.mycpp-main.cc View on Github | oils.pub

20 lines, 11 significant
1#include "mycpp/runtime.h"
2
3namespace oils_for_unix {
4int main(List<BigStr*>* argv);
5}
6
7int main(int argc, char **argv) {
8 mylib::InitCppOnly(); // Initializes gHeap
9
10 auto* args = Alloc<List<BigStr*>>();
11 for (int i = 0; i < argc; ++i) {
12 args->append(StrFromC(argv[i]));
13 }
14
15 int status = oils_for_unix::main(args);
16
17 gHeap.ProcessExit();
18
19 return status;
20}