MCPcopy Create free account
hub / github.com/NetHack/NetHack / main

Function main

util/makedefs.c:227–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225
226#ifdef MACsansMPWTOOL
227int
228main(void)
229{
230 const char *def_options = "odemvpqrshz";
231 char buf[100];
232 int len;
233
234 printf("Enter options to run: [%s] ", def_options);
235 fflush(stdout);
236 fgets(buf, 100, stdin);
237 len = strlen(buf);
238 if (len <= 1)
239 Strcpy(buf, def_options);
240 else
241 buf[len - 1] = 0; /* remove return */
242
243 if (buf[0] == '-' && buf[1] == '-') {
244#if 0
245 split up buf into words
246 do_ext_makedefs(fakeargc, fakeargv);
247#else
248 printf("extended makedefs not implemented for Mac OS9\n");
249 makedefs_exit(EXIT_FAILURE);
250 /*NOTREACHED*/
251#endif
252 }
253
254 do_makedefs(buf);
255 makedefs_exit(EXIT_SUCCESS);
256 /*NOTREACHED*/
257 return 0;
258}
259
260#else /* ! MACOS9 */
261

Callers

nothing calls this directly

Calls 6

printfFunction · 0.85
fflushFunction · 0.85
fgetsFunction · 0.85
makedefs_exitFunction · 0.85
do_makedefsFunction · 0.85
do_ext_makedefsFunction · 0.85

Tested by

no test coverage detected