MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / main

Function main

xs/tools/xst.c:94–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92int omain(int argc, char* argv[])
93#else
94int main(int argc, char* argv[])
95#endif
96{
97 txAgentCluster* agentCluster = &gxAgentCluster;
98 int argi;
99 int option = 0;
100 int profiling = 0;
101 int bundle = 0;
102 char path[C_PATH_MAX];
103 char* dot;
104#if mxWindows
105 char* harnessPath = "..\\harness";
106#else
107 char* harnessPath = "../harness";
108#endif
109 int error = 0;
110
111 c_memset(agentCluster, 0, sizeof(txAgentCluster));
112 fxCreateMutex(&(agentCluster->mainMutex));
113 fxCreateCondition(&(agentCluster->countCondition));
114 fxCreateMutex(&(agentCluster->countMutex));
115 fxCreateCondition(&(agentCluster->dataCondition));
116 fxCreateMutex(&(agentCluster->dataMutex));
117 fxCreateMutex(&(agentCluster->reportMutex));
118
119 if (argc == 1) {
120 fxPrintUsage();
121 return 1;
122 }
123 for (argi = 1; argi < argc; argi++) {
124 if (argv[argi][0] != '-')
125 continue;
126
127 if (!strcmp(argv[argi], "-c"))
128 option = 4;
129 else if (!strcmp(argv[argi], "-i")) {
130 argi++;
131 option = 4;
132 }
133 else if (!strcmp(argv[argi], "-l"))
134 option = 4;
135 else if (!strcmp(argv[argi], "-lc"))
136 option = 4;
137 else if (!strcmp(argv[argi], "-o")) {
138 argi++;
139 option = 4;
140 }
141 else if (!strcmp(argv[argi], "-t"))
142 option = 4;
143
144 else if (!strcmp(argv[argi], "-h"))
145 fxPrintUsage();
146 else if (!strcmp(argv[argi], "-b"))
147 option = 7;
148 else if (!strcmp(argv[argi], "-e"))
149 option = 1;
150 else if (!strcmp(argv[argi], "-f"))
151 option = 5;

Callers

nothing calls this directly

Calls 10

fxPrintUsageFunction · 0.85
fxRunBundleFunction · 0.85
c_realpathFunction · 0.85
fuzzFunction · 0.85
fxStartProfilingFunction · 0.85
fxBuildFuzzFunction · 0.85
fxRunModuleFileFunction · 0.85
fxRunLoopFunction · 0.85
fxStopProfilingFunction · 0.85

Tested by

no test coverage detected