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

Function X11_player_selection

win/X11/winmisc.c:1538–1557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1536/* Global functions ======================================================== */
1537
1538void
1539X11_player_selection(void)
1540{
1541 if (iflags.wc_player_selection == VIA_DIALOG) {
1542 if (!*svp.plname) {
1543#ifdef UNIX
1544 char *defplname = get_login_name();
1545#else
1546 char *defplname = (char *)0;
1547#endif
1548 (void) strncpy(svp.plname, defplname ? defplname : "Mumbles",
1549 sizeof svp.plname - 1);
1550 svp.plname[sizeof svp.plname - 1] = '\0';
1551 iflags.renameinprogress = TRUE;
1552 }
1553 X11_player_selection_dialog();
1554 } else { /* iflags.wc_player_selection == VIA_PROMPTS */
1555 X11_player_selection_prompts();
1556 }
1557}
1558
1559/* called by core to have the player pick an extended command */
1560int

Callers

nothing calls this directly

Calls 1

get_login_nameFunction · 0.50

Tested by

no test coverage detected